diff options
| author | Kenichi Handa | 2010-05-19 10:10:29 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2010-05-19 10:10:29 +0900 |
| commit | 134d1bcded02e066727ece838f14ffc767f76419 (patch) | |
| tree | 2187c2ac9748400146394bdaefd59f314598685d | |
| parent | 2833d9158d6315b59415173df5d47515faac5310 (diff) | |
| parent | 1fc0ce04bc651fe8adbe822515e4ea7a4e904249 (diff) | |
| download | emacs-134d1bcded02e066727ece838f14ffc767f76419.tar.gz emacs-134d1bcded02e066727ece838f14ffc767f76419.zip | |
merge trunk
75 files changed, 2121 insertions, 645 deletions
| @@ -1,3 +1,71 @@ | |||
| 1 | 2010-05-18 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * configure.in (POST_ALLOC_OBJ) [cygwin]: Omit vm-limit.o. | ||
| 4 | (POST_ALLOC_OBJ) [!cygwin]: Set to empty. | ||
| 5 | |||
| 6 | * config.bat (RALLOC_OBJ): Edit to empty if sys_malloc. | ||
| 7 | * configure.in (REL_ALLOC): Unset on gnu, gnu-linux if DOUG_LEA_MALLOC. | ||
| 8 | (RALLOC_OBJ): New output variable. | ||
| 9 | |||
| 10 | * config.bat (GMALLOC_OBJ, VMLIMIT_OBJ): Edit to empty if sys_malloc. | ||
| 11 | * configure.in (GMALLOC_OBJ, VMLIMIT_OBJ): New output variables. | ||
| 12 | |||
| 13 | 2010-05-17 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 14 | |||
| 15 | * Makefile.in (src): Provide the name of the VCS file that witnesses | ||
| 16 | a pull. | ||
| 17 | ($(srcdir)/src/config.in): Handle accidental removal of src/config.in. | ||
| 18 | |||
| 19 | 2010-05-17 Glenn Morris <rgm@gnu.org> | ||
| 20 | |||
| 21 | * configure.in (OLDXMENU_DEPS): New output variable. | ||
| 22 | |||
| 23 | 2010-05-16 Glenn Morris <rgm@gnu.org> | ||
| 24 | |||
| 25 | * configure.in (ns_appbindir, ns_appresdir): Set using $ns_appdir. | ||
| 26 | |||
| 27 | * configure.in (ns_appdir, ns_appbindir): Add trailing "/" to value. | ||
| 28 | * Makefile.in (install-arch-dep): Update for above change. | ||
| 29 | |||
| 30 | * Makefile.in (ns_appdir): Remove. | ||
| 31 | (install-arch-dep): Test $ns_appresdir instead of $ns_appdir. | ||
| 32 | |||
| 33 | * configure.in (TEMACS_LDFLAGS2): New output variable. | ||
| 34 | |||
| 35 | * configure.in (NS_IMPL_GNUSTEP_TEMACS_LDFLAGS): New output variable. | ||
| 36 | (START_FILES): Set to empty if NS_IMPL_GNUSTEP. | ||
| 37 | (GNUSTEP_SYSTEM_HEADERS, GNUSTEP_SYSTEM_LIBRARIES): Do not output, | ||
| 38 | nothing uses. | ||
| 39 | |||
| 40 | 2010-05-16 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 41 | |||
| 42 | * configure.in: Remove references to usg5-4 and bsd-common, $opsys | ||
| 43 | does not use them. | ||
| 44 | (X11R5_INHIBIT_I18N): Remove, unused. | ||
| 45 | |||
| 46 | 2010-05-15 Glenn Morris <rgm@gnu.org> | ||
| 47 | |||
| 48 | * configure.in (LIBXMENU): Set to empty if !HAVE_X_WINDOWS. | ||
| 49 | |||
| 50 | * configure.in (FONT_OBJ): Set to empty if !HAVE_X_WINDOWS. | ||
| 51 | |||
| 52 | 2010-05-15 Ken Raeburn <raeburn@raeburn.org> | ||
| 53 | |||
| 54 | * configure.in: Look for version string in its new location. | ||
| 55 | |||
| 56 | 2010-05-15 Eli Zaretskii <eliz@gnu.org> | ||
| 57 | |||
| 58 | * config.bat: Remove support for DJGPP v1.x. | ||
| 59 | |||
| 60 | 2010-05-15 Glenn Morris <rgm@gnu.org> | ||
| 61 | |||
| 62 | * configure.in (OLDXMENU_TARGET): New output variable. | ||
| 63 | |||
| 64 | * Makefile.in (install-arch-dep): Update odd NS rule for Emacs version. | ||
| 65 | |||
| 66 | * Makefile.in (install-arch-indep): Remove references to RCS, CVS, | ||
| 67 | and other files that no longer exist. | ||
| 68 | |||
| 1 | 2010-05-14 Glenn Morris <rgm@gnu.org> | 69 | 2010-05-14 Glenn Morris <rgm@gnu.org> |
| 2 | 70 | ||
| 3 | * configure.in (cpp_undefs): Add mktime, register, X11. | 71 | * configure.in (cpp_undefs): Add mktime, register, X11. |
diff --git a/Makefile.in b/Makefile.in index 71d00243fed..cd677d3295d 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -164,7 +164,6 @@ VPATH=@srcdir@ | |||
| 164 | x_default_search_path=@x_default_search_path@ | 164 | x_default_search_path=@x_default_search_path@ |
| 165 | 165 | ||
| 166 | # Location to install Emacs.app under NeXT/Open/GNUstep / Cocoa | 166 | # Location to install Emacs.app under NeXT/Open/GNUstep / Cocoa |
| 167 | ns_appdir=@ns_appdir@ | ||
| 168 | ns_appbindir=@ns_appbindir@ | 167 | ns_appbindir=@ns_appbindir@ |
| 169 | ns_appresdir=@ns_appresdir@ | 168 | ns_appresdir=@ns_appresdir@ |
| 170 | 169 | ||
| @@ -336,9 +335,13 @@ src: Makefile FRC | |||
| 336 | CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ | 335 | CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ |
| 337 | LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot"; \ | 336 | LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot"; \ |
| 338 | fi; | 337 | fi; |
| 338 | if [ -r .bzr/checkout/dirstate ]; then \ | ||
| 339 | vcswitness="$$(pwd)/.bzr/checkout/dirstate"; \ | ||
| 340 | fi; \ | ||
| 339 | cd $@; $(MAKE) all $(MFLAGS) \ | 341 | cd $@; $(MAKE) all $(MFLAGS) \ |
| 340 | CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ | 342 | CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \ |
| 341 | LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="" | 343 | LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="" \ |
| 344 | VCSWITNESS="$$vcswitness" | ||
| 342 | 345 | ||
| 343 | blessmail: Makefile src FRC | 346 | blessmail: Makefile src FRC |
| 344 | cd lib-src; $(MAKE) maybe-blessmail $(MFLAGS) \ | 347 | cd lib-src; $(MAKE) maybe-blessmail $(MFLAGS) \ |
| @@ -370,7 +373,11 @@ $(srcdir)/configure: $(AUTOCONF_INPUTS) | |||
| 370 | cd ${srcdir} && autoconf | 373 | cd ${srcdir} && autoconf |
| 371 | 374 | ||
| 372 | $(srcdir)/src/config.in: $(srcdir)/src/stamp-h.in | 375 | $(srcdir)/src/config.in: $(srcdir)/src/stamp-h.in |
| 373 | @true | 376 | @ # Usually, there's no need to rebuild src/config.in just |
| 377 | @ # because stamp-h.in has changed (since building stamp-h.in | ||
| 378 | @ # refreshes config.in as well), but if config.in is missing | ||
| 379 | @ # then we really need to do something more. | ||
| 380 | [ -r "$@" ] || ( cd ${srcdir} && autoheader ) | ||
| 374 | $(srcdir)/src/stamp-h.in: $(AUTOCONF_INPUTS) | 381 | $(srcdir)/src/stamp-h.in: $(AUTOCONF_INPUTS) |
| 375 | cd ${srcdir} && autoheader | 382 | cd ${srcdir} && autoheader |
| 376 | rm -f $(srcdir)/src/stamp-h.in | 383 | rm -f $(srcdir)/src/stamp-h.in |
| @@ -418,17 +425,22 @@ install-arch-dep: mkdir | |||
| 418 | ${INSTALL_DATA} lib-src/$$f $(DESTDIR)${archlibdir}/$$f; \ | 425 | ${INSTALL_DATA} lib-src/$$f $(DESTDIR)${archlibdir}/$$f; \ |
| 419 | else true; fi ; \ | 426 | else true; fi ; \ |
| 420 | done | 427 | done |
| 421 | if test "${ns_appdir}" != ""; then \ | 428 | if test "${ns_appresdir}" != ""; then \ |
| 422 | ( cd ${ns_appresdir} ; \ | 429 | ( cd ${ns_appresdir} ; \ |
| 423 | if test -d share/emacs ; then dir=share/emacs/*/*; $(MV_DIRS); fi;\ | 430 | if test -d share/emacs ; then dir=share/emacs/*/*; $(MV_DIRS); fi;\ |
| 424 | if test -d share/info ; then dir=share/info; $(MV_DIRS) ; fi ; \ | 431 | if test -d share/info ; then dir=share/info; $(MV_DIRS) ; fi ; \ |
| 425 | rm -fr share ) ; \ | 432 | rm -fr share ) ; \ |
| 426 | ( cd ${ns_appbindir}/libexec ; dir=emacs/*/*/* ; $(MV_DIRS); \ | 433 | ( cd ${ns_appbindir}libexec ; dir=emacs/*/*/* ; $(MV_DIRS); \ |
| 427 | rm -fr emacs ) ; \ | 434 | rm -fr emacs ) ; \ |
| 428 | ( cd ${ns_appbindir}/bin ; rm -f emacs emacs-23* ; \ | 435 | ( cd ${ns_appbindir}bin ; rm -f emacs emacs-24* ; \ |
| 429 | ln -sf ../libexec/* .) ; \ | 436 | ln -sf ../libexec/* .) ; \ |
| 430 | else true ; fi | 437 | else true ; fi |
| 431 | 438 | ||
| 439 | ## FIXME is the emacs-24* bit above really necessary and correct? | ||
| 440 | ## What if I have 24.1 and 24.2 installed at the same time? | ||
| 441 | ## In any case, it should use something like echo $version | sed 's/\..*//' | ||
| 442 | ## instead of hard-coding a version. | ||
| 443 | |||
| 432 | ## http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg01672.html | 444 | ## http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg01672.html |
| 433 | ## Needs to be the user running install, so configure can't set it. | 445 | ## Needs to be the user running install, so configure can't set it. |
| 434 | set_installuser=for installuser in $${LOGNAME} $${USERNAME} $${USER} \ | 446 | set_installuser=for installuser in $${LOGNAME} $${USERNAME} $${USER} \ |
| @@ -476,11 +488,8 @@ install-arch-indep: mkdir info install-etc | |||
| 476 | | (cd $${dest}; umask 022; \ | 488 | | (cd $${dest}; umask 022; \ |
| 477 | tar -xvf - && cat > /dev/null) || exit 1; \ | 489 | tar -xvf - && cat > /dev/null) || exit 1; \ |
| 478 | find $${dest} -exec chown $${installuser} {} ';' ;\ | 490 | find $${dest} -exec chown $${installuser} {} ';' ;\ |
| 479 | for subdir in `find $${dest} -type d ! -name RCS ! -name CVS -print` ; do \ | 491 | for subdir in `find $${dest} -type d -print` ; do \ |
| 480 | chmod a+rx $${subdir} ; \ | 492 | chmod a+rx $${subdir} ; \ |
| 481 | rm -rf $${subdir}/RCS ; \ | ||
| 482 | rm -rf $${subdir}/CVS ; \ | ||
| 483 | rm -f $${subdir}/.cvsignore ; \ | ||
| 484 | rm -f $${subdir}/.gitignore ; \ | 493 | rm -f $${subdir}/.gitignore ; \ |
| 485 | rm -f $${subdir}/.arch-inventory ; \ | 494 | rm -f $${subdir}/.arch-inventory ; \ |
| 486 | rm -f $${subdir}/.DS_Store ; \ | 495 | rm -f $${subdir}/.DS_Store ; \ |
| @@ -492,7 +501,6 @@ install-arch-indep: mkdir info install-etc | |||
| 492 | rm -f $${subdir}/[mM]akefile*.c $${subdir}/[mM]akefile*[.-]in \ | 501 | rm -f $${subdir}/[mM]akefile*.c $${subdir}/[mM]akefile*[.-]in \ |
| 493 | $${subdir}/[mM]akefile ; \ | 502 | $${subdir}/[mM]akefile ; \ |
| 494 | rm -f $${subdir}/ChangeLog* ; \ | 503 | rm -f $${subdir}/ChangeLog* ; \ |
| 495 | rm -f $${subdir}/dired.todo ; \ | ||
| 496 | done) ; \ | 504 | done) ; \ |
| 497 | done | 505 | done |
| 498 | -rm -f $(DESTDIR)${lispdir}/subdirs.el | 506 | -rm -f $(DESTDIR)${lispdir}/subdirs.el |
diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES index 1f42eeb9528..cffbcf95e80 100644 --- a/admin/CPP-DEFINES +++ b/admin/CPP-DEFINES | |||
| @@ -22,6 +22,9 @@ NS_IMPL_GNUSTEP Compile support for GNUstep implementation of NS GUI API. | |||
| 22 | NS_IMPL_COCOA Compile support for Cocoa (Apple) implementation of NS GUI API. | 22 | NS_IMPL_COCOA Compile support for Cocoa (Apple) implementation of NS GUI API. |
| 23 | HAVE_X11 Compile support for the X11 GUI. | 23 | HAVE_X11 Compile support for the X11 GUI. |
| 24 | HAVE_X_WINDOWS Compile support for X Window system | 24 | HAVE_X_WINDOWS Compile support for X Window system |
| 25 | (It looks like, nowadays, if HAVE_X11 is set, HAVE_X_WINDOWS must | ||
| 26 | be, and vice versa. At least, this is true for configure, and | ||
| 27 | msdos; not sure about nt.) | ||
| 25 | USE_LUCID Use the Lucid toolkit for menus&scrollbars. Requires HAVE_X11. | 28 | USE_LUCID Use the Lucid toolkit for menus&scrollbars. Requires HAVE_X11. |
| 26 | USE_MOTIF Use the Motif toolkit for menus&scrollbars. Requires HAVE_X11. | 29 | USE_MOTIF Use the Motif toolkit for menus&scrollbars. Requires HAVE_X11. |
| 27 | USE_GTK Use the Gtk toolkit for menus&scrollbars. Requires HAVE_X11. | 30 | USE_GTK Use the Gtk toolkit for menus&scrollbars. Requires HAVE_X11. |
diff --git a/admin/ChangeLog b/admin/ChangeLog index 9ffdcd47d40..54be4a7fec3 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2010-05-15 Ken Raeburn <raeburn@raeburn.org> | ||
| 2 | |||
| 3 | * admin.el (set-version, set-copyright): Update emacs.c instead of | ||
| 4 | version.el. | ||
| 5 | |||
| 6 | * make-tarball.txt: Update filename list in step 6. | ||
| 7 | |||
| 8 | * quick-install-emacs: Scan emacs.c instead of version.el for | ||
| 9 | version string. | ||
| 10 | |||
| 1 | 2010-05-07 Chong Yidong <cyd@stupidchicken.com> | 11 | 2010-05-07 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 12 | ||
| 3 | * Version 23.2 released. | 13 | * Version 23.2 released. |
diff --git a/admin/admin.el b/admin/admin.el index 984f3649b2c..f2cf008f475 100644 --- a/admin/admin.el +++ b/admin/admin.el | |||
| @@ -60,8 +60,8 @@ Root must be the root of an Emacs source tree." | |||
| 60 | (interactive "DEmacs root directory: \nsVersion number: ") | 60 | (interactive "DEmacs root directory: \nsVersion number: ") |
| 61 | (unless (file-exists-p (expand-file-name "src/emacs.c" root)) | 61 | (unless (file-exists-p (expand-file-name "src/emacs.c" root)) |
| 62 | (error "%s doesn't seem to be the root of an Emacs source tree" root)) | 62 | (error "%s doesn't seem to be the root of an Emacs source tree" root)) |
| 63 | (set-version-in-file root "lisp/version.el" version | 63 | (set-version-in-file root "src/emacs.c" version |
| 64 | (rx (and "emacs-version" (0+ space) | 64 | (rx (and "emacs_version" (0+ (not (in ?\"))) |
| 65 | ?\" (submatch (1+ (not (in ?\")))) ?\"))) | 65 | ?\" (submatch (1+ (not (in ?\")))) ?\"))) |
| 66 | (set-version-in-file root "README" version | 66 | (set-version-in-file root "README" version |
| 67 | (rx (and "version" (1+ space) | 67 | (rx (and "version" (1+ space) |
| @@ -184,8 +184,8 @@ Root must be the root of an Emacs source tree." | |||
| 184 | (format-time-string "%Y"))))) | 184 | (format-time-string "%Y"))))) |
| 185 | (unless (file-exists-p (expand-file-name "src/emacs.c" root)) | 185 | (unless (file-exists-p (expand-file-name "src/emacs.c" root)) |
| 186 | (error "%s doesn't seem to be the root of an Emacs source tree" root)) | 186 | (error "%s doesn't seem to be the root of an Emacs source tree" root)) |
| 187 | (set-version-in-file root "lisp/version.el" copyright | 187 | (set-version-in-file root "src/emacs.c" copyright |
| 188 | (rx (and "emacs-copyright" (0+ space) | 188 | (rx (and "emacs_copyright" (0+ (not (in ?\"))) |
| 189 | ?\" (submatch (1+ (not (in ?\")))) ?\"))) | 189 | ?\" (submatch (1+ (not (in ?\")))) ?\"))) |
| 190 | (set-version-in-file root "lib-src/ebrowse.c" copyright | 190 | (set-version-in-file root "lib-src/ebrowse.c" copyright |
| 191 | (rx (and "emacs_copyright" (0+ (not (in ?\"))) | 191 | (rx (and "emacs_copyright" (0+ (not (in ?\"))) |
diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index 9979aa03ca6..f685dd5e50f 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt | |||
| @@ -31,7 +31,7 @@ For each step, check for possible errors. | |||
| 31 | make bootstrap | 31 | make bootstrap |
| 32 | 32 | ||
| 33 | 6. Commit configure, README, doc/emacs/emacs.texi, | 33 | 6. Commit configure, README, doc/emacs/emacs.texi, |
| 34 | doc/lispref/elisp.texi, etc/AUTHORS, lisp/version.el, nt/emacs.rc, | 34 | doc/lispref/elisp.texi, etc/AUTHORS, src/emacs.c, nt/emacs.rc, |
| 35 | and lisp/cus-edit.el (if modified). Copy lisp/loaddefs.el to | 35 | and lisp/cus-edit.el (if modified). Copy lisp/loaddefs.el to |
| 36 | lisp/ldefs-boot.el and commit lisp/ldefs-boot.el. For a release, | 36 | lisp/ldefs-boot.el and commit lisp/ldefs-boot.el. For a release, |
| 37 | also commit the ChangeLog files in all directories. | 37 | also commit the ChangeLog files in all directories. |
diff --git a/admin/notes/bzr b/admin/notes/bzr new file mode 100644 index 00000000000..c66cdd98a3c --- /dev/null +++ b/admin/notes/bzr | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | NOTES ON COMMITTING TO EMACS'S BAZAAR REPO -*- outline -*- | ||
| 2 | |||
| 3 | * Install changes only on one branch, let them get merged elsewhere if needed. | ||
| 4 | In particular, install bug-fixes only on the release branch (if there | ||
| 5 | is one) and let them get synced to the trunk; do not install them by | ||
| 6 | hand on the trunk as well. E.g. if there is an active "emacs-23" branch | ||
| 7 | and you have a bug-fix appropriate for the next Emacs-23.x release, | ||
| 8 | install it only on the emacs-23 branch, not on the trunk as well. | ||
| 9 | |||
| 10 | Installing things manually into more than one branch makes merges more | ||
| 11 | difficult. | ||
| 12 | |||
| 13 | http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01124.html | ||
| 14 | |||
| 15 | * Backporting a bug-fix from the trunk to a branch (e.g. "emacs-23"). | ||
| 16 | Label the commit as a backport, e.g. by starting the commit message with | ||
| 17 | "Backport:". This is helpful for the person merging the release branch | ||
| 18 | to the trunk. | ||
| 19 | |||
| 20 | http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00262.html | ||
| 21 | |||
| 22 | * Installing changes from your personal branches. | ||
| 23 | If your branch has only a single commit, or many different real | ||
| 24 | commits, it is fine to do a merge. If your branch has only a very | ||
| 25 | small number of "real" commits, but several "merge from trunks", it is | ||
| 26 | preferred that you take your branch's diff, apply it to the trunk, and | ||
| 27 | commit directly, not merge. This keeps the history cleaner. | ||
| 28 | |||
| 29 | In general, when working on some feature in a separate branch, it is | ||
| 30 | preferable not to merge from trunk until you are done with the | ||
| 31 | feature. Unless you really need some change that was done on the | ||
| 32 | trunk while you were developing on the branch, you don't really need | ||
| 33 | those merges; just merge once, when you are done with the feature, and | ||
| 34 | Bazaar will take care of the rest. Bazaar is much better in this than | ||
| 35 | CVS, so interim merges are unnecessary. | ||
| 36 | |||
| 37 | Or use shelves; or rebase; or do something else. See the thread for | ||
| 38 | yet another fun excursion into the exciting world of version control. | ||
| 39 | |||
| 40 | http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00086.html | ||
diff --git a/admin/quick-install-emacs b/admin/quick-install-emacs index b912ed4e3ff..d603d8fd0d6 100755 --- a/admin/quick-install-emacs +++ b/admin/quick-install-emacs | |||
| @@ -171,7 +171,7 @@ test x"$SRC" = x && { SRC="`get_config_var srcdir`" || exit 4 ; } | |||
| 171 | test x"$prefix" = x && { prefix="`get_config_var prefix`" || exit 4 ; } | 171 | test x"$prefix" = x && { prefix="`get_config_var prefix`" || exit 4 ; } |
| 172 | test x"$ARCH" = x && { ARCH="`get_config_var host`" || exit 4 ; } | 172 | test x"$ARCH" = x && { ARCH="`get_config_var host`" || exit 4 ; } |
| 173 | 173 | ||
| 174 | VERSION=`grep 'defconst[ ]*emacs-version' $SRC/lisp/version.el \ | 174 | VERSION=`grep 'char emacs_version' $SRC/src/emacs.c \ |
| 175 | | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` | 175 | | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` |
| 176 | 176 | ||
| 177 | DST_SHARE="$prefix/share/emacs/$VERSION" | 177 | DST_SHARE="$prefix/share/emacs/$VERSION" |
diff --git a/config.bat b/config.bat index 0482d4f15f0..20b8b285e59 100644 --- a/config.bat +++ b/config.bat | |||
| @@ -23,7 +23,7 @@ rem ---------------------------------------------------------------------- | |||
| 23 | rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS: | 23 | rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS: |
| 24 | rem | 24 | rem |
| 25 | rem + msdos version 3 or better. | 25 | rem + msdos version 3 or better. |
| 26 | rem + DJGPP version 1.12maint1 or later (version 2.03 or later recommended). | 26 | rem + DJGPP version 2.0 or later (version 2.03 or later recommended). |
| 27 | rem + make utility that allows breaking of the 128 chars limit on | 27 | rem + make utility that allows breaking of the 128 chars limit on |
| 28 | rem command lines. ndmake (as of version 4.5) won't work due to a | 28 | rem command lines. ndmake (as of version 4.5) won't work due to a |
| 29 | rem line length limit. The make that comes with DJGPP does work (and is | 29 | rem line length limit. The make that comes with DJGPP does work (and is |
| @@ -125,11 +125,10 @@ rm -f junk.c junk junk.exe | |||
| 125 | Echo To compile 'Emacs' under MS-DOS you MUST have DJGPP installed! | 125 | Echo To compile 'Emacs' under MS-DOS you MUST have DJGPP installed! |
| 126 | Goto End | 126 | Goto End |
| 127 | :go32Ok | 127 | :go32Ok |
| 128 | set djgpp_ver=1 | 128 | set djgpp_ver=2 |
| 129 | If ErrorLevel 20 set djgpp_ver=2 | 129 | If Not ErrorLevel 20 Echo To build 'Emacs' you need DJGPP v2.0 or later! |
| 130 | If Not ErrorLevel 20 Goto End | ||
| 130 | rm -f junk.c junk junk.exe | 131 | rm -f junk.c junk junk.exe |
| 131 | rem The v1.x build does not need djecho | ||
| 132 | if "%DJGPP_VER%" == "1" Goto djechoOk | ||
| 133 | rem DJECHO is used by the top-level Makefile in the v2.x build | 132 | rem DJECHO is used by the top-level Makefile in the v2.x build |
| 134 | Echo Checking whether 'djecho' is available... | 133 | Echo Checking whether 'djecho' is available... |
| 135 | redir -o Nul -eo djecho -o junk.$$$ foo | 134 | redir -o Nul -eo djecho -o junk.$$$ foo |
| @@ -159,12 +158,7 @@ sed -e '' config.in > config.tmp | |||
| 159 | if "%X11%" == "" goto src4 | 158 | if "%X11%" == "" goto src4 |
| 160 | sed -f ../msdos/sed2x.inp <config.in >config.tmp | 159 | sed -f ../msdos/sed2x.inp <config.in >config.tmp |
| 161 | :src4 | 160 | :src4 |
| 162 | if "%DJGPP_VER%" == "2" Goto src41 | ||
| 163 | sed -f ../msdos/sed2.inp <config.tmp >config.h2 | ||
| 164 | goto src42 | ||
| 165 | :src41 | ||
| 166 | sed -f ../msdos/sed2v2.inp <config.tmp >config.h2 | 161 | sed -f ../msdos/sed2v2.inp <config.tmp >config.h2 |
| 167 | :src42 | ||
| 168 | Rem See if DECL_ALIGN can be supported with this GCC | 162 | Rem See if DECL_ALIGN can be supported with this GCC |
| 169 | rm -f junk.c junk.o junk junk.exe | 163 | rm -f junk.c junk.o junk junk.exe |
| 170 | echo struct { int i; char *p; } __attribute__((__aligned__(8))) foo; >junk.c | 164 | echo struct { int i; char *p; } __attribute__((__aligned__(8))) foo; >junk.c |
| @@ -198,12 +192,7 @@ if exist dir.h ren dir.h vmsdir.h | |||
| 198 | rem Create "makefile" from "makefile.in". | 192 | rem Create "makefile" from "makefile.in". |
| 199 | rm -f Makefile junk.c | 193 | rm -f Makefile junk.c |
| 200 | sed -e "1,/== start of cpp stuff ==/s@^##*[ ].*$@@" <Makefile.in >junk.c | 194 | sed -e "1,/== start of cpp stuff ==/s@^##*[ ].*$@@" <Makefile.in >junk.c |
| 201 | If "%DJGPP_VER%" == "1" Goto mfV1 | ||
| 202 | gcc -E -traditional junk.c | sed -f ../msdos/sed1v2.inp >Makefile | 195 | gcc -E -traditional junk.c | sed -f ../msdos/sed1v2.inp >Makefile |
| 203 | goto mfDone | ||
| 204 | :mfV1 | ||
| 205 | gcc -E -traditional junk.c | sed -f ../msdos/sed1.inp >Makefile | ||
| 206 | :mfDone | ||
| 207 | rm -f junk.c | 196 | rm -f junk.c |
| 208 | 197 | ||
| 209 | if "%X11%" == "" goto src5 | 198 | if "%X11%" == "" goto src5 |
| @@ -212,6 +201,13 @@ sed -f ../msdos/sed1x.inp <makefile.tmp >Makefile | |||
| 212 | rm -f makefile.tmp | 201 | rm -f makefile.tmp |
| 213 | :src5 | 202 | :src5 |
| 214 | 203 | ||
| 204 | if "%sys_malloc%" == "" goto src5a | ||
| 205 | sed -e "/^GMALLOC_OBJ *=/s/gmalloc.o//" <Makefile >makefile.tmp | ||
| 206 | sed -e "/^VMLIMIT_OBJ *=/s/vm-limit.o//" <makefile.tmp >makefile.tmp2 | ||
| 207 | sed -e "/^RALLOC_OBJ *=/s/ralloc.o//" <makefile.tmp2 >Makefile | ||
| 208 | rm -f makefile.tmp makefile.tmp2 | ||
| 209 | :src5a | ||
| 210 | |||
| 215 | if "%nodebug%" == "" goto src6 | 211 | if "%nodebug%" == "" goto src6 |
| 216 | sed -e "/^CFLAGS *=/s/ *-gcoff//" <Makefile >makefile.tmp | 212 | sed -e "/^CFLAGS *=/s/ *-gcoff//" <Makefile >makefile.tmp |
| 217 | sed -e "/^LDFLAGS *=/s/=/=-s/" <makefile.tmp >Makefile | 213 | sed -e "/^LDFLAGS *=/s/=/=-s/" <makefile.tmp >Makefile |
| @@ -221,12 +217,7 @@ cd .. | |||
| 221 | rem ---------------------------------------------------------------------- | 217 | rem ---------------------------------------------------------------------- |
| 222 | Echo Configuring the library source directory... | 218 | Echo Configuring the library source directory... |
| 223 | cd lib-src | 219 | cd lib-src |
| 224 | If "%DJGPP_VER%" == "2" goto libsrc-v2 | ||
| 225 | sed -f ../msdos/sed3.inp <Makefile.in >Makefile | ||
| 226 | Goto libsrc2 | ||
| 227 | :libsrc-v2 | ||
| 228 | sed -f ../msdos/sed3v2.inp <Makefile.in >Makefile | 220 | sed -f ../msdos/sed3v2.inp <Makefile.in >Makefile |
| 229 | :libsrc2 | ||
| 230 | if "%X11%" == "" goto libsrc2a | 221 | if "%X11%" == "" goto libsrc2a |
| 231 | mv Makefile makefile.tmp | 222 | mv Makefile makefile.tmp |
| 232 | sed -f ../msdos/sed3x.inp <makefile.tmp >Makefile | 223 | sed -f ../msdos/sed3x.inp <makefile.tmp >Makefile |
| @@ -272,7 +263,6 @@ rem ---------------------------------------------------------------------- | |||
| 272 | Echo Configuring the main directory... | 263 | Echo Configuring the main directory... |
| 273 | If Exist .dir-locals.el update .dir-locals.el _dir-locals.el | 264 | If Exist .dir-locals.el update .dir-locals.el _dir-locals.el |
| 274 | If Exist src\.dbxinit update src/.dbxinit src/_dbxinit | 265 | If Exist src\.dbxinit update src/.dbxinit src/_dbxinit |
| 275 | If "%DJGPP_VER%" == "1" goto mainv1 | ||
| 276 | Echo Looking for the GDB init file... | 266 | Echo Looking for the GDB init file... |
| 277 | If Exist src\.gdbinit update src/.gdbinit src/_gdbinit | 267 | If Exist src\.gdbinit update src/.gdbinit src/_gdbinit |
| 278 | If Exist src\_gdbinit goto gdbinitOk | 268 | If Exist src\_gdbinit goto gdbinitOk |
| @@ -287,8 +277,6 @@ goto End | |||
| 287 | :gdbinitOk | 277 | :gdbinitOk |
| 288 | Echo Looking for the GDB init file...found | 278 | Echo Looking for the GDB init file...found |
| 289 | copy msdos\mainmake.v2 Makefile >nul | 279 | copy msdos\mainmake.v2 Makefile >nul |
| 290 | :mainv1 | ||
| 291 | If "%DJGPP_VER%" == "1" copy msdos\mainmake Makefile >nul | ||
| 292 | rem ---------------------------------------------------------------------- | 280 | rem ---------------------------------------------------------------------- |
| 293 | goto End | 281 | goto End |
| 294 | :SmallEnv | 282 | :SmallEnv |
| @@ -718,10 +718,14 @@ XMKMF | |||
| 718 | LD_SWITCH_X_SITE_AUX | 718 | LD_SWITCH_X_SITE_AUX |
| 719 | LD_SWITCH_X_SITE_AUX_RPATH | 719 | LD_SWITCH_X_SITE_AUX_RPATH |
| 720 | NS_IMPL_GNUSTEP_INC | 720 | NS_IMPL_GNUSTEP_INC |
| 721 | NS_IMPL_GNUSTEP_TEMACS_LDFLAGS | ||
| 722 | TEMACS_LDFLAGS2 | ||
| 721 | NS_OBJ | 723 | NS_OBJ |
| 722 | NS_SUPPORT | 724 | NS_SUPPORT |
| 723 | LIB_STANDARD | 725 | LIB_STANDARD |
| 724 | HAVE_XSERVER | 726 | HAVE_XSERVER |
| 727 | GMALLOC_OBJ | ||
| 728 | VMLIMIT_OBJ | ||
| 725 | RSVG_CFLAGS | 729 | RSVG_CFLAGS |
| 726 | RSVG_LIBS | 730 | RSVG_LIBS |
| 727 | GTK_CFLAGS | 731 | GTK_CFLAGS |
| @@ -743,7 +747,6 @@ LIBOTF_CFLAGS | |||
| 743 | LIBOTF_LIBS | 747 | LIBOTF_LIBS |
| 744 | M17N_FLT_CFLAGS | 748 | M17N_FLT_CFLAGS |
| 745 | M17N_FLT_LIBS | 749 | M17N_FLT_LIBS |
| 746 | FONT_OBJ | ||
| 747 | FREETYPE_CFLAGS | 750 | FREETYPE_CFLAGS |
| 748 | FREETYPE_LIBS | 751 | FREETYPE_LIBS |
| 749 | LIBXPM | 752 | LIBXPM |
| @@ -796,18 +799,20 @@ ns_appdir | |||
| 796 | ns_appbindir | 799 | ns_appbindir |
| 797 | ns_appresdir | 800 | ns_appresdir |
| 798 | ns_appsrc | 801 | ns_appsrc |
| 799 | GNUSTEP_SYSTEM_HEADERS | ||
| 800 | GNUSTEP_SYSTEM_LIBRARIES | ||
| 801 | GNU_OBJC_CFLAGS | 802 | GNU_OBJC_CFLAGS |
| 802 | OTHER_FILES | 803 | OTHER_FILES |
| 804 | FONT_OBJ | ||
| 803 | XMENU_OBJ | 805 | XMENU_OBJ |
| 804 | XOBJ | 806 | XOBJ |
| 805 | WIDGET_OBJ | 807 | WIDGET_OBJ |
| 806 | TOOLKIT_LIBW | 808 | TOOLKIT_LIBW |
| 807 | LIBXT_OTHER | 809 | LIBXT_OTHER |
| 810 | OLDXMENU_TARGET | ||
| 808 | OLDXMENU | 811 | OLDXMENU |
| 809 | LIBXMENU | 812 | LIBXMENU |
| 810 | LIBX_OTHER | 813 | LIBX_OTHER |
| 814 | OLDXMENU_DEPS | ||
| 815 | RALLOC_OBJ | ||
| 811 | CYGWIN_OBJ | 816 | CYGWIN_OBJ |
| 812 | PRE_ALLOC_OBJ | 817 | PRE_ALLOC_OBJ |
| 813 | POST_ALLOC_OBJ | 818 | POST_ALLOC_OBJ |
| @@ -9932,22 +9937,24 @@ HAVE_NS=no | |||
| 9932 | NS_IMPL_COCOA=no | 9937 | NS_IMPL_COCOA=no |
| 9933 | NS_IMPL_GNUSTEP=no | 9938 | NS_IMPL_GNUSTEP=no |
| 9934 | NS_IMPL_GNUSTEP_INC= | 9939 | NS_IMPL_GNUSTEP_INC= |
| 9940 | NS_IMPL_GNUSTEP_TEMACS_LDFLAGS= | ||
| 9935 | tmp_CPPFLAGS="$CPPFLAGS" | 9941 | tmp_CPPFLAGS="$CPPFLAGS" |
| 9936 | tmp_CFLAGS="$CFLAGS" | 9942 | tmp_CFLAGS="$CFLAGS" |
| 9937 | CPPFLAGS="$CPPFLAGS -x objective-c" | 9943 | CPPFLAGS="$CPPFLAGS -x objective-c" |
| 9938 | CFLAGS="$CFLAGS -x objective-c" | 9944 | CFLAGS="$CFLAGS -x objective-c" |
| 9945 | TEMACS_LDFLAGS2="\${LDFLAGS}" | ||
| 9939 | if test "${with_ns}" != no; then | 9946 | if test "${with_ns}" != no; then |
| 9940 | if test "${opsys}" = darwin; then | 9947 | if test "${opsys}" = darwin; then |
| 9941 | NS_IMPL_COCOA=yes | 9948 | NS_IMPL_COCOA=yes |
| 9942 | ns_appdir=`pwd`/nextstep/Emacs.app | 9949 | ns_appdir=`pwd`/nextstep/Emacs.app/ |
| 9943 | ns_appbindir=`pwd`/nextstep/Emacs.app/Contents/MacOS | 9950 | ns_appbindir=${ns_appdir}Contents/MacOS/ |
| 9944 | ns_appresdir=`pwd`/nextstep/Emacs.app/Contents/Resources | 9951 | ns_appresdir=${ns_appdir}Contents/Resources |
| 9945 | ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base | 9952 | ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base |
| 9946 | elif test -f $GNUSTEP_CONFIG_FILE; then | 9953 | elif test -f $GNUSTEP_CONFIG_FILE; then |
| 9947 | NS_IMPL_GNUSTEP=yes | 9954 | NS_IMPL_GNUSTEP=yes |
| 9948 | ns_appdir=`pwd`/nextstep/Emacs.app | 9955 | ns_appdir=`pwd`/nextstep/Emacs.app/ |
| 9949 | ns_appbindir=`pwd`/nextstep/Emacs.app | 9956 | ns_appbindir=${ns_appdir} |
| 9950 | ns_appresdir=`pwd`/nextstep/Emacs.app/Resources | 9957 | ns_appresdir=${ns_appdir}Resources |
| 9951 | ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base | 9958 | ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base |
| 9952 | GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)" | 9959 | GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)" |
| 9953 | GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" | 9960 | GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" |
| @@ -9959,11 +9966,14 @@ include $GNUSTEP_MAKEFILES/Additional/base.make | |||
| 9959 | include $GNUSTEP_MAKEFILES/Additional/gui.make | 9966 | include $GNUSTEP_MAKEFILES/Additional/gui.make |
| 9960 | shared=no | 9967 | shared=no |
| 9961 | " | 9968 | " |
| 9969 | NS_IMPL_GNUSTEP_TEMACS_LDFLAGS="-L${GNUSTEP_SYSTEM_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc \${CONFIG_SYSTEM_LIBS} -lpthread" | ||
| 9962 | CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" | 9970 | CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" |
| 9963 | CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" | 9971 | CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" |
| 9964 | REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" | 9972 | REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" |
| 9965 | LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}" | 9973 | LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}" |
| 9966 | LIB_STANDARD= | 9974 | LIB_STANDARD= |
| 9975 | START_FILES= | ||
| 9976 | TEMACS_LDFLAGS2= | ||
| 9967 | fi | 9977 | fi |
| 9968 | if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then | 9978 | if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then |
| 9969 | { $as_echo "$as_me:$LINENO: checking for AppKit/AppKit.h" >&5 | 9979 | { $as_echo "$as_me:$LINENO: checking for AppKit/AppKit.h" >&5 |
| @@ -10152,6 +10162,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |||
| 10152 | fi | 10162 | fi |
| 10153 | 10163 | ||
| 10154 | 10164 | ||
| 10165 | |||
| 10166 | |||
| 10155 | NS_OBJ= | 10167 | NS_OBJ= |
| 10156 | NS_SUPPORT= | 10168 | NS_SUPPORT= |
| 10157 | if test "${HAVE_NS}" = yes; then | 10169 | if test "${HAVE_NS}" = yes; then |
| @@ -10504,11 +10516,20 @@ $as_echo "$emacs_cv_var___after_morecore_hook" >&6; } | |||
| 10504 | if test $emacs_cv_var___after_morecore_hook = no; then | 10516 | if test $emacs_cv_var___after_morecore_hook = no; then |
| 10505 | doug_lea_malloc=no | 10517 | doug_lea_malloc=no |
| 10506 | fi | 10518 | fi |
| 10519 | |||
| 10507 | if test "${system_malloc}" = "yes"; then | 10520 | if test "${system_malloc}" = "yes"; then |
| 10508 | GNU_MALLOC=no | 10521 | GNU_MALLOC=no |
| 10509 | GNU_MALLOC_reason=" | 10522 | GNU_MALLOC_reason=" |
| 10510 | (The GNU allocators don't work with this system configuration.)" | 10523 | (The GNU allocators don't work with this system configuration.)" |
| 10524 | GMALLOC_OBJ= | ||
| 10525 | VMLIMIT_OBJ= | ||
| 10526 | else | ||
| 10527 | test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o | ||
| 10528 | VMLIMIT_OBJ=vm-limit.o | ||
| 10511 | fi | 10529 | fi |
| 10530 | |||
| 10531 | |||
| 10532 | |||
| 10512 | if test "$doug_lea_malloc" = "yes" ; then | 10533 | if test "$doug_lea_malloc" = "yes" ; then |
| 10513 | if test "$GNU_MALLOC" = yes ; then | 10534 | if test "$GNU_MALLOC" = yes ; then |
| 10514 | GNU_MALLOC_reason=" | 10535 | GNU_MALLOC_reason=" |
| @@ -10519,6 +10540,14 @@ cat >>confdefs.h <<\_ACEOF | |||
| 10519 | #define DOUG_LEA_MALLOC 1 | 10540 | #define DOUG_LEA_MALLOC 1 |
| 10520 | _ACEOF | 10541 | _ACEOF |
| 10521 | 10542 | ||
| 10543 | |||
| 10544 | ## Use mmap directly for allocating larger buffers. | ||
| 10545 | ## FIXME this comes from src/s/{gnu,gnu-linux}.h: | ||
| 10546 | ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif | ||
| 10547 | ## Does the AC_FUNC_MMAP test below make this check unecessary? | ||
| 10548 | case "$opsys" in | ||
| 10549 | gnu*) REL_ALLOC=no ;; | ||
| 10550 | esac | ||
| 10522 | fi | 10551 | fi |
| 10523 | 10552 | ||
| 10524 | if test x"${REL_ALLOC}" = x; then | 10553 | if test x"${REL_ALLOC}" = x; then |
| @@ -14701,14 +14730,6 @@ else | |||
| 14701 | HAVE_M17N_FLT=no | 14730 | HAVE_M17N_FLT=no |
| 14702 | fi | 14731 | fi |
| 14703 | 14732 | ||
| 14704 | FONT_OBJ=xfont.o | ||
| 14705 | if test "$HAVE_XFT" = "yes"; then | ||
| 14706 | FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" | ||
| 14707 | elif test "$HAVE_FREETYPE" = "yes"; then | ||
| 14708 | FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o" | ||
| 14709 | fi | ||
| 14710 | |||
| 14711 | |||
| 14712 | ### End of font-backend (under X11) section. | 14733 | ### End of font-backend (under X11) section. |
| 14713 | 14734 | ||
| 14714 | 14735 | ||
| @@ -21601,7 +21622,7 @@ HAVE_LIBNCURSES=yes | |||
| 21601 | 21622 | ||
| 21602 | ## Use terminfo instead of termcap? | 21623 | ## Use terminfo instead of termcap? |
| 21603 | ## Note only system files NOT using terminfo are: | 21624 | ## Note only system files NOT using terminfo are: |
| 21604 | ## bsd-common, freebsd < 40000, ms-w32, msdos, netbsd, and | 21625 | ## freebsd < 40000, ms-w32, msdos, netbsd, and |
| 21605 | ## darwin|gnu without ncurses. | 21626 | ## darwin|gnu without ncurses. |
| 21606 | TERMINFO=no | 21627 | TERMINFO=no |
| 21607 | LIBS_TERMCAP= | 21628 | LIBS_TERMCAP= |
| @@ -21610,7 +21631,7 @@ case "$opsys" in | |||
| 21610 | ## hpux10-20: Use the system provided termcap(3) library. | 21631 | ## hpux10-20: Use the system provided termcap(3) library. |
| 21611 | ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this | 21632 | ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this |
| 21612 | ## is necessary. Otherwise Emacs dumps core when run -nw. | 21633 | ## is necessary. Otherwise Emacs dumps core when run -nw. |
| 21613 | aix4-2|cygwin|hpux*|irix6-5|openbsd|usg5-4|sol2*|unixware) TERMINFO=yes ;; | 21634 | aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;; |
| 21614 | 21635 | ||
| 21615 | ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. | 21636 | ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. |
| 21616 | ## The ncurses library has been moved out of the System framework in | 21637 | ## The ncurses library has been moved out of the System framework in |
| @@ -26308,16 +26329,16 @@ $as_echo "$as_me: error: GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEM | |||
| 26308 | fi | 26329 | fi |
| 26309 | 26330 | ||
| 26310 | #### Find out which version of Emacs this is. | 26331 | #### Find out which version of Emacs this is. |
| 26311 | version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \ | 26332 | version=`grep 'const char emacs_version' ${srcdir}/src/emacs.c \ |
| 26312 | | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` | 26333 | | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` |
| 26313 | if test x"${version}" = x; then | 26334 | if test x"${version}" = x; then |
| 26314 | { { $as_echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5 | 26335 | { { $as_echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/src/emacs.c'." >&5 |
| 26315 | $as_echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;} | 26336 | $as_echo "$as_me: error: can't find current emacs version in \`${srcdir}/src/emacs.c'." >&2;} |
| 26316 | { (exit 1); exit 1; }; } | 26337 | { (exit 1); exit 1; }; } |
| 26317 | fi | 26338 | fi |
| 26318 | if test x"${version}" != x"$PACKAGE_VERSION"; then | 26339 | if test x"${version}" != x"$PACKAGE_VERSION"; then |
| 26319 | { $as_echo "$as_me:$LINENO: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/lisp/version.el'." >&5 | 26340 | { $as_echo "$as_me:$LINENO: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&5 |
| 26320 | $as_echo "$as_me: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/lisp/version.el'." >&2;} | 26341 | $as_echo "$as_me: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&2;} |
| 26321 | fi | 26342 | fi |
| 26322 | 26343 | ||
| 26323 | ### Specify what sort of things we'll be editing into Makefile and config.h. | 26344 | ### Specify what sort of things we'll be editing into Makefile and config.h. |
| @@ -26366,8 +26387,6 @@ fi | |||
| 26366 | 26387 | ||
| 26367 | 26388 | ||
| 26368 | 26389 | ||
| 26369 | |||
| 26370 | |||
| 26371 | cat >>confdefs.h <<_ACEOF | 26390 | cat >>confdefs.h <<_ACEOF |
| 26372 | #define EMACS_CONFIGURATION "${canonical}" | 26391 | #define EMACS_CONFIGURATION "${canonical}" |
| 26373 | _ACEOF | 26392 | _ACEOF |
| @@ -26390,6 +26409,7 @@ _ACEOF | |||
| 26390 | 26409 | ||
| 26391 | XMENU_OBJ= | 26410 | XMENU_OBJ= |
| 26392 | XOBJ= | 26411 | XOBJ= |
| 26412 | FONT_OBJ= | ||
| 26393 | if test "${HAVE_X_WINDOWS}" = "yes" ; then | 26413 | if test "${HAVE_X_WINDOWS}" = "yes" ; then |
| 26394 | 26414 | ||
| 26395 | cat >>confdefs.h <<\_ACEOF | 26415 | cat >>confdefs.h <<\_ACEOF |
| @@ -26398,10 +26418,18 @@ _ACEOF | |||
| 26398 | 26418 | ||
| 26399 | XMENU_OBJ=xmenu.o | 26419 | XMENU_OBJ=xmenu.o |
| 26400 | XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o" | 26420 | XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o" |
| 26421 | FONT_OBJ=xfont.o | ||
| 26422 | if test "$HAVE_XFT" = "yes"; then | ||
| 26423 | FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" | ||
| 26424 | elif test "$HAVE_FREETYPE" = "yes"; then | ||
| 26425 | FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o" | ||
| 26426 | fi | ||
| 26427 | |||
| 26401 | fi | 26428 | fi |
| 26402 | 26429 | ||
| 26403 | 26430 | ||
| 26404 | 26431 | ||
| 26432 | |||
| 26405 | WIDGET_OBJ= | 26433 | WIDGET_OBJ= |
| 26406 | MOTIF_LIBW= | 26434 | MOTIF_LIBW= |
| 26407 | if test "${USE_X_TOOLKIT}" != "none" ; then | 26435 | if test "${USE_X_TOOLKIT}" != "none" ; then |
| @@ -26456,11 +26484,14 @@ esac | |||
| 26456 | 26484 | ||
| 26457 | if test "$USE_X_TOOLKIT" = "none"; then | 26485 | if test "$USE_X_TOOLKIT" = "none"; then |
| 26458 | LIBXT_OTHER="\$(LIBXSM)" | 26486 | LIBXT_OTHER="\$(LIBXSM)" |
| 26487 | OLDXMENU_TARGET="really-oldXMenu" | ||
| 26459 | else | 26488 | else |
| 26460 | LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" | 26489 | LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" |
| 26490 | OLDXMENU_TARGET="really-lwlib" | ||
| 26461 | fi | 26491 | fi |
| 26462 | 26492 | ||
| 26463 | 26493 | ||
| 26494 | |||
| 26464 | ## The X Menu stuff is present in the X10 distribution, but missing | 26495 | ## The X Menu stuff is present in the X10 distribution, but missing |
| 26465 | ## from X11. If we have X10, just use the installed library; | 26496 | ## from X11. If we have X10, just use the installed library; |
| 26466 | ## otherwise, use our own copy. | 26497 | ## otherwise, use our own copy. |
| @@ -26478,21 +26509,30 @@ _ACEOF | |||
| 26478 | fi | 26509 | fi |
| 26479 | LIBXMENU="\$(OLDXMENU)" | 26510 | LIBXMENU="\$(OLDXMENU)" |
| 26480 | LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" | 26511 | LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" |
| 26512 | OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}" | ||
| 26481 | else | 26513 | else |
| 26482 | OLDXMENU= | 26514 | OLDXMENU= |
| 26483 | LIBXMENU="-lXMenu" | 26515 | ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?). |
| 26516 | if test "${HAVE_X_WINDOWS}" = "yes"; then | ||
| 26517 | LIBXMENU="-lXMenu" | ||
| 26518 | else | ||
| 26519 | LIBXMENU= | ||
| 26520 | fi | ||
| 26484 | LIBX_OTHER= | 26521 | LIBX_OTHER= |
| 26522 | OLDXMENU_DEPS= | ||
| 26485 | fi | 26523 | fi |
| 26486 | 26524 | ||
| 26487 | if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then | 26525 | if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then |
| 26488 | OLDXMENU= | 26526 | OLDXMENU= |
| 26489 | LIBXMENU= | 26527 | LIBXMENU= |
| 26528 | OLDXMENU_DEPS= | ||
| 26490 | fi | 26529 | fi |
| 26491 | 26530 | ||
| 26492 | 26531 | ||
| 26493 | 26532 | ||
| 26494 | 26533 | ||
| 26495 | 26534 | ||
| 26535 | |||
| 26496 | if test "${HAVE_MENUS}" = "yes" ; then | 26536 | if test "${HAVE_MENUS}" = "yes" ; then |
| 26497 | 26537 | ||
| 26498 | cat >>confdefs.h <<\_ACEOF | 26538 | cat >>confdefs.h <<\_ACEOF |
| @@ -26500,6 +26540,7 @@ cat >>confdefs.h <<\_ACEOF | |||
| 26500 | _ACEOF | 26540 | _ACEOF |
| 26501 | 26541 | ||
| 26502 | fi | 26542 | fi |
| 26543 | |||
| 26503 | if test "${GNU_MALLOC}" = "yes" ; then | 26544 | if test "${GNU_MALLOC}" = "yes" ; then |
| 26504 | 26545 | ||
| 26505 | cat >>confdefs.h <<\_ACEOF | 26546 | cat >>confdefs.h <<\_ACEOF |
| @@ -26507,12 +26548,16 @@ cat >>confdefs.h <<\_ACEOF | |||
| 26507 | _ACEOF | 26548 | _ACEOF |
| 26508 | 26549 | ||
| 26509 | fi | 26550 | fi |
| 26551 | |||
| 26552 | RALLOC_OBJ= | ||
| 26510 | if test "${REL_ALLOC}" = "yes" ; then | 26553 | if test "${REL_ALLOC}" = "yes" ; then |
| 26511 | 26554 | ||
| 26512 | cat >>confdefs.h <<\_ACEOF | 26555 | cat >>confdefs.h <<\_ACEOF |
| 26513 | #define REL_ALLOC 1 | 26556 | #define REL_ALLOC 1 |
| 26514 | _ACEOF | 26557 | _ACEOF |
| 26515 | 26558 | ||
| 26559 | |||
| 26560 | test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o | ||
| 26516 | fi | 26561 | fi |
| 26517 | 26562 | ||
| 26518 | 26563 | ||
| @@ -26520,11 +26565,11 @@ if test "$opsys" = "cygwin"; then | |||
| 26520 | CYGWIN_OBJ="sheap.o" | 26565 | CYGWIN_OBJ="sheap.o" |
| 26521 | ## Cygwin differs because of its unexec(). | 26566 | ## Cygwin differs because of its unexec(). |
| 26522 | PRE_ALLOC_OBJ= | 26567 | PRE_ALLOC_OBJ= |
| 26523 | POST_ALLOC_OBJ="lastfile.o vm-limit.o" | 26568 | POST_ALLOC_OBJ=lastfile.o |
| 26524 | else | 26569 | else |
| 26525 | CYGWIN_OBJ= | 26570 | CYGWIN_OBJ= |
| 26526 | PRE_ALLOC_OBJ=lastfile.o | 26571 | PRE_ALLOC_OBJ=lastfile.o |
| 26527 | POST_ALLOC_OBJ="\$(vmlimitobj)" | 26572 | POST_ALLOC_OBJ= |
| 26528 | fi | 26573 | fi |
| 26529 | 26574 | ||
| 26530 | 26575 | ||
| @@ -26722,6 +26767,9 @@ test "${exec_prefix}" != NONE && | |||
| 26722 | # the C preprocessor to some helpful value like 1, or maybe the empty | 26767 | # the C preprocessor to some helpful value like 1, or maybe the empty |
| 26723 | # string. Needless to say consequent macro substitutions are less | 26768 | # string. Needless to say consequent macro substitutions are less |
| 26724 | # than conducive to the makefile finding the correct directory. | 26769 | # than conducive to the makefile finding the correct directory. |
| 26770 | # src/Makefile.in used to treat X11 as equivalent to HAVE_X11. | ||
| 26771 | # But nothing in Emacs defines X11, and everywhere else uses HAVE_X11, | ||
| 26772 | # so that cannot have been doing anything. | ||
| 26725 | cpp_undefs="`echo $srcdir $configuration $canonical unix mktime register X11 | | 26773 | cpp_undefs="`echo $srcdir $configuration $canonical unix mktime register X11 | |
| 26726 | sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \ | 26774 | sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \ |
| 26727 | -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`" | 26775 | -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`" |
diff --git a/configure.in b/configure.in index 2475caae053..57fb0548f53 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -1453,22 +1453,27 @@ HAVE_NS=no | |||
| 1453 | NS_IMPL_COCOA=no | 1453 | NS_IMPL_COCOA=no |
| 1454 | NS_IMPL_GNUSTEP=no | 1454 | NS_IMPL_GNUSTEP=no |
| 1455 | NS_IMPL_GNUSTEP_INC= | 1455 | NS_IMPL_GNUSTEP_INC= |
| 1456 | NS_IMPL_GNUSTEP_TEMACS_LDFLAGS= | ||
| 1456 | tmp_CPPFLAGS="$CPPFLAGS" | 1457 | tmp_CPPFLAGS="$CPPFLAGS" |
| 1457 | tmp_CFLAGS="$CFLAGS" | 1458 | tmp_CFLAGS="$CFLAGS" |
| 1458 | CPPFLAGS="$CPPFLAGS -x objective-c" | 1459 | CPPFLAGS="$CPPFLAGS -x objective-c" |
| 1459 | CFLAGS="$CFLAGS -x objective-c" | 1460 | CFLAGS="$CFLAGS -x objective-c" |
| 1461 | TEMACS_LDFLAGS2="\${LDFLAGS}" | ||
| 1462 | dnl I don't think it's especially important, but src/Makefile.in | ||
| 1463 | dnl (now the only user of ns_appdir) used to go to the trouble of adding a | ||
| 1464 | dnl trailing "/" to it, so now we do it here. | ||
| 1460 | if test "${with_ns}" != no; then | 1465 | if test "${with_ns}" != no; then |
| 1461 | if test "${opsys}" = darwin; then | 1466 | if test "${opsys}" = darwin; then |
| 1462 | NS_IMPL_COCOA=yes | 1467 | NS_IMPL_COCOA=yes |
| 1463 | ns_appdir=`pwd`/nextstep/Emacs.app | 1468 | ns_appdir=`pwd`/nextstep/Emacs.app/ |
| 1464 | ns_appbindir=`pwd`/nextstep/Emacs.app/Contents/MacOS | 1469 | ns_appbindir=${ns_appdir}Contents/MacOS/ |
| 1465 | ns_appresdir=`pwd`/nextstep/Emacs.app/Contents/Resources | 1470 | ns_appresdir=${ns_appdir}Contents/Resources |
| 1466 | ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base | 1471 | ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base |
| 1467 | elif test -f $GNUSTEP_CONFIG_FILE; then | 1472 | elif test -f $GNUSTEP_CONFIG_FILE; then |
| 1468 | NS_IMPL_GNUSTEP=yes | 1473 | NS_IMPL_GNUSTEP=yes |
| 1469 | ns_appdir=`pwd`/nextstep/Emacs.app | 1474 | ns_appdir=`pwd`/nextstep/Emacs.app/ |
| 1470 | ns_appbindir=`pwd`/nextstep/Emacs.app | 1475 | ns_appbindir=${ns_appdir} |
| 1471 | ns_appresdir=`pwd`/nextstep/Emacs.app/Resources | 1476 | ns_appresdir=${ns_appdir}Resources |
| 1472 | ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base | 1477 | ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base |
| 1473 | dnl FIXME sourcing this 3 times in subshells seems inefficient. | 1478 | dnl FIXME sourcing this 3 times in subshells seems inefficient. |
| 1474 | GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)" | 1479 | GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)" |
| @@ -1481,11 +1486,15 @@ include $GNUSTEP_MAKEFILES/Additional/base.make | |||
| 1481 | include $GNUSTEP_MAKEFILES/Additional/gui.make | 1486 | include $GNUSTEP_MAKEFILES/Additional/gui.make |
| 1482 | shared=no | 1487 | shared=no |
| 1483 | " | 1488 | " |
| 1489 | dnl Presumably ${CONFIG_SYSTEM_LIBS} is defined by above includes. | ||
| 1490 | NS_IMPL_GNUSTEP_TEMACS_LDFLAGS="-L${GNUSTEP_SYSTEM_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc \${CONFIG_SYSTEM_LIBS} -lpthread" | ||
| 1484 | CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" | 1491 | CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" |
| 1485 | CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" | 1492 | CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" |
| 1486 | REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" | 1493 | REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" |
| 1487 | LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}" | 1494 | LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}" |
| 1488 | LIB_STANDARD= | 1495 | LIB_STANDARD= |
| 1496 | START_FILES= | ||
| 1497 | TEMACS_LDFLAGS2= | ||
| 1489 | fi | 1498 | fi |
| 1490 | AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes], | 1499 | AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes], |
| 1491 | [AC_MSG_ERROR([`--with-ns' was specified, but the include | 1500 | [AC_MSG_ERROR([`--with-ns' was specified, but the include |
| @@ -1500,6 +1509,8 @@ shared=no | |||
| 1500 | fi | 1509 | fi |
| 1501 | fi | 1510 | fi |
| 1502 | AC_SUBST(NS_IMPL_GNUSTEP_INC) | 1511 | AC_SUBST(NS_IMPL_GNUSTEP_INC) |
| 1512 | AC_SUBST(NS_IMPL_GNUSTEP_TEMACS_LDFLAGS) | ||
| 1513 | AC_SUBST(TEMACS_LDFLAGS2) | ||
| 1503 | 1514 | ||
| 1504 | NS_OBJ= | 1515 | NS_OBJ= |
| 1505 | NS_SUPPORT= | 1516 | NS_SUPPORT= |
| @@ -1581,11 +1592,20 @@ AC_CACHE_CHECK(whether __after_morecore_hook exists, | |||
| 1581 | if test $emacs_cv_var___after_morecore_hook = no; then | 1592 | if test $emacs_cv_var___after_morecore_hook = no; then |
| 1582 | doug_lea_malloc=no | 1593 | doug_lea_malloc=no |
| 1583 | fi | 1594 | fi |
| 1595 | |||
| 1584 | if test "${system_malloc}" = "yes"; then | 1596 | if test "${system_malloc}" = "yes"; then |
| 1585 | GNU_MALLOC=no | 1597 | GNU_MALLOC=no |
| 1586 | GNU_MALLOC_reason=" | 1598 | GNU_MALLOC_reason=" |
| 1587 | (The GNU allocators don't work with this system configuration.)" | 1599 | (The GNU allocators don't work with this system configuration.)" |
| 1600 | GMALLOC_OBJ= | ||
| 1601 | VMLIMIT_OBJ= | ||
| 1602 | else | ||
| 1603 | test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o | ||
| 1604 | VMLIMIT_OBJ=vm-limit.o | ||
| 1588 | fi | 1605 | fi |
| 1606 | AC_SUBST(GMALLOC_OBJ) | ||
| 1607 | AC_SUBST(VMLIMIT_OBJ) | ||
| 1608 | |||
| 1589 | if test "$doug_lea_malloc" = "yes" ; then | 1609 | if test "$doug_lea_malloc" = "yes" ; then |
| 1590 | if test "$GNU_MALLOC" = yes ; then | 1610 | if test "$GNU_MALLOC" = yes ; then |
| 1591 | GNU_MALLOC_reason=" | 1611 | GNU_MALLOC_reason=" |
| @@ -1593,6 +1613,14 @@ if test "$doug_lea_malloc" = "yes" ; then | |||
| 1593 | fi | 1613 | fi |
| 1594 | AC_DEFINE(DOUG_LEA_MALLOC, 1, | 1614 | AC_DEFINE(DOUG_LEA_MALLOC, 1, |
| 1595 | [Define to 1 if you are using the GNU C Library.]) | 1615 | [Define to 1 if you are using the GNU C Library.]) |
| 1616 | |||
| 1617 | ## Use mmap directly for allocating larger buffers. | ||
| 1618 | ## FIXME this comes from src/s/{gnu,gnu-linux}.h: | ||
| 1619 | ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif | ||
| 1620 | ## Does the AC_FUNC_MMAP test below make this check unecessary? | ||
| 1621 | case "$opsys" in | ||
| 1622 | gnu*) REL_ALLOC=no ;; | ||
| 1623 | esac | ||
| 1596 | fi | 1624 | fi |
| 1597 | 1625 | ||
| 1598 | if test x"${REL_ALLOC}" = x; then | 1626 | if test x"${REL_ALLOC}" = x; then |
| @@ -2231,14 +2259,6 @@ else | |||
| 2231 | HAVE_M17N_FLT=no | 2259 | HAVE_M17N_FLT=no |
| 2232 | fi | 2260 | fi |
| 2233 | 2261 | ||
| 2234 | FONT_OBJ=xfont.o | ||
| 2235 | if test "$HAVE_XFT" = "yes"; then | ||
| 2236 | FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" | ||
| 2237 | elif test "$HAVE_FREETYPE" = "yes"; then | ||
| 2238 | FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o" | ||
| 2239 | fi | ||
| 2240 | AC_SUBST(FONT_OBJ) | ||
| 2241 | |||
| 2242 | ### End of font-backend (under X11) section. | 2262 | ### End of font-backend (under X11) section. |
| 2243 | 2263 | ||
| 2244 | AC_SUBST(FREETYPE_CFLAGS) | 2264 | AC_SUBST(FREETYPE_CFLAGS) |
| @@ -2620,7 +2640,7 @@ HAVE_LIBNCURSES=yes | |||
| 2620 | 2640 | ||
| 2621 | ## Use terminfo instead of termcap? | 2641 | ## Use terminfo instead of termcap? |
| 2622 | ## Note only system files NOT using terminfo are: | 2642 | ## Note only system files NOT using terminfo are: |
| 2623 | ## bsd-common, freebsd < 40000, ms-w32, msdos, netbsd, and | 2643 | ## freebsd < 40000, ms-w32, msdos, netbsd, and |
| 2624 | ## darwin|gnu without ncurses. | 2644 | ## darwin|gnu without ncurses. |
| 2625 | TERMINFO=no | 2645 | TERMINFO=no |
| 2626 | LIBS_TERMCAP= | 2646 | LIBS_TERMCAP= |
| @@ -2629,7 +2649,7 @@ case "$opsys" in | |||
| 2629 | ## hpux10-20: Use the system provided termcap(3) library. | 2649 | ## hpux10-20: Use the system provided termcap(3) library. |
| 2630 | ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this | 2650 | ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this |
| 2631 | ## is necessary. Otherwise Emacs dumps core when run -nw. | 2651 | ## is necessary. Otherwise Emacs dumps core when run -nw. |
| 2632 | aix4-2|cygwin|hpux*|irix6-5|openbsd|usg5-4|sol2*|unixware) TERMINFO=yes ;; | 2652 | aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;; |
| 2633 | 2653 | ||
| 2634 | ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. | 2654 | ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. |
| 2635 | ## The ncurses library has been moved out of the System framework in | 2655 | ## The ncurses library has been moved out of the System framework in |
| @@ -3008,13 +3028,13 @@ if test "x$GCC" = xyes \ | |||
| 3008 | fi | 3028 | fi |
| 3009 | 3029 | ||
| 3010 | #### Find out which version of Emacs this is. | 3030 | #### Find out which version of Emacs this is. |
| 3011 | [version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \ | 3031 | [version=`grep 'const char emacs_version' ${srcdir}/src/emacs.c \ |
| 3012 | | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`] | 3032 | | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`] |
| 3013 | if test x"${version}" = x; then | 3033 | if test x"${version}" = x; then |
| 3014 | AC_MSG_ERROR([can't find current emacs version in `${srcdir}/lisp/version.el'.]) | 3034 | AC_MSG_ERROR([can't find current emacs version in `${srcdir}/src/emacs.c'.]) |
| 3015 | fi | 3035 | fi |
| 3016 | if test x"${version}" != x"$PACKAGE_VERSION"; then | 3036 | if test x"${version}" != x"$PACKAGE_VERSION"; then |
| 3017 | AC_MSG_WARN([version mismatch between `${srcdir}/configure.in' and `${srcdir}/lisp/version.el'.]) | 3037 | AC_MSG_WARN([version mismatch between `${srcdir}/configure.in' and `${srcdir}/src/emacs.c'.]) |
| 3018 | fi | 3038 | fi |
| 3019 | 3039 | ||
| 3020 | ### Specify what sort of things we'll be editing into Makefile and config.h. | 3040 | ### Specify what sort of things we'll be editing into Makefile and config.h. |
| @@ -3059,8 +3079,6 @@ AC_SUBST(ns_appdir) | |||
| 3059 | AC_SUBST(ns_appbindir) | 3079 | AC_SUBST(ns_appbindir) |
| 3060 | AC_SUBST(ns_appresdir) | 3080 | AC_SUBST(ns_appresdir) |
| 3061 | AC_SUBST(ns_appsrc) | 3081 | AC_SUBST(ns_appsrc) |
| 3062 | AC_SUBST(GNUSTEP_SYSTEM_HEADERS) | ||
| 3063 | AC_SUBST(GNUSTEP_SYSTEM_LIBRARIES) | ||
| 3064 | AC_SUBST(GNU_OBJC_CFLAGS) | 3082 | AC_SUBST(GNU_OBJC_CFLAGS) |
| 3065 | AC_SUBST(OTHER_FILES) | 3083 | AC_SUBST(OTHER_FILES) |
| 3066 | 3084 | ||
| @@ -3075,14 +3093,23 @@ AC_DEFINE_UNQUOTED(config_opsysfile, "${opsysfile}", | |||
| 3075 | 3093 | ||
| 3076 | XMENU_OBJ= | 3094 | XMENU_OBJ= |
| 3077 | XOBJ= | 3095 | XOBJ= |
| 3096 | FONT_OBJ= | ||
| 3078 | if test "${HAVE_X_WINDOWS}" = "yes" ; then | 3097 | if test "${HAVE_X_WINDOWS}" = "yes" ; then |
| 3079 | AC_DEFINE(HAVE_X_WINDOWS, 1, | 3098 | AC_DEFINE(HAVE_X_WINDOWS, 1, |
| 3080 | [Define to 1 if you want to use the X window system.]) | 3099 | [Define to 1 if you want to use the X window system.]) |
| 3081 | XMENU_OBJ=xmenu.o | 3100 | XMENU_OBJ=xmenu.o |
| 3082 | XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o" | 3101 | XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o" |
| 3102 | FONT_OBJ=xfont.o | ||
| 3103 | if test "$HAVE_XFT" = "yes"; then | ||
| 3104 | FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o" | ||
| 3105 | elif test "$HAVE_FREETYPE" = "yes"; then | ||
| 3106 | FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o" | ||
| 3107 | fi | ||
| 3108 | AC_SUBST(FONT_OBJ) | ||
| 3083 | fi | 3109 | fi |
| 3084 | AC_SUBST(XMENU_OBJ) | 3110 | AC_SUBST(XMENU_OBJ) |
| 3085 | AC_SUBST(XOBJ) | 3111 | AC_SUBST(XOBJ) |
| 3112 | AC_SUBST(FONT_OBJ) | ||
| 3086 | 3113 | ||
| 3087 | WIDGET_OBJ= | 3114 | WIDGET_OBJ= |
| 3088 | MOTIF_LIBW= | 3115 | MOTIF_LIBW= |
| @@ -3126,10 +3153,13 @@ AC_SUBST(TOOLKIT_LIBW) | |||
| 3126 | 3153 | ||
| 3127 | if test "$USE_X_TOOLKIT" = "none"; then | 3154 | if test "$USE_X_TOOLKIT" = "none"; then |
| 3128 | LIBXT_OTHER="\$(LIBXSM)" | 3155 | LIBXT_OTHER="\$(LIBXSM)" |
| 3156 | OLDXMENU_TARGET="really-oldXMenu" | ||
| 3129 | else | 3157 | else |
| 3130 | LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" | 3158 | LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext" |
| 3159 | OLDXMENU_TARGET="really-lwlib" | ||
| 3131 | fi | 3160 | fi |
| 3132 | AC_SUBST(LIBXT_OTHER) | 3161 | AC_SUBST(LIBXT_OTHER) |
| 3162 | AC_SUBST(OLDXMENU_TARGET) | ||
| 3133 | 3163 | ||
| 3134 | ## The X Menu stuff is present in the X10 distribution, but missing | 3164 | ## The X Menu stuff is present in the X10 distribution, but missing |
| 3135 | ## from X11. If we have X10, just use the installed library; | 3165 | ## from X11. If we have X10, just use the installed library; |
| @@ -3146,20 +3176,29 @@ if test "${HAVE_X11}" = "yes" ; then | |||
| 3146 | fi | 3176 | fi |
| 3147 | LIBXMENU="\$(OLDXMENU)" | 3177 | LIBXMENU="\$(OLDXMENU)" |
| 3148 | LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" | 3178 | LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" |
| 3179 | OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}" | ||
| 3149 | else | 3180 | else |
| 3150 | OLDXMENU= | 3181 | OLDXMENU= |
| 3151 | LIBXMENU="-lXMenu" | 3182 | ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?). |
| 3183 | if test "${HAVE_X_WINDOWS}" = "yes"; then | ||
| 3184 | LIBXMENU="-lXMenu" | ||
| 3185 | else | ||
| 3186 | LIBXMENU= | ||
| 3187 | fi | ||
| 3152 | LIBX_OTHER= | 3188 | LIBX_OTHER= |
| 3189 | OLDXMENU_DEPS= | ||
| 3153 | fi | 3190 | fi |
| 3154 | 3191 | ||
| 3155 | if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then | 3192 | if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then |
| 3156 | OLDXMENU= | 3193 | OLDXMENU= |
| 3157 | LIBXMENU= | 3194 | LIBXMENU= |
| 3195 | OLDXMENU_DEPS= | ||
| 3158 | fi | 3196 | fi |
| 3159 | 3197 | ||
| 3160 | AC_SUBST(OLDXMENU) | 3198 | AC_SUBST(OLDXMENU) |
| 3161 | AC_SUBST(LIBXMENU) | 3199 | AC_SUBST(LIBXMENU) |
| 3162 | AC_SUBST(LIBX_OTHER) | 3200 | AC_SUBST(LIBX_OTHER) |
| 3201 | AC_SUBST(OLDXMENU_DEPS) | ||
| 3163 | 3202 | ||
| 3164 | if test "${HAVE_MENUS}" = "yes" ; then | 3203 | if test "${HAVE_MENUS}" = "yes" ; then |
| 3165 | AC_DEFINE(HAVE_MENUS, 1, | 3204 | AC_DEFINE(HAVE_MENUS, 1, |
| @@ -3167,26 +3206,31 @@ if test "${HAVE_MENUS}" = "yes" ; then | |||
| 3167 | (This is automatic if you use X, but the option to specify it remains.) | 3206 | (This is automatic if you use X, but the option to specify it remains.) |
| 3168 | It is also defined with other window systems that support xmenu.c.]) | 3207 | It is also defined with other window systems that support xmenu.c.]) |
| 3169 | fi | 3208 | fi |
| 3209 | |||
| 3170 | if test "${GNU_MALLOC}" = "yes" ; then | 3210 | if test "${GNU_MALLOC}" = "yes" ; then |
| 3171 | AC_DEFINE(GNU_MALLOC, 1, | 3211 | AC_DEFINE(GNU_MALLOC, 1, |
| 3172 | [Define to 1 if you want to use the GNU memory allocator.]) | 3212 | [Define to 1 if you want to use the GNU memory allocator.]) |
| 3173 | fi | 3213 | fi |
| 3214 | |||
| 3215 | RALLOC_OBJ= | ||
| 3174 | if test "${REL_ALLOC}" = "yes" ; then | 3216 | if test "${REL_ALLOC}" = "yes" ; then |
| 3175 | AC_DEFINE(REL_ALLOC, 1, | 3217 | AC_DEFINE(REL_ALLOC, 1, |
| 3176 | [Define REL_ALLOC if you want to use the relocating allocator for | 3218 | [Define REL_ALLOC if you want to use the relocating allocator for |
| 3177 | buffer space.]) | 3219 | buffer space.]) |
| 3178 | fi | ||
| 3179 | 3220 | ||
| 3221 | test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o | ||
| 3222 | fi | ||
| 3223 | AC_SUBST(RALLOC_OBJ) | ||
| 3180 | 3224 | ||
| 3181 | if test "$opsys" = "cygwin"; then | 3225 | if test "$opsys" = "cygwin"; then |
| 3182 | CYGWIN_OBJ="sheap.o" | 3226 | CYGWIN_OBJ="sheap.o" |
| 3183 | ## Cygwin differs because of its unexec(). | 3227 | ## Cygwin differs because of its unexec(). |
| 3184 | PRE_ALLOC_OBJ= | 3228 | PRE_ALLOC_OBJ= |
| 3185 | POST_ALLOC_OBJ="lastfile.o vm-limit.o" | 3229 | POST_ALLOC_OBJ=lastfile.o |
| 3186 | else | 3230 | else |
| 3187 | CYGWIN_OBJ= | 3231 | CYGWIN_OBJ= |
| 3188 | PRE_ALLOC_OBJ=lastfile.o | 3232 | PRE_ALLOC_OBJ=lastfile.o |
| 3189 | POST_ALLOC_OBJ="\$(vmlimitobj)" | 3233 | POST_ALLOC_OBJ= |
| 3190 | fi | 3234 | fi |
| 3191 | AC_SUBST(CYGWIN_OBJ) | 3235 | AC_SUBST(CYGWIN_OBJ) |
| 3192 | AC_SUBST(PRE_ALLOC_OBJ) | 3236 | AC_SUBST(PRE_ALLOC_OBJ) |
| @@ -3478,8 +3522,6 @@ typedef unsigned size_t; | |||
| 3478 | 3522 | ||
| 3479 | #ifdef HAVE_X11R6 | 3523 | #ifdef HAVE_X11R6 |
| 3480 | #define HAVE_X_I18N | 3524 | #define HAVE_X_I18N |
| 3481 | #elif !defined X11R5_INHIBIT_I18N | ||
| 3482 | #define HAVE_X_I18N | ||
| 3483 | #endif | 3525 | #endif |
| 3484 | 3526 | ||
| 3485 | /* Define HAVE_X11R6_XIM if we have usable X11R6-style XIM support. */ | 3527 | /* Define HAVE_X11R6_XIM if we have usable X11R6-style XIM support. */ |
| @@ -3499,11 +3541,7 @@ typedef unsigned size_t; | |||
| 3499 | that the stack is continuous. */ | 3541 | that the stack is continuous. */ |
| 3500 | #ifdef __GNUC__ | 3542 | #ifdef __GNUC__ |
| 3501 | # ifndef GC_SETJMP_WORKS | 3543 | # ifndef GC_SETJMP_WORKS |
| 3502 | /* GC_SETJMP_WORKS is nearly always appropriate for GCC -- | 3544 | /* GC_SETJMP_WORKS is nearly always appropriate for GCC. */ |
| 3503 | see NON_SAVING_SETJMP in the target descriptions. */ | ||
| 3504 | /* Exceptions (see NON_SAVING_SETJMP in target description) are | ||
| 3505 | SCO5 non-ELF (but Emacs specifies ELF) and SVR3 on x86. | ||
| 3506 | Fixme: Deal with SVR3. */ | ||
| 3507 | # define GC_SETJMP_WORKS 1 | 3545 | # define GC_SETJMP_WORKS 1 |
| 3508 | # endif | 3546 | # endif |
| 3509 | # ifndef GC_LISP_OBJECT_ALIGNMENT | 3547 | # ifndef GC_LISP_OBJECT_ALIGNMENT |
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index a8a43f56d9d..82d4d028040 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2010-05-18 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * display.texi (Fringes): Document reversal of fringe arrows for R2L | ||
| 4 | paragraphs. | ||
| 5 | (Line Truncation): Fix wording for bidi display. | ||
| 6 | |||
| 7 | * basic.texi (Moving Point): Document bidi-aware behavior of the arrow | ||
| 8 | keys. | ||
| 9 | |||
| 1 | 2010-05-08 Chong Yidong <cyd@stupidchicken.com> | 10 | 2010-05-08 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 11 | ||
| 3 | * building.texi (GDB Graphical Interface): Remove misleading comparison | 12 | * building.texi (GDB Graphical Interface): Remove misleading comparison |
| @@ -127,7 +136,7 @@ | |||
| 127 | 136 | ||
| 128 | * custom.texi (Init Examples): Add xref to Mail Header. | 137 | * custom.texi (Init Examples): Add xref to Mail Header. |
| 129 | 138 | ||
| 130 | * emacs.texi (Top): Fix xrefs. | 139 | * emacs.texi (Top): Fix xrefs. |
| 131 | 140 | ||
| 132 | 2010-03-30 Chong Yidong <cyd@stupidchicken.com> | 141 | 2010-03-30 Chong Yidong <cyd@stupidchicken.com> |
| 133 | 142 | ||
| @@ -1695,7 +1704,7 @@ | |||
| 1695 | (Fortran Columns): Mention font-locking. | 1704 | (Fortran Columns): Mention font-locking. |
| 1696 | (Fortran Abbrev): Word syntax not relevant with new-style abbrev. | 1705 | (Fortran Abbrev): Word syntax not relevant with new-style abbrev. |
| 1697 | 1706 | ||
| 1698 | 2008-08-23 Johan Bockgard <bojohan@muon> | 1707 | 2008-08-23 Johan Bockgård <bojohan@muon> |
| 1699 | 1708 | ||
| 1700 | * basic.texi (Moving Point): Fix <prior>/<next> confusion. | 1709 | * basic.texi (Moving Point): Fix <prior>/<next> confusion. |
| 1701 | 1710 | ||
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index ae04ebf9c41..654c017c59e 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi | |||
| @@ -146,6 +146,8 @@ keyboard commands that move point in more sophisticated ways. | |||
| 146 | @findex move-end-of-line | 146 | @findex move-end-of-line |
| 147 | @findex forward-char | 147 | @findex forward-char |
| 148 | @findex backward-char | 148 | @findex backward-char |
| 149 | @findex right-arrow-command | ||
| 150 | @findex left-arrow-command | ||
| 149 | @findex next-line | 151 | @findex next-line |
| 150 | @findex previous-line | 152 | @findex previous-line |
| 151 | @findex beginning-of-buffer | 153 | @findex beginning-of-buffer |
| @@ -161,11 +163,19 @@ Move to the beginning of the line (@code{move-beginning-of-line}). | |||
| 161 | @itemx @key{End} | 163 | @itemx @key{End} |
| 162 | Move to the end of the line (@code{move-end-of-line}). | 164 | Move to the end of the line (@code{move-end-of-line}). |
| 163 | @item C-f | 165 | @item C-f |
| 164 | @itemx @key{right} | ||
| 165 | Move forward one character (@code{forward-char}). | 166 | Move forward one character (@code{forward-char}). |
| 167 | @item @key{right} | ||
| 168 | Move one character to the right (@code{right-arrow-command}). This | ||
| 169 | moves one character forward in text that is read in the usual | ||
| 170 | left-to-right direction, but one character @emph{backward} if the text | ||
| 171 | is read right-to-left, as needed for right-to-left scripts such as | ||
| 172 | Arabic. @xref{Bidirectional Editing}. | ||
| 166 | @item C-b | 173 | @item C-b |
| 167 | @itemx @key{left} | ||
| 168 | Move backward one character (@code{backward-char}). | 174 | Move backward one character (@code{backward-char}). |
| 175 | @item @key{left} | ||
| 176 | Move one character to the left (@code{left-arrow-command}). This | ||
| 177 | moves one character backward in left-to-right text and one character | ||
| 178 | forward in right-to-left text. | ||
| 169 | @item M-f | 179 | @item M-f |
| 170 | @itemx M-@key{right} | 180 | @itemx M-@key{right} |
| 171 | @itemx C-@key{right} | 181 | @itemx C-@key{right} |
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index dcf424f0f47..3d3a1e03e46 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi | |||
| @@ -804,7 +804,10 @@ line, when one line of text is split into multiple lines on the | |||
| 804 | screen. The left fringe shows a curving arrow for each screen line | 804 | screen. The left fringe shows a curving arrow for each screen line |
| 805 | except the first, indicating that ``this is not the real beginning.'' | 805 | except the first, indicating that ``this is not the real beginning.'' |
| 806 | The right fringe shows a curving arrow for each screen line except the | 806 | The right fringe shows a curving arrow for each screen line except the |
| 807 | last, indicating that ``this is not the real end.'' | 807 | last, indicating that ``this is not the real end.'' If the line's |
| 808 | direction is right-to-left (@pxref{Bidirectional Editing}), the | ||
| 809 | meaning of the curving arrows in the left and right fringes are | ||
| 810 | swapped. | ||
| 808 | 811 | ||
| 809 | The fringes indicate line truncation with short horizontal arrows | 812 | The fringes indicate line truncation with short horizontal arrows |
| 810 | meaning ``there's more text on this line which is scrolled | 813 | meaning ``there's more text on this line which is scrolled |
| @@ -1191,8 +1194,8 @@ can display long lines by @dfn{truncation}. This means that all the | |||
| 1191 | characters that do not fit in the width of the screen or window do not | 1194 | characters that do not fit in the width of the screen or window do not |
| 1192 | appear at all. On graphical displays, a small straight arrow in the | 1195 | appear at all. On graphical displays, a small straight arrow in the |
| 1193 | fringe indicates truncation at either end of the line. On text-only | 1196 | fringe indicates truncation at either end of the line. On text-only |
| 1194 | terminals, @samp{$} appears in the first column when there is text | 1197 | terminals, @samp{$} appears in the leftmost column when there is text |
| 1195 | truncated to the left, and in the last column when there is text | 1198 | truncated to the left, and in the rightmost column when there is text |
| 1196 | truncated to the right. | 1199 | truncated to the right. |
| 1197 | 1200 | ||
| 1198 | @vindex truncate-lines | 1201 | @vindex truncate-lines |
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index c6d3c1be498..4c857c45a32 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,6 +1,11 @@ | |||
| 1 | 2010-05-16 Jay Belanger <jay.p.belanger@gmail.com> | ||
| 2 | |||
| 3 | * calc.texi (Manipulating Vectors): Mention that vectors can | ||
| 4 | be used to determine bins for `calc-histogram'. | ||
| 5 | |||
| 1 | 2010-05-13 Jay Belanger <jay.p.belanger@gmail.com> | 6 | 2010-05-13 Jay Belanger <jay.p.belanger@gmail.com> |
| 2 | 7 | ||
| 3 | * calc.texi: Remove "\turnoffactive" commands througout. | 8 | * calc.texi: Remove "\turnoffactive" commands throughout. |
| 4 | 9 | ||
| 5 | 2010-05-08 Štěpán Němec <stepnem@gmail.com> (tiny change) | 10 | 2010-05-08 Štěpán Němec <stepnem@gmail.com> (tiny change) |
| 6 | 11 | ||
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index c578e919612..12b8d8e162d 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi | |||
| @@ -20030,6 +20030,20 @@ range are ignored. (You can tell if elements have been ignored by noting | |||
| 20030 | that the counts in the result vector don't add up to the length of the | 20030 | that the counts in the result vector don't add up to the length of the |
| 20031 | input vector.) | 20031 | input vector.) |
| 20032 | 20032 | ||
| 20033 | If no prefix is given, then you will be prompted for a vector which | ||
| 20034 | will be used to determine the bins. (If a positive integer is given at | ||
| 20035 | this prompt, it will be still treated as if it were given as a | ||
| 20036 | prefix.) Each bin will consist of the interval of numbers closest to | ||
| 20037 | the corresponding number of this new vector; if the vector | ||
| 20038 | @expr{[a, b, c, ...]} is entered at the prompt, the bins will be | ||
| 20039 | @expr{(-inf, (a+b)/2]}, @expr{((a+b)/2, (b+c)/2]}, etc. The result of | ||
| 20040 | this command will be a vector counting how many elements of the | ||
| 20041 | original vector are in each bin. | ||
| 20042 | |||
| 20043 | The result will then be a vector with the same length as this new vector; | ||
| 20044 | each element of the new vector will be replaced by the number of | ||
| 20045 | elements of the original vector which are closest to it. | ||
| 20046 | |||
| 20033 | @kindex H v H | 20047 | @kindex H v H |
| 20034 | @kindex H V H | 20048 | @kindex H V H |
| 20035 | With the Hyperbolic flag, @kbd{H V H} pulls two vectors from the stack. | 20049 | With the Hyperbolic flag, @kbd{H V H} pulls two vectors from the stack. |
| @@ -627,8 +627,7 @@ CPU-specific headers in the subdirectories of `src'): | |||
| 627 | 627 | ||
| 628 | - In src/s/SYSTEM-NAME.h add "#define SYSTEM_MALLOC". | 628 | - In src/s/SYSTEM-NAME.h add "#define SYSTEM_MALLOC". |
| 629 | 629 | ||
| 630 | - In src/m/MACHINE-NAME.h add "#define CANNOT_DUMP" and | 630 | - In src/m/MACHINE-NAME.h add "#define CANNOT_DUMP" |
| 631 | "#define CANNOT_UNEXEC". | ||
| 632 | 631 | ||
| 633 | - Configure with a different --prefix= option. If you use GCC, | 632 | - Configure with a different --prefix= option. If you use GCC, |
| 634 | version 2.7.2 is preferred, as some malloc debugging packages | 633 | version 2.7.2 is preferred, as some malloc debugging packages |
| @@ -63,6 +63,9 @@ according to the value of this variable. Possible values are | |||
| 63 | default), Emacs determines the base direction of each paragraph from | 63 | default), Emacs determines the base direction of each paragraph from |
| 64 | its text, as specified by the Unicode Bidirectional Algorithm. | 64 | its text, as specified by the Unicode Bidirectional Algorithm. |
| 65 | 65 | ||
| 66 | The function `current-bidi-paragraph-direction' returns the actual | ||
| 67 | value of paragraph base direction at point. | ||
| 68 | |||
| 66 | Reordering of bidirectional text for display in Emacs is a "Full | 69 | Reordering of bidirectional text for display in Emacs is a "Full |
| 67 | bidirectionality" class implementation of the Unicode Bidirectional | 70 | bidirectionality" class implementation of the Unicode Bidirectional |
| 68 | Algorithm. | 71 | Algorithm. |
| @@ -207,6 +210,8 @@ threads simultaneously. | |||
| 207 | 210 | ||
| 208 | * New Modes and Packages in Emacs 24.1 | 211 | * New Modes and Packages in Emacs 24.1 |
| 209 | 212 | ||
| 213 | ** smie.el is a package providing a simple generic indentation engine. | ||
| 214 | |||
| 210 | ** secrets.el is an implementation of the Secret Service API, an | 215 | ** secrets.el is an implementation of the Secret Service API, an |
| 211 | interface to password managers like GNOME Keyring or KDE Wallet. The | 216 | interface to password managers like GNOME Keyring or KDE Wallet. The |
| 212 | Secret Service API requires D-Bus for communication. | 217 | Secret Service API requires D-Bus for communication. |
| @@ -221,6 +226,8 @@ Secret Service API requires D-Bus for communication. | |||
| 221 | 226 | ||
| 222 | * Lisp changes in Emacs 24.1 | 227 | * Lisp changes in Emacs 24.1 |
| 223 | 228 | ||
| 229 | ** frame-local variables cannot be let-bound any more. | ||
| 230 | ** prog-mode is a new major-mode meant to be the parent of programming mode. | ||
| 224 | ** define-minor-mode accepts a new keyword :variable. | 231 | ** define-minor-mode accepts a new keyword :variable. |
| 225 | 232 | ||
| 226 | ** delete-file now accepts an optional second arg, FORCE, which says | 233 | ** delete-file now accepts an optional second arg, FORCE, which says |
diff --git a/leim/ChangeLog b/leim/ChangeLog index 4b9d6adbf39..972a3279a29 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-05-15 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * Makefile.in (install): Remove references to CVS-related files. | ||
| 4 | |||
| 1 | 2010-05-07 Chong Yidong <cyd@stupidchicken.com> | 5 | 2010-05-07 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 6 | ||
| 3 | * Version 23.2 released. | 7 | * Version 23.2 released. |
diff --git a/leim/Makefile.in b/leim/Makefile.in index f0fba8d2462..6eb18bc76d9 100644 --- a/leim/Makefile.in +++ b/leim/Makefile.in | |||
| @@ -237,8 +237,6 @@ install: all | |||
| 237 | tar -chf - quail/* ja-dic \ | 237 | tar -chf - quail/* ja-dic \ |
| 238 | | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\ | 238 | | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\ |
| 239 | fi; \ | 239 | fi; \ |
| 240 | rm -rf ${INSTALLDIR}/CVS ${INSTALLDIR}/*/CVS; \ | ||
| 241 | rm -f ${INSTALLDIR}/.cvsignore ${INSTALLDIR}/*/.cvsignore; \ | ||
| 242 | rm -f ${INSTALLDIR}/.gitignore ${INSTALLDIR}/*/.gitignore; \ | 240 | rm -f ${INSTALLDIR}/.gitignore ${INSTALLDIR}/*/.gitignore; \ |
| 243 | rm -f ${INSTALLDIR}/.arch-inventory ${INSTALLDIR}/*/.arch-inventory; \ | 241 | rm -f ${INSTALLDIR}/.arch-inventory ${INSTALLDIR}/*/.arch-inventory; \ |
| 244 | rm -f ${INSTALLDIR}/\#* ${INSTALLDIR}/*/\#* ; \ | 242 | rm -f ${INSTALLDIR}/\#* ${INSTALLDIR}/*/\#* ; \ |
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index 4799a9fefc4..6202feb890c 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in | |||
| @@ -106,14 +106,15 @@ INSTALL_STRIP = | |||
| 106 | 106 | ||
| 107 | # ========================== Lists of Files =========================== | 107 | # ========================== Lists of Files =========================== |
| 108 | 108 | ||
| 109 | # Things that a user might actually run, | 109 | # Things that a user might actually run, which should be installed in bindir. |
| 110 | # which should be installed in bindir. | 110 | INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} \ |
| 111 | INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} b2m${EXEEXT} ebrowse${EXEEXT} | 111 | b2m${EXEEXT} ebrowse${EXEEXT} |
| 112 | |||
| 112 | INSTALLABLE_SCRIPTS = rcs-checkin grep-changelog | 113 | INSTALLABLE_SCRIPTS = rcs-checkin grep-changelog |
| 113 | 114 | ||
| 114 | # Things that Emacs runs internally, or during the build process, | 115 | # Things that Emacs runs internally, or during the build process, |
| 115 | # which should not be installed in bindir. | 116 | # which should not be installed in bindir. |
| 116 | UTILITIES= profile${EXEEXT} digest-doc${EXEEXT} sorted-doc${EXEEXT} \ | 117 | UTILITIES = profile${EXEEXT} digest-doc${EXEEXT} sorted-doc${EXEEXT} \ |
| 117 | movemail${EXEEXT} fakemail${EXEEXT} \ | 118 | movemail${EXEEXT} fakemail${EXEEXT} \ |
| 118 | hexl${EXEEXT} update-game-score${EXEEXT} | 119 | hexl${EXEEXT} update-game-score${EXEEXT} |
| 119 | 120 | ||
| @@ -153,7 +154,8 @@ LIBRESOLV=@LIBRESOLV@ | |||
| 153 | LIBS_MAIL=@LIBS_MAIL@ | 154 | LIBS_MAIL=@LIBS_MAIL@ |
| 154 | 155 | ||
| 155 | ## Extra libraries to use when linking movemail. | 156 | ## Extra libraries to use when linking movemail. |
| 156 | LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) $(COM_ERRLIB) $(LIBHESIOD) $(LIBRESOLV) | 157 | LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) \ |
| 158 | $(COM_ERRLIB) $(LIBHESIOD) $(LIBRESOLV) | ||
| 157 | 159 | ||
| 158 | ## Some systems define this to request special libraries. | 160 | ## Some systems define this to request special libraries. |
| 159 | LIBS_SYSTEM = @LIBS_SYSTEM@ | 161 | LIBS_SYSTEM = @LIBS_SYSTEM@ |
| @@ -161,7 +163,8 @@ LIBS_SYSTEM = @LIBS_SYSTEM@ | |||
| 161 | # Those files shared with other GNU utilities need HAVE_CONFIG_H | 163 | # Those files shared with other GNU utilities need HAVE_CONFIG_H |
| 162 | # defined before they know they can take advantage of the information | 164 | # defined before they know they can take advantage of the information |
| 163 | # in ../src/config.h. | 165 | # in ../src/config.h. |
| 164 | BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) -DHAVE_CONFIG_H -I. -I../src -I${srcdir} -I${srcdir}/../src | 166 | BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) -DHAVE_CONFIG_H \ |
| 167 | -I. -I../src -I${srcdir} -I${srcdir}/../src | ||
| 165 | 168 | ||
| 166 | ALL_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS} | 169 | ALL_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS} |
| 167 | LINK_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CFLAGS} | 170 | LINK_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CFLAGS} |
| @@ -316,24 +319,31 @@ REGEXPOBJ = regex.o | |||
| 316 | REGEXPDEPS = $(REGEXPOBJ) $(srcdir)/../src/regex.h | 319 | REGEXPDEPS = $(REGEXPOBJ) $(srcdir)/../src/regex.h |
| 317 | 320 | ||
| 318 | regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h ../src/config.h | 321 | regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h ../src/config.h |
| 319 | ${CC} -c ${CPP_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER ${srcdir}/../src/regex.c | 322 | ${CC} -c ${CPP_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \ |
| 323 | ${srcdir}/../src/regex.c | ||
| 320 | 324 | ||
| 321 | etags${EXEEXT}: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXPDEPS) ../src/config.h | 325 | etags${EXEEXT}: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXPDEPS) ../src/config.h |
| 322 | $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o etags | 326 | $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" \ |
| 327 | -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) \ | ||
| 328 | $(REGEXPOBJ) $(LOADLIBES) -o etags | ||
| 323 | 329 | ||
| 324 | ebrowse${EXEEXT}: ${srcdir}/ebrowse.c $(GETOPTDEPS) ../src/config.h | 330 | ebrowse${EXEEXT}: ${srcdir}/ebrowse.c $(GETOPTDEPS) ../src/config.h |
| 325 | $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" ${srcdir}/ebrowse.c $(GETOPTOBJS) $(LOADLIBES) -o ebrowse | 331 | $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \ |
| 332 | ${srcdir}/ebrowse.c $(GETOPTOBJS) $(LOADLIBES) -o ebrowse | ||
| 326 | 333 | ||
| 327 | ## We depend on etags to assure that parallel makes do not write two | 334 | ## We depend on etags to assure that parallel makes do not write two |
| 328 | ## etags.o files on top of each other. | 335 | ## etags.o files on top of each other. |
| 329 | ctags${EXEEXT}: etags${EXEEXT} | 336 | ctags${EXEEXT}: etags${EXEEXT} |
| 330 | $(CC) ${ALL_CFLAGS} -DCTAGS -DEMACS_NAME="\"GNU Emacs\"" -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o ctags | 337 | $(CC) ${ALL_CFLAGS} -DCTAGS -DEMACS_NAME="\"GNU Emacs\"" \ |
| 338 | -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) \ | ||
| 339 | $(REGEXPOBJ) $(LOADLIBES) -o ctags | ||
| 331 | 340 | ||
| 332 | profile${EXEEXT}: ${srcdir}/profile.c ../src/config.h | 341 | profile${EXEEXT}: ${srcdir}/profile.c ../src/config.h |
| 333 | $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c $(LOADLIBES) -o profile | 342 | $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c $(LOADLIBES) -o profile |
| 334 | 343 | ||
| 335 | make-docfile${EXEEXT}: ${srcdir}/make-docfile.c ../src/config.h | 344 | make-docfile${EXEEXT}: ${srcdir}/make-docfile.c ../src/config.h |
| 336 | $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) -o make-docfile | 345 | $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) \ |
| 346 | -o make-docfile | ||
| 337 | 347 | ||
| 338 | digest-doc${EXEEXT}: ${srcdir}/digest-doc.c | 348 | digest-doc${EXEEXT}: ${srcdir}/digest-doc.c |
| 339 | $(CC) ${ALL_CFLAGS} ${srcdir}/digest-doc.c $(LOADLIBES) -o digest-doc | 349 | $(CC) ${ALL_CFLAGS} ${srcdir}/digest-doc.c $(LOADLIBES) -o digest-doc |
| @@ -346,9 +356,9 @@ b2m${EXEEXT}: ${srcdir}/b2m.c ../src/config.h $(GETOPTDEPS) | |||
| 346 | $(GETOPTOBJS) $(LOADLIBES) -o b2m | 356 | $(GETOPTOBJS) $(LOADLIBES) -o b2m |
| 347 | 357 | ||
| 348 | movemail${EXEEXT}: movemail.o pop.o $(GETOPTDEPS) | 358 | movemail${EXEEXT}: movemail.o pop.o $(GETOPTDEPS) |
| 349 | $(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} movemail.o pop.o $(GETOPTOBJS) $(LOADLIBES) $(LIBS_MOVE) -o movemail | 359 | $(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} movemail.o pop.o \ |
| 360 | $(GETOPTOBJS) $(LOADLIBES) $(LIBS_MOVE) -o movemail | ||
| 350 | 361 | ||
| 351 | ## We need to define emacs to get the right version of something (what?). | ||
| 352 | movemail.o: ${srcdir}/movemail.c ../src/config.h $(GETOPT_H) | 362 | movemail.o: ${srcdir}/movemail.c ../src/config.h $(GETOPT_H) |
| 353 | $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c | 363 | $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c |
| 354 | 364 | ||
| @@ -367,7 +377,8 @@ hexl${EXEEXT}: ${srcdir}/hexl.c ../src/config.h | |||
| 367 | $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl | 377 | $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl |
| 368 | 378 | ||
| 369 | update-game-score${EXEEXT}: update-game-score.o $(GETOPTDEPS) | 379 | update-game-score${EXEEXT}: update-game-score.o $(GETOPTDEPS) |
| 370 | $(CC) ${LINK_CFLAGS} update-game-score.o $(GETOPTOBJS) $(LOADLIBES) -o update-game-score | 380 | $(CC) ${LINK_CFLAGS} update-game-score.o $(GETOPTOBJS) \ |
| 381 | $(LOADLIBES) -o update-game-score | ||
| 371 | 382 | ||
| 372 | update-game-score.o: ${srcdir}/update-game-score.c ../src/config.h $(GETOPT_H) | 383 | update-game-score.o: ${srcdir}/update-game-score.c ../src/config.h $(GETOPT_H) |
| 373 | $(CC) -c ${CPP_CFLAGS} ${srcdir}/update-game-score.c \ | 384 | $(CC) -c ${CPP_CFLAGS} ${srcdir}/update-game-score.c \ |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 21d0e827f67..d0fc357c4ea 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -4,10 +4,127 @@ | |||
| 4 | composition-function-table only for combining characters (Mn, Mc, | 4 | composition-function-table only for combining characters (Mn, Mc, |
| 5 | Me). | 5 | Me). |
| 6 | 6 | ||
| 7 | 2010-05-18 Juanma Barranquero <lekktu@gmail.com> | ||
| 8 | |||
| 9 | * progmodes/prolog.el (smie-indent-basic): Declare for byte-compiler. | ||
| 10 | |||
| 11 | * emacs-lisp/smie.el (smie-precs-precedence-table, smie-backward-sexp) | ||
| 12 | (smie-forward-sexp, smie-indent-calculate): Fix typos in docstrings. | ||
| 13 | |||
| 14 | 2010-05-17 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 15 | |||
| 16 | Provide a simple generic indentation engine and use it for Prolog. | ||
| 17 | * emacs-lisp/smie.el: New file. | ||
| 18 | * progmodes/prolog.el (prolog-smie-op-levels) | ||
| 19 | (prolog-smie-indent-rules): New var. | ||
| 20 | (prolog-mode-variables): Use them to configure SMIE. | ||
| 21 | (prolog-indent-line, prolog-indent-level): Remove. | ||
| 22 | |||
| 23 | 2010-05-17 Jay Belanger <jay.p.belanger@gmail.com> | ||
| 24 | |||
| 25 | * calc/calc-vec.el (math-vector-avg): Put the vector elements in | ||
| 26 | order before computing the averages. | ||
| 27 | |||
| 28 | 2010-05-16 Jay Belanger <jay.p.belanger@gmail.com> | ||
| 29 | |||
| 30 | * calc/calc-vec.el (calc-histogram): | ||
| 31 | (calcFunc-histogram): Allow vectors as inputs. | ||
| 32 | (math-vector-avg): New function. | ||
| 33 | |||
| 34 | * calc/calc-ext.el (math-group-float): Have the number of digits | ||
| 35 | being grouped depend on the radix (Bug#6189). | ||
| 36 | |||
| 37 | 2010-05-15 Ken Raeburn <raeburn@raeburn.org> | ||
| 38 | |||
| 39 | * version.el (emacs-copyright, emacs-version): Don't define here, | ||
| 40 | now that emacs.c defines it. | ||
| 41 | |||
| 42 | 2010-05-15 Eli Zaretskii <eliz@gnu.org> | ||
| 43 | |||
| 44 | * international/mule-cmds.el (mule-menu-keymap): Fix definition of | ||
| 45 | "Describe Language Environment" menu item. | ||
| 46 | |||
| 47 | * language/hebrew.el ("Hebrew", "Windows-1255"): Doc fix. | ||
| 48 | |||
| 49 | Bidi-sensitive movement with arrow keys. | ||
| 50 | * subr.el (right-arrow-command, left-arrow-command): New functions. | ||
| 51 | |||
| 52 | * bindings.el (global-map): Bind them to right and left arrow keys. | ||
| 53 | |||
| 54 | Don't override standard definition of convert-standard-filename. | ||
| 55 | * files.el (convert-standard-filename): Call | ||
| 56 | w32-convert-standard-filename and dos-convert-standard-filename on | ||
| 57 | the corresponding systems. | ||
| 58 | |||
| 59 | * w32-fns.el (w32-convert-standard-filename): Rename from | ||
| 60 | convert-standard-filename. Doc fix. | ||
| 61 | |||
| 62 | * dos-fns.el (dos-convert-standard-filename): Doc fix. | ||
| 63 | (convert-standard-filename): Don't defalias. | ||
| 64 | (register-name-alist, make-register, register-value) | ||
| 65 | (set-register-value, intdos): Obsolete aliases for the | ||
| 66 | corresponding dos-* functions and variables. | ||
| 67 | (dos-intdos): Add a doc string. | ||
| 68 | |||
| 69 | 2010-05-15 Jay Belanger <jay.p.belanger@gmail.com> | ||
| 70 | |||
| 71 | * calc/calc-aent.el (math-read-token, math-find-user-tokens): | ||
| 72 | * calc/calc-lang.el (math-read-big-rec, math-lang-read-symbol): | ||
| 73 | (math-compose-tex-func): | ||
| 74 | * calc/calccomp.el (math-compose-expr): | ||
| 75 | * calc/calc-ext.el (math-format-flat-expr-fancy): | ||
| 76 | * calc/calc-store.el (calc-read-var-name): | ||
| 77 | * calc/calc-units.el (calc-explain-units-rec): Allow Greek letters. | ||
| 78 | |||
| 79 | * calc/calc.el (var-π, var-φ, var-γ): New variables. | ||
| 80 | * calc/calc-aent.el (math-read-replacement-list): Add "micro" symbol. | ||
| 81 | * calc/calc-units.el (math-unit-prefixes): Add mu for micro. | ||
| 82 | (math-standard-units): Add units. | ||
| 83 | |||
| 84 | 2010-05-15 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 85 | |||
| 86 | * progmodes/asm-mode.el (asm-mode): | ||
| 87 | * progmodes/prolog.el (prolog-mode): Use define-derived-mode. | ||
| 88 | |||
| 89 | * pcomplete.el (pcomplete-completions-at-point): New function, | ||
| 90 | extracted from pcomplete-std-complete. | ||
| 91 | (pcomplete-std-complete): Use it. | ||
| 92 | |||
| 93 | 2010-05-15 Glenn Morris <rgm@gnu.org> | ||
| 94 | |||
| 95 | * Makefile.in (setwins, setwins_almost, setwins_for_subdirs): | ||
| 96 | Remove references to CVS, RCS and Old directories. | ||
| 97 | |||
| 98 | 2010-05-14 Jay Belanger <jay.p.belanger@gmail.com> | ||
| 99 | |||
| 100 | * calc/calc-bin.el (math-format-twos-complement): Group digits when | ||
| 101 | appropriate. | ||
| 102 | |||
| 103 | 2010-05-14 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 104 | |||
| 105 | * progmodes/sh-script.el (sh-mode-default-syntax-table): Remove. | ||
| 106 | (sh-mode-syntax-table): Give it a default value instead. | ||
| 107 | (sh-header-marker): Make buffer-local. | ||
| 108 | (sh-mode): Move make-local-variable to the corresponding setq. | ||
| 109 | (sh-add-completer): Avoid gratuitously let-binding a buffer-local var. | ||
| 110 | Use complete-with-action. | ||
| 111 | |||
| 112 | * simple.el (prog-mode): New (abstract) major mode. | ||
| 113 | * emacs-lisp/lisp-mode.el (emacs-lisp-mode, lisp-mode): Use it. | ||
| 114 | * progmodes/sh-script.el (sh-mode): Remove redundant var assignment. | ||
| 115 | |||
| 116 | 2010-05-14 Juanma Barranquero <lekktu@gmail.com> | ||
| 117 | |||
| 118 | * progmodes/sql.el (sql-oracle-program): Reflow docstring. | ||
| 119 | (sql-oracle-scan-on, sql-sybase-program, sql-product-font-lock) | ||
| 120 | (sql-add-product-keywords, sql-highlight-product, sql-set-product) | ||
| 121 | (sql-make-alternate-buffer-name, sql-placeholders-filter) | ||
| 122 | (sql-escape-newlines-filter, sql-input-sender) | ||
| 123 | (sql-send-magic-terminator, sql-sybase): Fix typos in docstrings. | ||
| 124 | |||
| 7 | 2010-05-13 Chong Yidong <cyd@stupidchicken.com> | 125 | 2010-05-13 Chong Yidong <cyd@stupidchicken.com> |
| 8 | 126 | ||
| 9 | Add TeX open-block and close-block keybindings to SGML, and vice | 127 | Add TeX open-block and close-block keybindings to SGML, and vice versa. |
| 10 | versa. | ||
| 11 | 128 | ||
| 12 | * textmodes/tex-mode.el (tex-mode-map): Bind C-c C-t to | 129 | * textmodes/tex-mode.el (tex-mode-map): Bind C-c C-t to |
| 13 | latex-open-block and C-c / to latex-close-block. | 130 | latex-open-block and C-c / to latex-close-block. |
| @@ -21,8 +138,8 @@ | |||
| 21 | only when the message would be displayed. Handled nested calls. | 138 | only when the message would be displayed. Handled nested calls. |
| 22 | (tramp-handle-load, tramp-handle-file-local-copy) | 139 | (tramp-handle-load, tramp-handle-file-local-copy) |
| 23 | (tramp-handle-insert-file-contents, tramp-handle-write-region) | 140 | (tramp-handle-insert-file-contents, tramp-handle-write-region) |
| 24 | (tramp-maybe-send-script, tramp-find-shell): Use | 141 | (tramp-maybe-send-script, tramp-find-shell): |
| 25 | `with-progress-reporter'. | 142 | Use `with-progress-reporter'. |
| 26 | (tramp-handle-dired-compress-file, tramp-maybe-open-connection): | 143 | (tramp-handle-dired-compress-file, tramp-maybe-open-connection): |
| 27 | Fix message text. | 144 | Fix message text. |
| 28 | 145 | ||
| @@ -313,7 +430,7 @@ | |||
| 313 | 430 | ||
| 314 | * Version 23.2 released. | 431 | * Version 23.2 released. |
| 315 | 432 | ||
| 316 | 2010-05-07 Deniz Dogan <deniz.a.m.dogan@gmail.com> (tiny change) | 433 | 2010-05-07 Deniz Dogan <deniz.a.m.dogan@gmail.com> (tiny change) |
| 317 | Stefan Monnier <monnier@iro.umontreal.ca> | 434 | Stefan Monnier <monnier@iro.umontreal.ca> |
| 318 | 435 | ||
| 319 | Highlight vendor specific properties. | 436 | Highlight vendor specific properties. |
| @@ -334,7 +451,7 @@ | |||
| 334 | * simple.el (auto-save-mode): Move from files.el. | 451 | * simple.el (auto-save-mode): Move from files.el. |
| 335 | * minibuffer.el (completion--common-suffix): Fix copy&paste error. | 452 | * minibuffer.el (completion--common-suffix): Fix copy&paste error. |
| 336 | 453 | ||
| 337 | 2010-05-07 Christian von Roques <roques@mti.ag> (tiny change) | 454 | 2010-05-07 Christian von Roques <roques@mti.ag> (tiny change) |
| 338 | 455 | ||
| 339 | * lisp/epg.el (epg-key-capablity-alist): Add "D" flag (Bug#5592). | 456 | * lisp/epg.el (epg-key-capablity-alist): Add "D" flag (Bug#5592). |
| 340 | 457 | ||
diff --git a/lisp/Makefile.in b/lisp/Makefile.in index fe7dcfa4e99..4effdddff6a 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in | |||
| @@ -84,28 +84,25 @@ COMPILE_FIRST = \ | |||
| 84 | emacs = EMACSLOADPATH=$(lisp) LC_ALL=C $(EMACS) $(EMACSOPT) | 84 | emacs = EMACSLOADPATH=$(lisp) LC_ALL=C $(EMACS) $(EMACSOPT) |
| 85 | 85 | ||
| 86 | # Common command to find subdirectories | 86 | # Common command to find subdirectories |
| 87 | |||
| 88 | setwins=subdirs=`(find . -type d -print)`; \ | 87 | setwins=subdirs=`(find . -type d -print)`; \ |
| 89 | for file in $$subdirs; do \ | 88 | for file in $$subdirs; do \ |
| 90 | case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* ) ;; \ | 89 | case $$file in */.* | */.*/* | */=* ) ;; \ |
| 91 | *) wins="$$wins $$file" ;; \ | 90 | *) wins="$$wins $$file" ;; \ |
| 92 | esac; \ | 91 | esac; \ |
| 93 | done | 92 | done |
| 94 | 93 | ||
| 95 | # Find all subdirectories except `obsolete' and `term'. | 94 | # Find all subdirectories except `obsolete' and `term'. |
| 96 | |||
| 97 | setwins_almost=subdirs=`(find . -type d -print)`; \ | 95 | setwins_almost=subdirs=`(find . -type d -print)`; \ |
| 98 | for file in $$subdirs; do \ | 96 | for file in $$subdirs; do \ |
| 99 | case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* | */obsolete | */term ) ;; \ | 97 | case $$file in */.* | */.*/* | */=* | */obsolete | */term ) ;; \ |
| 100 | *) wins="$$wins $$file" ;; \ | 98 | *) wins="$$wins $$file" ;; \ |
| 101 | esac; \ | 99 | esac; \ |
| 102 | done | 100 | done |
| 103 | 101 | ||
| 104 | # Find all subdirectories in which we might want to create subdirs.el | 102 | # Find all subdirectories in which we might want to create subdirs.el |
| 105 | |||
| 106 | setwins_for_subdirs=subdirs=`(find . -type d -print)`; \ | 103 | setwins_for_subdirs=subdirs=`(find . -type d -print)`; \ |
| 107 | for file in $$subdirs; do \ | 104 | for file in $$subdirs; do \ |
| 108 | case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* | */cedet* ) ;; \ | 105 | case $$file in */.* | */.*/* | */=* | */cedet* ) ;; \ |
| 109 | *) wins="$$wins $$file" ;; \ | 106 | *) wins="$$wins $$file" ;; \ |
| 110 | esac; \ | 107 | esac; \ |
| 111 | done | 108 | done |
diff --git a/lisp/bindings.el b/lisp/bindings.el index 05a0ac8bc11..14cebfeda8f 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -828,9 +828,9 @@ is okay. See `mode-line-format'.") | |||
| 828 | (define-key global-map [C-home] 'beginning-of-buffer) | 828 | (define-key global-map [C-home] 'beginning-of-buffer) |
| 829 | (define-key global-map [M-home] 'beginning-of-buffer-other-window) | 829 | (define-key global-map [M-home] 'beginning-of-buffer-other-window) |
| 830 | (define-key esc-map [home] 'beginning-of-buffer-other-window) | 830 | (define-key esc-map [home] 'beginning-of-buffer-other-window) |
| 831 | (define-key global-map [left] 'backward-char) | 831 | (define-key global-map [left] 'left-arrow-command) |
| 832 | (define-key global-map [up] 'previous-line) | 832 | (define-key global-map [up] 'previous-line) |
| 833 | (define-key global-map [right] 'forward-char) | 833 | (define-key global-map [right] 'right-arrow-command) |
| 834 | (define-key global-map [down] 'next-line) | 834 | (define-key global-map [down] 'next-line) |
| 835 | (define-key global-map [prior] 'scroll-down-command) | 835 | (define-key global-map [prior] 'scroll-down-command) |
| 836 | (define-key global-map [next] 'scroll-up-command) | 836 | (define-key global-map [next] 'scroll-up-command) |
diff --git a/lisp/calc/README b/lisp/calc/README index 3e3acaebb27..4b32ada63ad 100644 --- a/lisp/calc/README +++ b/lisp/calc/README | |||
| @@ -74,6 +74,8 @@ Summary of changes to "Calc" | |||
| 74 | 74 | ||
| 75 | Emacs 24.1 | 75 | Emacs 24.1 |
| 76 | 76 | ||
| 77 | * Gave `calc-histogram' the option of using a vector to determine the bins. | ||
| 78 | |||
| 77 | * Added "O" option prefix. | 79 | * Added "O" option prefix. |
| 78 | 80 | ||
| 79 | * Used "O" prefix to "d r" (`calc-radix') to turn on twos-complement mode. | 81 | * Used "O" prefix to "d r" (`calc-radix') to turn on twos-complement mode. |
diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el index 58e30a237f9..77a02b58c73 100644 --- a/lisp/calc/calc-aent.el +++ b/lisp/calc/calc-aent.el | |||
| @@ -510,6 +510,7 @@ The value t means abort and give an error message.") | |||
| 510 | ("≥" ">=") | 510 | ("≥" ">=") |
| 511 | ("≦" "<=") | 511 | ("≦" "<=") |
| 512 | ("≧" ">=") | 512 | ("≧" ">=") |
| 513 | ("µ" "μ") | ||
| 513 | ;; fractions | 514 | ;; fractions |
| 514 | ("¼" "(1:4)") ; 1/4 | 515 | ("¼" "(1:4)") ; 1/4 |
| 515 | ("½" "(1:2)") ; 1/2 | 516 | ("½" "(1:2)") ; 1/2 |
| @@ -675,11 +676,11 @@ in Calc algebraic input.") | |||
| 675 | (cond ((and (stringp (car p)) | 676 | (cond ((and (stringp (car p)) |
| 676 | (or (> (length (car p)) 1) (equal (car p) "$") | 677 | (or (> (length (car p)) 1) (equal (car p) "$") |
| 677 | (equal (car p) "\"")) | 678 | (equal (car p) "\"")) |
| 678 | (string-match "[^a-zA-Z0-9]" (car p))) | 679 | (string-match "[^a-zA-Zα-ωΑ-Ω0-9]" (car p))) |
| 679 | (let ((s (regexp-quote (car p)))) | 680 | (let ((s (regexp-quote (car p)))) |
| 680 | (if (string-match "\\`[a-zA-Z0-9]" s) | 681 | (if (string-match "\\`[a-zA-Zα-ωΑ-Ω0-9]" s) |
| 681 | (setq s (concat "\\<" s))) | 682 | (setq s (concat "\\<" s))) |
| 682 | (if (string-match "[a-zA-Z0-9]\\'" s) | 683 | (if (string-match "[a-zA-Zα-ωΑ-Ω0-9]\\'" s) |
| 683 | (setq s (concat s "\\>"))) | 684 | (setq s (concat s "\\>"))) |
| 684 | (or (assoc s math-toks) | 685 | (or (assoc s math-toks) |
| 685 | (progn | 686 | (progn |
| @@ -718,15 +719,17 @@ in Calc algebraic input.") | |||
| 718 | math-expr-data (math-match-substring math-exp-str 0) | 719 | math-expr-data (math-match-substring math-exp-str 0) |
| 719 | math-exp-pos (match-end 0))) | 720 | math-exp-pos (match-end 0))) |
| 720 | ((or (and (>= ch ?a) (<= ch ?z)) | 721 | ((or (and (>= ch ?a) (<= ch ?z)) |
| 721 | (and (>= ch ?A) (<= ch ?Z))) | 722 | (and (>= ch ?A) (<= ch ?Z)) |
| 723 | (and (>= ch ?α) (<= ch ?ω)) | ||
| 724 | (and (>= ch ?Α) (<= ch ?Ω))) | ||
| 722 | (string-match | 725 | (string-match |
| 723 | (cond | 726 | (cond |
| 724 | ((and (memq calc-language calc-lang-allow-underscores) | 727 | ((and (memq calc-language calc-lang-allow-underscores) |
| 725 | (memq calc-language calc-lang-allow-percentsigns)) | 728 | (memq calc-language calc-lang-allow-percentsigns)) |
| 726 | "[a-zA-Z0-9_'#]*") | 729 | "[a-zA-Zα-ωΑ-Ω0-9_'#]*") |
| 727 | ((memq calc-language calc-lang-allow-underscores) | 730 | ((memq calc-language calc-lang-allow-underscores) |
| 728 | "[a-zA-Z0-9_#]*") | 731 | "[a-zA-Zα-ωΑ-Ω0-9_#]*") |
| 729 | (t "[a-zA-Z0-9'#]*")) | 732 | (t "[a-zA-Zα-ωΑ-Ω0-9'#]*")) |
| 730 | math-exp-str math-exp-pos) | 733 | math-exp-str math-exp-pos) |
| 731 | (setq math-exp-token 'symbol | 734 | (setq math-exp-token 'symbol |
| 732 | math-exp-pos (match-end 0) | 735 | math-exp-pos (match-end 0) |
| @@ -744,12 +747,12 @@ in Calc algebraic input.") | |||
| 744 | (or (eq math-exp-pos 0) | 747 | (or (eq math-exp-pos 0) |
| 745 | (and (not (memq calc-language | 748 | (and (not (memq calc-language |
| 746 | calc-lang-allow-underscores)) | 749 | calc-lang-allow-underscores)) |
| 747 | (eq (string-match "[^])}\"a-zA-Z0-9'$]_" | 750 | (eq (string-match "[^])}\"a-zA-Zα-ωΑ-Ω0-9'$]_" |
| 748 | math-exp-str (1- math-exp-pos)) | 751 | math-exp-str (1- math-exp-pos)) |
| 749 | (1- math-exp-pos)))))) | 752 | (1- math-exp-pos)))))) |
| 750 | (or (and (memq calc-language calc-lang-c-type-hex) | 753 | (or (and (memq calc-language calc-lang-c-type-hex) |
| 751 | (string-match "0[xX][0-9a-fA-F]+" math-exp-str math-exp-pos)) | 754 | (string-match "0[xX][0-9a-fA-F]+" math-exp-str math-exp-pos)) |
| 752 | (string-match "_?\\([0-9]+.?0*@ *\\)?\\([0-9]+.?0*' *\\)?\\(0*\\([2-9]\\|1[0-4]\\)\\(#[#]?\\|\\^\\^\\)[0-9a-dA-D.]+[eE][-+_]?[0-9]+\\|0*\\([2-9]\\|[0-2][0-9]\\|3[0-6]\\)\\(#[#]?\\|\\^\\^\\)[0-9a-zA-Z:.]+\\|[0-9]+:[0-9:]+\\|[0-9.]+\\([eE][-+_]?[0-9]+\\)?\"?\\)?" | 755 | (string-match "_?\\([0-9]+.?0*@ *\\)?\\([0-9]+.?0*' *\\)?\\(0*\\([2-9]\\|1[0-4]\\)\\(#[#]?\\|\\^\\^\\)[0-9a-dA-D.]+[eE][-+_]?[0-9]+\\|0*\\([2-9]\\|[0-2][0-9]\\|3[0-6]\\)\\(#[#]?\\|\\^\\^\\)[0-9a-zA-Zα-ωΑ-Ω:.]+\\|[0-9]+:[0-9:]+\\|[0-9.]+\\([eE][-+_]?[0-9]+\\)?\"?\\)?" |
| 753 | math-exp-str math-exp-pos)) | 756 | math-exp-str math-exp-pos)) |
| 754 | (setq math-exp-token 'number | 757 | (setq math-exp-token 'number |
| 755 | math-expr-data (math-match-substring math-exp-str 0) | 758 | math-expr-data (math-match-substring math-exp-str 0) |
diff --git a/lisp/calc/calc-bin.el b/lisp/calc/calc-bin.el index 0e31fbe681c..4ab698ea640 100644 --- a/lisp/calc/calc-bin.el +++ b/lisp/calc/calc-bin.el | |||
| @@ -845,6 +845,8 @@ the size of a Calc bignum digit.") | |||
| 845 | (len (length num))) | 845 | (len (length num))) |
| 846 | (if (< len digs) | 846 | (if (< len digs) |
| 847 | (setq num (concat (make-string (- digs len) ?0) num)))) | 847 | (setq num (concat (make-string (- digs len) ?0) num)))) |
| 848 | (when calc-group-digits | ||
| 849 | (setq num (math-group-float num))) | ||
| 848 | (concat | 850 | (concat |
| 849 | (number-to-string calc-number-radix) | 851 | (number-to-string calc-number-radix) |
| 850 | "##" | 852 | "##" |
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index f6f8e3d03d9..17dc9293237 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el | |||
| @@ -3283,7 +3283,7 @@ If X is not an error form, return 1." | |||
| 3283 | (concat "-" (math-format-flat-expr (nth 1 a) 1000))) | 3283 | (concat "-" (math-format-flat-expr (nth 1 a) 1000))) |
| 3284 | (t | 3284 | (t |
| 3285 | (concat (math-remove-dashes | 3285 | (concat (math-remove-dashes |
| 3286 | (if (string-match "\\`calcFunc-\\([a-zA-Z0-9']+\\)\\'" | 3286 | (if (string-match "\\`calcFunc-\\([a-zA-Zα-ωΑ-Ω0-9']+\\)\\'" |
| 3287 | (symbol-name (car a))) | 3287 | (symbol-name (car a))) |
| 3288 | (math-match-substring (symbol-name (car a)) 1) | 3288 | (math-match-substring (symbol-name (car a)) 1) |
| 3289 | (symbol-name (car a)))) | 3289 | (symbol-name (car a)))) |
| @@ -3469,7 +3469,8 @@ If X is not an error form, return 1." | |||
| 3469 | 3469 | ||
| 3470 | (defun math-group-float (str) ; [X X] | 3470 | (defun math-group-float (str) ; [X X] |
| 3471 | (let* ((pt (or (string-match "[^0-9a-zA-Z]" str) (length str))) | 3471 | (let* ((pt (or (string-match "[^0-9a-zA-Z]" str) (length str))) |
| 3472 | (g (if (integerp calc-group-digits) (math-abs calc-group-digits) 3)) | 3472 | (g (if (integerp calc-group-digits) (math-abs calc-group-digits) |
| 3473 | (if (memq calc-number-radix '(2 16)) 4 3))) | ||
| 3473 | (i pt)) | 3474 | (i pt)) |
| 3474 | (if (and (integerp calc-group-digits) (< calc-group-digits 0)) | 3475 | (if (and (integerp calc-group-digits) (< calc-group-digits 0)) |
| 3475 | (while (< (setq i (+ (1+ i) g)) (length str)) | 3476 | (while (< (setq i (+ (1+ i) g)) (length str)) |
diff --git a/lisp/calc/calc-lang.el b/lisp/calc/calc-lang.el index cd30232feee..0ebf1a18fef 100644 --- a/lisp/calc/calc-lang.el +++ b/lisp/calc/calc-lang.el | |||
| @@ -214,7 +214,7 @@ | |||
| 214 | (put 'pascal 'math-lang-read-symbol | 214 | (put 'pascal 'math-lang-read-symbol |
| 215 | '((?\$ | 215 | '((?\$ |
| 216 | (eq (string-match | 216 | (eq (string-match |
| 217 | "\\(\\$[0-9a-fA-F]+\\)\\($\\|[^0-9a-zA-Z]\\)" | 217 | "\\(\\$[0-9a-fA-F]+\\)\\($\\|[^0-9a-zA-Zα-ωΑ-Ω]\\)" |
| 218 | math-exp-str math-exp-pos) | 218 | math-exp-str math-exp-pos) |
| 219 | math-exp-pos) | 219 | math-exp-pos) |
| 220 | (setq math-exp-token 'number | 220 | (setq math-exp-token 'number |
| @@ -312,7 +312,7 @@ | |||
| 312 | 312 | ||
| 313 | (put 'fortran 'math-lang-read-symbol | 313 | (put 'fortran 'math-lang-read-symbol |
| 314 | '((?\. | 314 | '((?\. |
| 315 | (eq (string-match "\\.[a-zA-Z][a-zA-Z][a-zA-Z]?\\." | 315 | (eq (string-match "\\.[a-zA-Zα-ωΑ-Ω][a-zA-Zα-ωΑ-Ω][a-zA-Zα-ωΑ-Ω]?\\." |
| 316 | math-exp-str math-exp-pos) math-exp-pos) | 316 | math-exp-str math-exp-pos) math-exp-pos) |
| 317 | (setq math-exp-token 'punc | 317 | (setq math-exp-token 'punc |
| 318 | math-expr-data (upcase (math-match-substring math-exp-str 0)) | 318 | math-expr-data (upcase (math-match-substring math-exp-str 0)) |
| @@ -603,9 +603,9 @@ | |||
| 603 | '((?\\ | 603 | '((?\\ |
| 604 | (< math-exp-pos (1- (length math-exp-str))) | 604 | (< math-exp-pos (1- (length math-exp-str))) |
| 605 | (progn | 605 | (progn |
| 606 | (or (string-match "\\\\hbox *{\\([a-zA-Z0-9]+\\)}" | 606 | (or (string-match "\\\\hbox *{\\([a-zA-Zα-ωΑ-Ω0-9]+\\)}" |
| 607 | math-exp-str math-exp-pos) | 607 | math-exp-str math-exp-pos) |
| 608 | (string-match "\\(\\\\\\([a-zA-Z]+\\|[^a-zA-Z]\\)\\)" | 608 | (string-match "\\(\\\\\\([a-zA-Zα-ωΑ-Ω]+\\|[^a-zA-Zα-ωΑ-Ω]\\)\\)" |
| 609 | math-exp-str math-exp-pos)) | 609 | math-exp-str math-exp-pos)) |
| 610 | (setq math-exp-token 'symbol | 610 | (setq math-exp-token 'symbol |
| 611 | math-exp-pos (match-end 0) | 611 | math-exp-pos (match-end 0) |
| @@ -691,7 +691,7 @@ | |||
| 691 | (defun math-compose-tex-var (a prec) | 691 | (defun math-compose-tex-var (a prec) |
| 692 | (if (and calc-language-option | 692 | (if (and calc-language-option |
| 693 | (not (= calc-language-option 0)) | 693 | (not (= calc-language-option 0)) |
| 694 | (string-match "\\`[a-zA-Z][a-zA-Z0-9]+\\'" | 694 | (string-match "\\`[a-zA-Zα-ωΑ-Ω][a-zA-Zα-ωΑ-Ω0-9]+\\'" |
| 695 | (symbol-name (nth 1 a)))) | 695 | (symbol-name (nth 1 a)))) |
| 696 | (if (eq calc-language 'latex) | 696 | (if (eq calc-language 'latex) |
| 697 | (format "\\text{%s}" (symbol-name (nth 1 a))) | 697 | (format "\\text{%s}" (symbol-name (nth 1 a))) |
| @@ -702,7 +702,7 @@ | |||
| 702 | (let (left right) | 702 | (let (left right) |
| 703 | (if (and calc-language-option | 703 | (if (and calc-language-option |
| 704 | (not (= calc-language-option 0)) | 704 | (not (= calc-language-option 0)) |
| 705 | (string-match "\\`[a-zA-Z][a-zA-Z0-9]+\\'" func)) | 705 | (string-match "\\`[a-zA-Zα-ωΑ-Ω][a-zA-Zα-ωΑ-Ω0-9]+\\'" func)) |
| 706 | (if (< (prefix-numeric-value calc-language-option) 0) | 706 | (if (< (prefix-numeric-value calc-language-option) 0) |
| 707 | (setq func (format "\\%s" func)) | 707 | (setq func (format "\\%s" func)) |
| 708 | (setq func (if (eq calc-language 'latex) | 708 | (setq func (if (eq calc-language 'latex) |
| @@ -824,11 +824,11 @@ | |||
| 824 | '((?\\ | 824 | '((?\\ |
| 825 | (< math-exp-pos (1- (length math-exp-str))) | 825 | (< math-exp-pos (1- (length math-exp-str))) |
| 826 | (progn | 826 | (progn |
| 827 | (or (string-match "\\\\hbox *{\\([a-zA-Z0-9]+\\)}" | 827 | (or (string-match "\\\\hbox *{\\([a-zA-Zα-ωΑ-Ω0-9]+\\)}" |
| 828 | math-exp-str math-exp-pos) | 828 | math-exp-str math-exp-pos) |
| 829 | (string-match "\\\\text *{\\([a-zA-Z0-9]+\\)}" | 829 | (string-match "\\\\text *{\\([a-zA-Zα-ωΑ-Ω0-9]+\\)}" |
| 830 | math-exp-str math-exp-pos) | 830 | math-exp-str math-exp-pos) |
| 831 | (string-match "\\(\\\\\\([a-zA-Z]+\\|[^a-zA-Z]\\)\\)" | 831 | (string-match "\\(\\\\\\([a-zA-Zα-ωΑ-Ω]+\\|[^a-zA-Zα-ωΑ-Ω]\\)\\)" |
| 832 | math-exp-str math-exp-pos)) | 832 | math-exp-str math-exp-pos)) |
| 833 | (setq math-exp-token 'symbol | 833 | (setq math-exp-token 'symbol |
| 834 | math-exp-pos (match-end 0) | 834 | math-exp-pos (match-end 0) |
| @@ -2301,9 +2301,11 @@ order to Calc's." | |||
| 2301 | 2301 | ||
| 2302 | ;; Variable name or function call. | 2302 | ;; Variable name or function call. |
| 2303 | ((or (and (>= other-char ?a) (<= other-char ?z)) | 2303 | ((or (and (>= other-char ?a) (<= other-char ?z)) |
| 2304 | (and (>= other-char ?A) (<= other-char ?Z))) | 2304 | (and (>= other-char ?A) (<= other-char ?Z)) |
| 2305 | (and (>= other-char ?α) (<= other-char ?ω)) | ||
| 2306 | (and (>= other-char ?Α) (<= other-char ?Ω))) | ||
| 2305 | (setq line (nth v math-read-big-lines)) | 2307 | (setq line (nth v math-read-big-lines)) |
| 2306 | (string-match "\\([a-zA-Z'_]+\\) *" line math-rb-h1) | 2308 | (string-match "\\([a-zA-Zα-ωΑ-Ω'_]+\\) *" line math-rb-h1) |
| 2307 | (setq h (match-end 1) | 2309 | (setq h (match-end 1) |
| 2308 | widest (match-end 0) | 2310 | widest (match-end 0) |
| 2309 | p (math-match-substring line 1)) | 2311 | p (math-match-substring line 1)) |
diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el index 5ec21eee887..8f73e71b0f9 100644 --- a/lisp/calc/calc-store.el +++ b/lisp/calc/calc-store.el | |||
| @@ -202,7 +202,7 @@ | |||
| 202 | 'calc-read-var-name-history))))) | 202 | 'calc-read-var-name-history))))) |
| 203 | (setq calc-aborted-prefix "") | 203 | (setq calc-aborted-prefix "") |
| 204 | (and (not (equal var "var-")) | 204 | (and (not (equal var "var-")) |
| 205 | (if (string-match "\\`\\([-a-zA-Z0-9]+\\) *:?=" var) | 205 | (if (string-match "\\`\\([-a-zA-Zα-ωΑ-Ω0-9]+\\) *:?=" var) |
| 206 | (if (null calc-given-value-flag) | 206 | (if (null calc-given-value-flag) |
| 207 | (error "Assignment is not allowed in this command") | 207 | (error "Assignment is not allowed in this command") |
| 208 | (let ((svar (intern (substring var 0 (match-end 1))))) | 208 | (let ((svar (intern (substring var 0 (match-end 1))))) |
diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el index 6dd3e4911b7..6881db3fb12 100644 --- a/lisp/calc/calc-units.el +++ b/lisp/calc/calc-units.el | |||
| @@ -36,13 +36,13 @@ | |||
| 36 | 36 | ||
| 37 | ;;; Units table last updated 9-Jan-91 by Ulrich Mueller (ulm@vsnhd1.cern.ch) | 37 | ;;; Units table last updated 9-Jan-91 by Ulrich Mueller (ulm@vsnhd1.cern.ch) |
| 38 | ;;; with some additions by Przemek Klosowski (przemek@rrdstrad.nist.gov) | 38 | ;;; with some additions by Przemek Klosowski (przemek@rrdstrad.nist.gov) |
| 39 | ;;; Updated April 2002 by Jochen Küpper | 39 | ;;; Updated April 2002 by Jochen Küpper |
| 40 | 40 | ||
| 41 | ;;; Updated August 2007, using | 41 | ;;; Updated August 2007, using |
| 42 | ;;; CODATA (http://physics.nist.gov/cuu/Constants/index.html) | 42 | ;;; CODATA (http://physics.nist.gov/cuu/Constants/index.html) |
| 43 | ;;; NIST (http://physics.nist.gov/Pubs/SP811/appenB9.html) | 43 | ;;; NIST (http://physics.nist.gov/Pubs/SP811/appenB9.html) |
| 44 | ;;; ESUWM (Encyclopaedia of Scientific Units, Weights and | 44 | ;;; ESUWM (Encyclopaedia of Scientific Units, Weights and |
| 45 | ;;; Measures, by François Cardarelli) | 45 | ;;; Measures, by François Cardarelli) |
| 46 | ;;; All conversions are exact unless otherwise noted. | 46 | ;;; All conversions are exact unless otherwise noted. |
| 47 | 47 | ||
| 48 | (defvar math-standard-units | 48 | (defvar math-standard-units |
| @@ -210,6 +210,7 @@ | |||
| 210 | "1.602176487 10^-19 C (*)") ;;(approx) CODATA | 210 | "1.602176487 10^-19 C (*)") ;;(approx) CODATA |
| 211 | ( V "W/A" "Volt" ) | 211 | ( V "W/A" "Volt" ) |
| 212 | ( ohm "V/A" "Ohm" ) | 212 | ( ohm "V/A" "Ohm" ) |
| 213 | ( Ω "ohm" "Ohm" ) | ||
| 213 | ( mho "A/V" "Mho" ) | 214 | ( mho "A/V" "Mho" ) |
| 214 | ( S "A/V" "Siemens" ) | 215 | ( S "A/V" "Siemens" ) |
| 215 | ( F "C/V" "Farad" ) | 216 | ( F "C/V" "Farad" ) |
| @@ -259,7 +260,9 @@ | |||
| 259 | "6.62606896 10^-34 J s (*)") | 260 | "6.62606896 10^-34 J s (*)") |
| 260 | ( hbar "h / (2 pi)" "Planck's constant" ) ;; Exact | 261 | ( hbar "h / (2 pi)" "Planck's constant" ) ;; Exact |
| 261 | ( mu0 "4 pi 10^(-7) H/m" "Permeability of vacuum") ;; Exact | 262 | ( mu0 "4 pi 10^(-7) H/m" "Permeability of vacuum") ;; Exact |
| 263 | ( μ0 "mu0" "Permeability of vacuum") ;; Exact | ||
| 262 | ( eps0 "1 / (mu0 c^2)" "Permittivity of vacuum" ) | 264 | ( eps0 "1 / (mu0 c^2)" "Permittivity of vacuum" ) |
| 265 | ( ε0 "eps0" "Permittivity of vacuum" ) | ||
| 263 | ( G "6.67428*10^(-11) m^3/(kg s^2)" "Gravitational constant" nil | 266 | ( G "6.67428*10^(-11) m^3/(kg s^2)" "Gravitational constant" nil |
| 264 | "6.67428 10^-11 m^3/(kg s^2) (*)") | 267 | "6.67428 10^-11 m^3/(kg s^2) (*)") |
| 265 | ( Nav "6.02214179*10^(23) / mol" "Avogadro's constant" nil | 268 | ( Nav "6.02214179*10^(23) / mol" "Avogadro's constant" nil |
| @@ -272,12 +275,16 @@ | |||
| 272 | "1.674927211 10^-27 kg (*)") | 275 | "1.674927211 10^-27 kg (*)") |
| 273 | ( mmu "1.88353130*10^(-28) kg" "Muon rest mass" nil | 276 | ( mmu "1.88353130*10^(-28) kg" "Muon rest mass" nil |
| 274 | "1.88353130 10^-28 kg (*)") | 277 | "1.88353130 10^-28 kg (*)") |
| 278 | ( mμ "mmu" "Muon rest mass" nil | ||
| 279 | "1.88353130 10^-28 kg (*)") | ||
| 275 | ( Ryd "10973731.568527 /m" "Rydberg's constant" nil | 280 | ( Ryd "10973731.568527 /m" "Rydberg's constant" nil |
| 276 | "10973731.568527 /m (*)") | 281 | "10973731.568527 /m (*)") |
| 277 | ( k "1.3806504*10^(-23) J/K" "Boltzmann's constant" nil | 282 | ( k "1.3806504*10^(-23) J/K" "Boltzmann's constant" nil |
| 278 | "1.3806504 10^-23 J/K (*)") | 283 | "1.3806504 10^-23 J/K (*)") |
| 279 | ( alpha "7.2973525376*10^(-3)" "Fine structure constant" nil | 284 | ( alpha "7.2973525376*10^(-3)" "Fine structure constant" nil |
| 280 | "7.2973525376 10^-3 (*)") | 285 | "7.2973525376 10^-3 (*)") |
| 286 | ( α "alpha" "Fine structure constant" nil | ||
| 287 | "7.2973525376 10^-3 (*)") | ||
| 281 | ( muB "927.400915*10^(-26) J/T" "Bohr magneton" nil | 288 | ( muB "927.400915*10^(-26) J/T" "Bohr magneton" nil |
| 282 | "927.400915 10^-26 J/T (*)") | 289 | "927.400915 10^-26 J/T (*)") |
| 283 | ( muN "5.05078324*10^(-27) J/T" "Nuclear magneton" nil | 290 | ( muN "5.05078324*10^(-27) J/T" "Nuclear magneton" nil |
| @@ -316,6 +323,7 @@ that the combined units table will be rebuilt.") | |||
| 316 | ( ?c (^ 10 -2) "Centi" ) | 323 | ( ?c (^ 10 -2) "Centi" ) |
| 317 | ( ?m (^ 10 -3) "Milli" ) | 324 | ( ?m (^ 10 -3) "Milli" ) |
| 318 | ( ?u (^ 10 -6) "Micro" ) | 325 | ( ?u (^ 10 -6) "Micro" ) |
| 326 | ( ?μ (^ 10 -6) "Micro" ) | ||
| 319 | ( ?n (^ 10 -9) "Nano" ) | 327 | ( ?n (^ 10 -9) "Nano" ) |
| 320 | ( ?p (^ 10 -12) "Pico" ) | 328 | ( ?p (^ 10 -12) "Pico" ) |
| 321 | ( ?f (^ 10 -15) "Femto" ) | 329 | ( ?f (^ 10 -15) "Femto" ) |
| @@ -581,8 +589,8 @@ If EXPR is nil, return nil." | |||
| 581 | (let ((name (or (nth 2 u) (symbol-name (car u))))) | 589 | (let ((name (or (nth 2 u) (symbol-name (car u))))) |
| 582 | (if (eq (aref name 0) ?\*) | 590 | (if (eq (aref name 0) ?\*) |
| 583 | (setq name (substring name 1))) | 591 | (setq name (substring name 1))) |
| 584 | (if (string-match "[^a-zA-Z0-9']" name) | 592 | (if (string-match "[^a-zA-Zα-ωΑ-Ω0-9']" name) |
| 585 | (if (string-match "^[a-zA-Z0-9' ()]*$" name) | 593 | (if (string-match "^[a-zA-Zα-ωΑ-Ω0-9' ()]*$" name) |
| 586 | (while (setq pos (string-match "[ ()]" name)) | 594 | (while (setq pos (string-match "[ ()]" name)) |
| 587 | (setq name (concat (substring name 0 pos) | 595 | (setq name (concat (substring name 0 pos) |
| 588 | (if (eq (aref name pos) 32) "-" "") | 596 | (if (eq (aref name pos) 32) "-" "") |
| @@ -592,7 +600,7 @@ If EXPR is nil, return nil." | |||
| 592 | (setq name (concat (nth 2 (assq (aref (symbol-name | 600 | (setq name (concat (nth 2 (assq (aref (symbol-name |
| 593 | (nth 1 expr)) 0) | 601 | (nth 1 expr)) 0) |
| 594 | math-unit-prefixes)) | 602 | math-unit-prefixes)) |
| 595 | (if (and (string-match "[^a-zA-Z0-9']" name) | 603 | (if (and (string-match "[^a-zA-Zα-ωΑ-Ω0-9']" name) |
| 596 | (not (memq (car u) '(mHg gf)))) | 604 | (not (memq (car u) '(mHg gf)))) |
| 597 | (concat "-" name) | 605 | (concat "-" name) |
| 598 | (downcase name))))) | 606 | (downcase name))))) |
| @@ -1540,9 +1548,5 @@ If EXPR is nil, return nil." | |||
| 1540 | 1548 | ||
| 1541 | (provide 'calc-units) | 1549 | (provide 'calc-units) |
| 1542 | 1550 | ||
| 1543 | ;; Local Variables: | ||
| 1544 | ;; coding: iso-latin-1 | ||
| 1545 | ;; End: | ||
| 1546 | |||
| 1547 | ;; arch-tag: e993314f-3adc-4191-be61-4ef8874881c4 | 1551 | ;; arch-tag: e993314f-3adc-4191-be61-4ef8874881c4 |
| 1548 | ;;; calc-units.el ends here | 1552 | ;;; calc-units.el ends here |
diff --git a/lisp/calc/calc-vec.el b/lisp/calc/calc-vec.el index c4de362ab36..5b807a55491 100644 --- a/lisp/calc/calc-vec.el +++ b/lisp/calc/calc-vec.el | |||
| @@ -451,16 +451,18 @@ | |||
| 451 | (calc-enter-result 1 "grad" (list 'calcFunc-grade (calc-top-n 1)))))) | 451 | (calc-enter-result 1 "grad" (list 'calcFunc-grade (calc-top-n 1)))))) |
| 452 | 452 | ||
| 453 | (defun calc-histogram (n) | 453 | (defun calc-histogram (n) |
| 454 | (interactive "NNumber of bins: ") | 454 | (interactive "P") |
| 455 | (unless (natnump n) | ||
| 456 | (setq n (math-read-expr (read-string "Centers of bins: ")))) | ||
| 455 | (calc-slow-wrapper | 457 | (calc-slow-wrapper |
| 456 | (if calc-hyperbolic-flag | 458 | (if calc-hyperbolic-flag |
| 457 | (calc-enter-result 2 "hist" (list 'calcFunc-histogram | 459 | (calc-enter-result 2 "hist" (list 'calcFunc-histogram |
| 458 | (calc-top-n 2) | 460 | (calc-top-n 2) |
| 459 | (calc-top-n 1) | 461 | (calc-top-n 1) |
| 460 | (prefix-numeric-value n))) | 462 | n)) |
| 461 | (calc-enter-result 1 "hist" (list 'calcFunc-histogram | 463 | (calc-enter-result 1 "hist" (list 'calcFunc-histogram |
| 462 | (calc-top-n 1) | 464 | (calc-top-n 1) |
| 463 | (prefix-numeric-value n)))))) | 465 | n))))) |
| 464 | 466 | ||
| 465 | (defun calc-transpose (arg) | 467 | (defun calc-transpose (arg) |
| 466 | (interactive "P") | 468 | (interactive "P") |
| @@ -1135,22 +1137,53 @@ | |||
| 1135 | (if (Math-vectorp wts) | 1137 | (if (Math-vectorp wts) |
| 1136 | (or (= (length vec) (length wts)) | 1138 | (or (= (length vec) (length wts)) |
| 1137 | (math-dimension-error))) | 1139 | (math-dimension-error))) |
| 1138 | (or (natnump n) | 1140 | (cond ((natnump n) |
| 1139 | (math-reject-arg n 'fixnatnump)) | 1141 | (let ((res (make-vector n 0)) |
| 1140 | (let ((res (make-vector n 0)) | 1142 | (vp vec) |
| 1141 | (vp vec) | 1143 | (wvec (Math-vectorp wts)) |
| 1142 | (wvec (Math-vectorp wts)) | 1144 | (wp wts) |
| 1143 | (wp wts) | 1145 | bin) |
| 1144 | bin) | 1146 | (while (setq vp (cdr vp)) |
| 1145 | (while (setq vp (cdr vp)) | 1147 | (setq bin (car vp)) |
| 1146 | (setq bin (car vp)) | 1148 | (or (natnump bin) |
| 1147 | (or (natnump bin) | 1149 | (setq bin (math-floor bin))) |
| 1148 | (setq bin (math-floor bin))) | 1150 | (and (natnump bin) |
| 1149 | (and (natnump bin) | 1151 | (< bin n) |
| 1150 | (< bin n) | 1152 | (aset res bin |
| 1151 | (aset res bin (math-add (aref res bin) | 1153 | (math-add (aref res bin) |
| 1152 | (if wvec (car (setq wp (cdr wp))) wts))))) | 1154 | (if wvec (car (setq wp (cdr wp))) wts))))) |
| 1153 | (cons 'vec (append res nil)))) | 1155 | (cons 'vec (append res nil)))) |
| 1156 | ((Math-vectorp n) ;; n is a vector of midpoints | ||
| 1157 | (let* ((bds (math-vector-avg n)) | ||
| 1158 | (res (make-vector (1- (length n)) 0)) | ||
| 1159 | (vp (cdr vec)) | ||
| 1160 | (wvec (Math-vectorp wts)) | ||
| 1161 | (wp wts) | ||
| 1162 | num) | ||
| 1163 | (while vp | ||
| 1164 | (setq num (car vp)) | ||
| 1165 | (let ((tbds (cdr bds)) | ||
| 1166 | (i 0)) | ||
| 1167 | (while (and tbds (Math-lessp (car tbds) num)) | ||
| 1168 | (setq i (1+ i)) | ||
| 1169 | (setq tbds (cdr tbds))) | ||
| 1170 | (aset res i | ||
| 1171 | (math-add (aref res i) | ||
| 1172 | (if wvec (car (setq wp (cdr wp))) wts)))) | ||
| 1173 | (setq vp (cdr vp))) | ||
| 1174 | (cons 'vec (append res nil)))) | ||
| 1175 | (t | ||
| 1176 | (math-reject-arg n "*Expecting an integer or vector")))) | ||
| 1177 | |||
| 1178 | ;;; Replace a vector [a b c ...] with a vector of averages | ||
| 1179 | ;;; [(a+b)/2 (b+c)/2 ...] | ||
| 1180 | (defun math-vector-avg (vec) | ||
| 1181 | (let ((vp (sort (copy-sequence (cdr vec)) 'math-beforep)) | ||
| 1182 | (res nil)) | ||
| 1183 | (while (and vp (cdr vp)) | ||
| 1184 | (setq res (cons (math-div (math-add (car vp) (cadr vp)) 2) res) | ||
| 1185 | vp (cdr vp))) | ||
| 1186 | (cons 'vec (reverse res)))) | ||
| 1154 | 1187 | ||
| 1155 | 1188 | ||
| 1156 | ;;; Set operations. | 1189 | ;;; Set operations. |
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 07fa4414dda..73a865cab1a 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el | |||
| @@ -999,9 +999,12 @@ Used by `calc-user-invocation'.") | |||
| 999 | (defvar math-working-step-2 nil) | 999 | (defvar math-working-step-2 nil) |
| 1000 | (defvar var-i '(special-const (math-imaginary 1))) | 1000 | (defvar var-i '(special-const (math-imaginary 1))) |
| 1001 | (defvar var-pi '(special-const (math-pi))) | 1001 | (defvar var-pi '(special-const (math-pi))) |
| 1002 | (defvar var-Ï€ '(special-const (math-pi))) | ||
| 1002 | (defvar var-e '(special-const (math-e))) | 1003 | (defvar var-e '(special-const (math-e))) |
| 1003 | (defvar var-phi '(special-const (math-phi))) | 1004 | (defvar var-phi '(special-const (math-phi))) |
| 1005 | (defvar var-φ '(special-const (math-phi))) | ||
| 1004 | (defvar var-gamma '(special-const (math-gamma-const))) | 1006 | (defvar var-gamma '(special-const (math-gamma-const))) |
| 1007 | (defvar var-γ '(special-const (math-gamma-const))) | ||
| 1005 | (defvar var-Modes '(special-const (math-get-modes-vec))) | 1008 | (defvar var-Modes '(special-const (math-get-modes-vec))) |
| 1006 | 1009 | ||
| 1007 | (mapc (lambda (v) (or (boundp v) (set v nil))) | 1010 | (mapc (lambda (v) (or (boundp v) (set v nil))) |
diff --git a/lisp/calc/calccomp.el b/lisp/calc/calccomp.el index c7d3469abe0..c8efded9270 100644 --- a/lisp/calc/calccomp.el +++ b/lisp/calc/calccomp.el | |||
| @@ -663,6 +663,8 @@ | |||
| 663 | (and prevc nextc | 663 | (and prevc nextc |
| 664 | (or (and (>= nextc ?a) (<= nextc ?z)) | 664 | (or (and (>= nextc ?a) (<= nextc ?z)) |
| 665 | (and (>= nextc ?A) (<= nextc ?Z)) | 665 | (and (>= nextc ?A) (<= nextc ?Z)) |
| 666 | (and (>= nextc ?α) (<= nextc ?ω)) | ||
| 667 | (and (>= nextc ?Α) (<= nextc ?Ω)) | ||
| 666 | (and (>= nextc ?0) (<= nextc ?9)) | 668 | (and (>= nextc ?0) (<= nextc ?9)) |
| 667 | (memq nextc '(?. ?_ ?# | 669 | (memq nextc '(?. ?_ ?# |
| 668 | ?\( ?\[ ?\{)) | 670 | ?\( ?\[ ?\{)) |
| @@ -732,7 +734,7 @@ | |||
| 732 | (not (math-tex-expr-is-flat (nth 1 a)))))) | 734 | (not (math-tex-expr-is-flat (nth 1 a)))))) |
| 733 | (list 'horiz | 735 | (list 'horiz |
| 734 | (if lr "\\left" "") | 736 | (if lr "\\left" "") |
| 735 | (if (string-match "\\`u\\([^a-zA-Z]\\)\\'" (car op)) | 737 | (if (string-match "\\`u\\([^a-zA-Zα-ωΑ-Ω]\\)\\'" (car op)) |
| 736 | (substring (car op) 1) | 738 | (substring (car op) 1) |
| 737 | (car op)) | 739 | (car op)) |
| 738 | (if (or lr (> (length (car op)) 2)) " " "") | 740 | (if (or lr (> (length (car op)) 2)) " " "") |
| @@ -758,7 +760,7 @@ | |||
| 758 | (t | 760 | (t |
| 759 | (let ((rhs (math-compose-expr (nth 1 a) (nth 3 op)))) | 761 | (let ((rhs (math-compose-expr (nth 1 a) (nth 3 op)))) |
| 760 | (list 'horiz | 762 | (list 'horiz |
| 761 | (let ((ops (if (string-match "\\`u\\([^a-zA-Z]\\)\\'" | 763 | (let ((ops (if (string-match "\\`u\\([^a-zA-Zα-ωΑ-Ω]\\)\\'" |
| 762 | (car op)) | 764 | (car op)) |
| 763 | (substring (car op) 1) | 765 | (substring (car op) 1) |
| 764 | (car op)))) | 766 | (car op)))) |
| @@ -806,7 +808,7 @@ | |||
| 806 | (setq func (car func2))) | 808 | (setq func (car func2))) |
| 807 | (setq func (math-remove-dashes | 809 | (setq func (math-remove-dashes |
| 808 | (if (string-match | 810 | (if (string-match |
| 809 | "\\`calcFunc-\\([a-zA-Z0-9']+\\)\\'" | 811 | "\\`calcFunc-\\([a-zA-Zα-ωΑ-Ω0-9']+\\)\\'" |
| 810 | (symbol-name func)) | 812 | (symbol-name func)) |
| 811 | (math-match-substring (symbol-name func) 1) | 813 | (math-match-substring (symbol-name func) 1) |
| 812 | (symbol-name func)))) | 814 | (symbol-name func)))) |
diff --git a/lisp/dos-fns.el b/lisp/dos-fns.el index 5834afae8bc..e343446a366 100644 --- a/lisp/dos-fns.el +++ b/lisp/dos-fns.el | |||
| @@ -30,16 +30,16 @@ | |||
| 30 | (declare-function int86 "dosfns.c") | 30 | (declare-function int86 "dosfns.c") |
| 31 | (declare-function msdos-long-file-names "msdos.c") | 31 | (declare-function msdos-long-file-names "msdos.c") |
| 32 | 32 | ||
| 33 | ;; This overrides a trivial definition in files.el. | 33 | ;; See convert-standard-filename in files.el. |
| 34 | (defun dos-convert-standard-filename (filename) | 34 | (defun dos-convert-standard-filename (filename) |
| 35 | "Convert a standard file's name to something suitable for the current OS. | 35 | "Convert a standard file's name to something suitable for MS-DOS. |
| 36 | This means to guarantee valid names and perhaps to canonicalize | 36 | This means to guarantee valid names and perhaps to canonicalize |
| 37 | certain patterns. | 37 | certain patterns. |
| 38 | 38 | ||
| 39 | This function is called by `convert-standard-filename'. | ||
| 40 | |||
| 39 | On Windows and DOS, replace invalid characters. On DOS, make | 41 | On Windows and DOS, replace invalid characters. On DOS, make |
| 40 | sure to obey the 8.3 limitations. On Windows, turn Cygwin names | 42 | sure to obey the 8.3 limitations." |
| 41 | into native names, and also turn slashes into backslashes if the | ||
| 42 | shell requires it (see `w32-shell-dos-semantics')." | ||
| 43 | (if (or (not (stringp filename)) | 43 | (if (or (not (stringp filename)) |
| 44 | ;; This catches the case where FILENAME is "x:" or "x:/" or | 44 | ;; This catches the case where FILENAME is "x:" or "x:/" or |
| 45 | ;; "/", thus preventing infinite recursion. | 45 | ;; "/", thus preventing infinite recursion. |
| @@ -128,11 +128,6 @@ shell requires it (see `w32-shell-dos-semantics')." | |||
| 128 | (dos-convert-standard-filename dir)) | 128 | (dos-convert-standard-filename dir)) |
| 129 | string)))))) | 129 | string)))))) |
| 130 | 130 | ||
| 131 | ;; Only redirect convert-standard-filename if it has a chance of working, | ||
| 132 | ;; otherwise loading dos-fns.el might make your non-DOS Emacs misbehave. | ||
| 133 | (when (fboundp 'msdos-long-file-names) | ||
| 134 | (defalias 'convert-standard-filename 'dos-convert-standard-filename)) | ||
| 135 | |||
| 136 | (defun dos-8+3-filename (filename) | 131 | (defun dos-8+3-filename (filename) |
| 137 | "Truncate FILENAME to DOS 8+3 limits." | 132 | "Truncate FILENAME to DOS 8+3 limits." |
| 138 | (if (or (not (stringp filename)) | 133 | (if (or (not (stringp filename)) |
| @@ -243,9 +238,14 @@ returned unaltered." | |||
| 243 | (al . (0 . 0)) (bl . (1 . 0)) (cl . (2 . 0)) (dl . (3 . 0)) | 238 | (al . (0 . 0)) (bl . (1 . 0)) (cl . (2 . 0)) (dl . (3 . 0)) |
| 244 | (ah . (0 . 1)) (bh . (1 . 1)) (ch . (2 . 1)) (dh . (3 . 1)))) | 239 | (ah . (0 . 1)) (bh . (1 . 1)) (ch . (2 . 1)) (dh . (3 . 1)))) |
| 245 | 240 | ||
| 241 | (define-obsolete-variable-alias | ||
| 242 | 'register-name-alist 'dos-register-name-alist "24.1") | ||
| 243 | |||
| 246 | (defun dos-make-register () | 244 | (defun dos-make-register () |
| 247 | (make-vector 8 0)) | 245 | (make-vector 8 0)) |
| 248 | 246 | ||
| 247 | (define-obsolete-function-alias 'make-register 'dos-make-register "24.1") | ||
| 248 | |||
| 249 | (defun dos-register-value (regs name) | 249 | (defun dos-register-value (regs name) |
| 250 | (let ((where (cdr (assoc name dos-register-name-alist)))) | 250 | (let ((where (cdr (assoc name dos-register-name-alist)))) |
| 251 | (cond ((consp where) | 251 | (cond ((consp where) |
| @@ -257,6 +257,8 @@ returned unaltered." | |||
| 257 | (aref regs where)) | 257 | (aref regs where)) |
| 258 | (t nil)))) | 258 | (t nil)))) |
| 259 | 259 | ||
| 260 | (define-obsolete-function-alias 'register-value 'dos-register-value "24.1") | ||
| 261 | |||
| 260 | (defun dos-set-register-value (regs name value) | 262 | (defun dos-set-register-value (regs name value) |
| 261 | (and (numberp value) | 263 | (and (numberp value) |
| 262 | (>= value 0) | 264 | (>= value 0) |
| @@ -273,9 +275,18 @@ returned unaltered." | |||
| 273 | (aset regs where (logand value 65535)))))) | 275 | (aset regs where (logand value 65535)))))) |
| 274 | regs) | 276 | regs) |
| 275 | 277 | ||
| 278 | (define-obsolete-function-alias | ||
| 279 | 'set-register-value 'dos-set-register-value "24.1") | ||
| 280 | |||
| 276 | (defsubst dos-intdos (regs) | 281 | (defsubst dos-intdos (regs) |
| 282 | "Issue the DOS Int 21h with registers REGS. | ||
| 283 | |||
| 284 | REGS should be a vector produced by `dos-make-register' | ||
| 285 | and `dos-set-register-value', which see." | ||
| 277 | (int86 33 regs)) | 286 | (int86 33 regs)) |
| 278 | 287 | ||
| 288 | (define-obsolete-function-alias 'intdos 'dos-intdos "24.1") | ||
| 289 | |||
| 279 | ;; Backward compatibility for obsolescent functions which | 290 | ;; Backward compatibility for obsolescent functions which |
| 280 | ;; set screen size. | 291 | ;; set screen size. |
| 281 | 292 | ||
| @@ -284,6 +295,8 @@ returned unaltered." | |||
| 284 | (interactive) | 295 | (interactive) |
| 285 | (set-frame-size (selected-frame) 80 25)) | 296 | (set-frame-size (selected-frame) 80 25)) |
| 286 | 297 | ||
| 298 | (define-obsolete-function-alias 'mode25 'dos-mode25 "24.1") | ||
| 299 | |||
| 287 | (defun dos-mode4350 () | 300 | (defun dos-mode4350 () |
| 288 | "Changes the number of rows to 43 or 50. | 301 | "Changes the number of rows to 43 or 50. |
| 289 | Emacs always tries to set the screen height to 50 rows first. | 302 | Emacs always tries to set the screen height to 50 rows first. |
| @@ -295,6 +308,8 @@ that your video hardware might not support 50-line mode." | |||
| 295 | nil ; the original built-in function returned nil | 308 | nil ; the original built-in function returned nil |
| 296 | (set-frame-size (selected-frame) 80 43))) | 309 | (set-frame-size (selected-frame) 80 43))) |
| 297 | 310 | ||
| 311 | (define-obsolete-function-alias 'mode4350 'dos-mode4350 "24.1") | ||
| 312 | |||
| 298 | (provide 'dos-fns) | 313 | (provide 'dos-fns) |
| 299 | 314 | ||
| 300 | ;; arch-tag: 00b03579-8ebb-4a02-8762-5c5a929774ad | 315 | ;; arch-tag: 00b03579-8ebb-4a02-8762-5c5a929774ad |
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 4a7f59e26fb..02477baf74f 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el | |||
| @@ -221,8 +221,6 @@ font-lock keywords will not be case sensitive." | |||
| 221 | ;;(set (make-local-variable 'adaptive-fill-mode) nil) | 221 | ;;(set (make-local-variable 'adaptive-fill-mode) nil) |
| 222 | (make-local-variable 'indent-line-function) | 222 | (make-local-variable 'indent-line-function) |
| 223 | (setq indent-line-function 'lisp-indent-line) | 223 | (setq indent-line-function 'lisp-indent-line) |
| 224 | (make-local-variable 'parse-sexp-ignore-comments) | ||
| 225 | (setq parse-sexp-ignore-comments t) | ||
| 226 | (make-local-variable 'outline-regexp) | 224 | (make-local-variable 'outline-regexp) |
| 227 | (setq outline-regexp ";;;\\(;* [^ \t\n]\\|###autoload\\)\\|(") | 225 | (setq outline-regexp ";;;\\(;* [^ \t\n]\\|###autoload\\)\\|(") |
| 228 | (make-local-variable 'outline-level) | 226 | (make-local-variable 'outline-level) |
| @@ -431,7 +429,7 @@ All commands in `lisp-mode-shared-map' are inherited by this map.") | |||
| 431 | :type 'hook | 429 | :type 'hook |
| 432 | :group 'lisp) | 430 | :group 'lisp) |
| 433 | 431 | ||
| 434 | (define-derived-mode emacs-lisp-mode nil "Emacs-Lisp" | 432 | (define-derived-mode emacs-lisp-mode prog-mode "Emacs-Lisp" |
| 435 | "Major mode for editing Lisp code to run in Emacs. | 433 | "Major mode for editing Lisp code to run in Emacs. |
| 436 | Commands: | 434 | Commands: |
| 437 | Delete converts tabs to spaces as it moves back. | 435 | Delete converts tabs to spaces as it moves back. |
| @@ -466,7 +464,7 @@ if that value is non-nil." | |||
| 466 | "Keymap for ordinary Lisp mode. | 464 | "Keymap for ordinary Lisp mode. |
| 467 | All commands in `lisp-mode-shared-map' are inherited by this map.") | 465 | All commands in `lisp-mode-shared-map' are inherited by this map.") |
| 468 | 466 | ||
| 469 | (define-derived-mode lisp-mode nil "Lisp" | 467 | (define-derived-mode lisp-mode prog-mode "Lisp" |
| 470 | "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp. | 468 | "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp. |
| 471 | Commands: | 469 | Commands: |
| 472 | Delete converts tabs to spaces as it moves back. | 470 | Delete converts tabs to spaces as it moves back. |
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el new file mode 100644 index 00000000000..27ddeb762af --- /dev/null +++ b/lisp/emacs-lisp/smie.el | |||
| @@ -0,0 +1,688 @@ | |||
| 1 | ;;; smie.el --- Simple Minded Indentation Engine | ||
| 2 | |||
| 3 | ;; Copyright (C) 2010 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 6 | ;; Keywords: languages, lisp, internal, parsing, indentation | ||
| 7 | |||
| 8 | ;; This file is part of GNU Emacs. | ||
| 9 | |||
| 10 | ;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 11 | ;; it under the terms of the GNU General Public License as published by | ||
| 12 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 13 | ;; (at your option) any later version. | ||
| 14 | |||
| 15 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | ;; GNU General Public License for more details. | ||
| 19 | |||
| 20 | ;; You should have received a copy of the GNU General Public License | ||
| 21 | ;; along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 22 | |||
| 23 | ;;; Commentary: | ||
| 24 | |||
| 25 | ;; While working on the SML indentation code, the idea grew that maybe | ||
| 26 | ;; I could write something generic to do the same thing, and at the | ||
| 27 | ;; end of working on the SML code, I had a pretty good idea of what it | ||
| 28 | ;; could look like. That idea grew stronger after working on | ||
| 29 | ;; LaTeX indentation. | ||
| 30 | ;; | ||
| 31 | ;; So at some point I decided to try it out, by writing a new | ||
| 32 | ;; indentation code for Coq while trying to keep most of the code | ||
| 33 | ;; "table driven", where only the tables are Coq-specific. The result | ||
| 34 | ;; (which was used for Beluga-mode as well) turned out to be based on | ||
| 35 | ;; something pretty close to an operator precedence parser. | ||
| 36 | |||
| 37 | ;; So here is another rewrite, this time following the actual principles of | ||
| 38 | ;; operator precedence grammars. Why OPG? Even though they're among the | ||
| 39 | ;; weakest kinds of parsers, these parsers have some very desirable properties | ||
| 40 | ;; for Emacs: | ||
| 41 | ;; - most importantly for indentation, they work equally well in either | ||
| 42 | ;; direction, so you can use them to parse backward from the indentation | ||
| 43 | ;; point to learn the syntactic context; | ||
| 44 | ;; - they work locally, so there's no need to keep a cache of | ||
| 45 | ;; the parser's state; | ||
| 46 | ;; - because of that locality, indentation also works just fine when earlier | ||
| 47 | ;; parts of the buffer are syntactically incorrect since the indentation | ||
| 48 | ;; looks at "as little as possible" of the buffer make an indentation | ||
| 49 | ;; decision. | ||
| 50 | ;; - they typically have no error handling and can't even detect a parsing | ||
| 51 | ;; error, so we don't have to worry about what to do in case of a syntax | ||
| 52 | ;; error because the parser just automatically does something. Better yet, | ||
| 53 | ;; we can afford to use a sloppy grammar. | ||
| 54 | |||
| 55 | ;; The development (especially the parts building the 2D precedence | ||
| 56 | ;; tables and then computing the precedence levels from it) is largely | ||
| 57 | ;; inspired from page 187-194 of "Parsing techniques" by Dick Grune | ||
| 58 | ;; and Ceriel Jacobs (BookBody.pdf available at | ||
| 59 | ;; http://www.cs.vu.nl/~dick/PTAPG.html). | ||
| 60 | ;; | ||
| 61 | ;; OTOH we had to kill many chickens, read many coffee grounds, and practiced | ||
| 62 | ;; untold numbers of black magic spells. | ||
| 63 | |||
| 64 | ;;; Code: | ||
| 65 | |||
| 66 | (eval-when-compile (require 'cl)) | ||
| 67 | |||
| 68 | ;;; Building precedence level tables from BNF specs. | ||
| 69 | |||
| 70 | (defun smie-set-prec2tab (table x y val &optional override) | ||
| 71 | (assert (and x y)) | ||
| 72 | (let* ((key (cons x y)) | ||
| 73 | (old (gethash key table))) | ||
| 74 | (if (and old (not (eq old val))) | ||
| 75 | (if (gethash key override) | ||
| 76 | ;; FIXME: The override is meant to resolve ambiguities, | ||
| 77 | ;; but it also hides real conflicts. It would be great to | ||
| 78 | ;; be able to distinguish the two cases so that overrides | ||
| 79 | ;; don't hide real conflicts. | ||
| 80 | (puthash key (gethash key override) table) | ||
| 81 | (display-warning 'smie (format "Conflict: %s %s/%s %s" x old val y))) | ||
| 82 | (puthash key val table)))) | ||
| 83 | |||
| 84 | (defun smie-precs-precedence-table (precs) | ||
| 85 | "Compute a 2D precedence table from a list of precedences. | ||
| 86 | PRECS should be a list, sorted by precedence (e.g. \"+\" will | ||
| 87 | come before \"*\"), of elements of the form \(left OP ...) | ||
| 88 | or (right OP ...) or (nonassoc OP ...) or (assoc OP ...). All operators in | ||
| 89 | one of those elements share the same precedence level and associativity." | ||
| 90 | (let ((prec2-table (make-hash-table :test 'equal))) | ||
| 91 | (dolist (prec precs) | ||
| 92 | (dolist (op (cdr prec)) | ||
| 93 | (let ((selfrule (cdr (assq (car prec) | ||
| 94 | '((left . >) (right . <) (assoc . =)))))) | ||
| 95 | (when selfrule | ||
| 96 | (dolist (other-op (cdr prec)) | ||
| 97 | (smie-set-prec2tab prec2-table op other-op selfrule)))) | ||
| 98 | (let ((op1 '<) (op2 '>)) | ||
| 99 | (dolist (other-prec precs) | ||
| 100 | (if (eq prec other-prec) | ||
| 101 | (setq op1 '> op2 '<) | ||
| 102 | (dolist (other-op (cdr other-prec)) | ||
| 103 | (smie-set-prec2tab prec2-table op other-op op2) | ||
| 104 | (smie-set-prec2tab prec2-table other-op op op1))))))) | ||
| 105 | prec2-table)) | ||
| 106 | |||
| 107 | (defun smie-merge-prec2s (tables) | ||
| 108 | (if (null (cdr tables)) | ||
| 109 | (car tables) | ||
| 110 | (let ((prec2 (make-hash-table :test 'equal))) | ||
| 111 | (dolist (table tables) | ||
| 112 | (maphash (lambda (k v) | ||
| 113 | (smie-set-prec2tab prec2 (car k) (cdr k) v)) | ||
| 114 | table)) | ||
| 115 | prec2))) | ||
| 116 | |||
| 117 | (defun smie-bnf-precedence-table (bnf &rest precs) | ||
| 118 | (let ((nts (mapcar 'car bnf)) ;Non-terminals | ||
| 119 | (first-ops-table ()) | ||
| 120 | (last-ops-table ()) | ||
| 121 | (first-nts-table ()) | ||
| 122 | (last-nts-table ()) | ||
| 123 | (prec2 (make-hash-table :test 'equal)) | ||
| 124 | (override (smie-merge-prec2s | ||
| 125 | (mapcar 'smie-precs-precedence-table precs))) | ||
| 126 | again) | ||
| 127 | (dolist (rules bnf) | ||
| 128 | (let ((nt (car rules)) | ||
| 129 | (last-ops ()) | ||
| 130 | (first-ops ()) | ||
| 131 | (last-nts ()) | ||
| 132 | (first-nts ())) | ||
| 133 | (dolist (rhs (cdr rules)) | ||
| 134 | (assert (consp rhs)) | ||
| 135 | (if (not (member (car rhs) nts)) | ||
| 136 | (pushnew (car rhs) first-ops) | ||
| 137 | (pushnew (car rhs) first-nts) | ||
| 138 | (when (consp (cdr rhs)) | ||
| 139 | ;; If the first is not an OP we add the second (which | ||
| 140 | ;; should be an OP if BNF is an "operator grammar"). | ||
| 141 | ;; Strictly speaking, this should only be done if the | ||
| 142 | ;; first is a non-terminal which can expand to a phrase | ||
| 143 | ;; without any OP in it, but checking doesn't seem worth | ||
| 144 | ;; the trouble, and it lets the writer of the BNF | ||
| 145 | ;; be a bit more sloppy by skipping uninteresting base | ||
| 146 | ;; cases which are terminals but not OPs. | ||
| 147 | (assert (not (member (cadr rhs) nts))) | ||
| 148 | (pushnew (cadr rhs) first-ops))) | ||
| 149 | (let ((shr (reverse rhs))) | ||
| 150 | (if (not (member (car shr) nts)) | ||
| 151 | (pushnew (car shr) last-ops) | ||
| 152 | (pushnew (car shr) last-nts) | ||
| 153 | (when (consp (cdr shr)) | ||
| 154 | (assert (not (member (cadr shr) nts))) | ||
| 155 | (pushnew (cadr shr) last-ops))))) | ||
| 156 | (push (cons nt first-ops) first-ops-table) | ||
| 157 | (push (cons nt last-ops) last-ops-table) | ||
| 158 | (push (cons nt first-nts) first-nts-table) | ||
| 159 | (push (cons nt last-nts) last-nts-table))) | ||
| 160 | ;; Compute all first-ops by propagating the initial ones we have | ||
| 161 | ;; now, according to first-nts. | ||
| 162 | (setq again t) | ||
| 163 | (while (prog1 again (setq again nil)) | ||
| 164 | (dolist (first-nts first-nts-table) | ||
| 165 | (let* ((nt (pop first-nts)) | ||
| 166 | (first-ops (assoc nt first-ops-table))) | ||
| 167 | (dolist (first-nt first-nts) | ||
| 168 | (dolist (op (cdr (assoc first-nt first-ops-table))) | ||
| 169 | (unless (member op first-ops) | ||
| 170 | (setq again t) | ||
| 171 | (push op (cdr first-ops)))))))) | ||
| 172 | ;; Same thing for last-ops. | ||
| 173 | (setq again t) | ||
| 174 | (while (prog1 again (setq again nil)) | ||
| 175 | (dolist (last-nts last-nts-table) | ||
| 176 | (let* ((nt (pop last-nts)) | ||
| 177 | (last-ops (assoc nt last-ops-table))) | ||
| 178 | (dolist (last-nt last-nts) | ||
| 179 | (dolist (op (cdr (assoc last-nt last-ops-table))) | ||
| 180 | (unless (member op last-ops) | ||
| 181 | (setq again t) | ||
| 182 | (push op (cdr last-ops)))))))) | ||
| 183 | ;; Now generate the 2D precedence table. | ||
| 184 | (dolist (rules bnf) | ||
| 185 | (dolist (rhs (cdr rules)) | ||
| 186 | (while (cdr rhs) | ||
| 187 | (cond | ||
| 188 | ((member (car rhs) nts) | ||
| 189 | (dolist (last (cdr (assoc (car rhs) last-ops-table))) | ||
| 190 | (smie-set-prec2tab prec2 last (cadr rhs) '> override))) | ||
| 191 | ((member (cadr rhs) nts) | ||
| 192 | (dolist (first (cdr (assoc (cadr rhs) first-ops-table))) | ||
| 193 | (smie-set-prec2tab prec2 (car rhs) first '< override)) | ||
| 194 | (if (and (cddr rhs) (not (member (car (cddr rhs)) nts))) | ||
| 195 | (smie-set-prec2tab prec2 (car rhs) (car (cddr rhs)) | ||
| 196 | '= override))) | ||
| 197 | (t (smie-set-prec2tab prec2 (car rhs) (cadr rhs) '= override))) | ||
| 198 | (setq rhs (cdr rhs))))) | ||
| 199 | prec2)) | ||
| 200 | |||
| 201 | (defun smie-prec2-levels (prec2) | ||
| 202 | "Take a 2D precedence table and turn it into an alist of precedence levels. | ||
| 203 | PREC2 is a table as returned by `smie-precs-precedence-table' or | ||
| 204 | `smie-bnf-precedence-table'." | ||
| 205 | ;; For each operator, we create two "variables" (corresponding to | ||
| 206 | ;; the left and right precedence level), which are represented by | ||
| 207 | ;; cons cells. Those are the vary cons cells that appear in the | ||
| 208 | ;; final `table'. The value of each "variable" is kept in the `car'. | ||
| 209 | (let ((table ()) | ||
| 210 | (csts ()) | ||
| 211 | (eqs ()) | ||
| 212 | tmp x y) | ||
| 213 | ;; From `prec2' we construct a list of constraints between | ||
| 214 | ;; variables (aka "precedence levels"). These can be either | ||
| 215 | ;; equality constraints (in `eqs') or `<' constraints (in `csts'). | ||
| 216 | (maphash (lambda (k v) | ||
| 217 | (if (setq tmp (assoc (car k) table)) | ||
| 218 | (setq x (cddr tmp)) | ||
| 219 | (setq x (cons nil nil)) | ||
| 220 | (push (cons (car k) (cons nil x)) table)) | ||
| 221 | (if (setq tmp (assoc (cdr k) table)) | ||
| 222 | (setq y (cdr tmp)) | ||
| 223 | (setq y (cons nil (cons nil nil))) | ||
| 224 | (push (cons (cdr k) y) table)) | ||
| 225 | (ecase v | ||
| 226 | (= (push (cons x y) eqs)) | ||
| 227 | (< (push (cons x y) csts)) | ||
| 228 | (> (push (cons y x) csts)))) | ||
| 229 | prec2) | ||
| 230 | ;; First process the equality constraints. | ||
| 231 | (let ((eqs eqs)) | ||
| 232 | (while eqs | ||
| 233 | (let ((from (caar eqs)) | ||
| 234 | (to (cdar eqs))) | ||
| 235 | (setq eqs (cdr eqs)) | ||
| 236 | (if (eq to from) | ||
| 237 | (debug) ;Can it happen? | ||
| 238 | (dolist (other-eq eqs) | ||
| 239 | (if (eq from (cdr other-eq)) (setcdr other-eq to)) | ||
| 240 | (when (eq from (car other-eq)) | ||
| 241 | ;; This can happen because of `assoc' settings in precs | ||
| 242 | ;; or because of a rhs like ("op" foo "op"). | ||
| 243 | (setcar other-eq to))) | ||
| 244 | (dolist (cst csts) | ||
| 245 | (if (eq from (cdr cst)) (setcdr cst to)) | ||
| 246 | (if (eq from (car cst)) (setcar cst to))))))) | ||
| 247 | ;; Then eliminate trivial constraints iteratively. | ||
| 248 | (let ((i 0)) | ||
| 249 | (while csts | ||
| 250 | (let ((rhvs (mapcar 'cdr csts)) | ||
| 251 | (progress nil)) | ||
| 252 | (dolist (cst csts) | ||
| 253 | (unless (memq (car cst) rhvs) | ||
| 254 | (setq progress t) | ||
| 255 | (setcar (car cst) i) | ||
| 256 | (setq csts (delq cst csts)))) | ||
| 257 | (unless progress | ||
| 258 | (error "Can't resolve the precedence table to precedence levels"))) | ||
| 259 | (incf i)) | ||
| 260 | ;; Propagate equalities back to their source. | ||
| 261 | (dolist (eq (nreverse eqs)) | ||
| 262 | (assert (null (caar eq))) | ||
| 263 | (setcar (car eq) (cadr eq))) | ||
| 264 | ;; Finally, fill in the remaining vars (which only appeared on the | ||
| 265 | ;; right side of the < constraints). | ||
| 266 | ;; Tho leaving them at nil is not a bad choice, since it makes | ||
| 267 | ;; it clear that these don't bind at all. | ||
| 268 | ;; (dolist (x table) | ||
| 269 | ;; (unless (nth 1 x) (setf (nth 1 x) i)) | ||
| 270 | ;; (unless (nth 2 x) (setf (nth 2 x) i))) | ||
| 271 | ) | ||
| 272 | table)) | ||
| 273 | |||
| 274 | ;;; Parsing using a precedence level table. | ||
| 275 | |||
| 276 | (defvar smie-op-levels 'unset | ||
| 277 | "List of token parsing info. | ||
| 278 | Each element is of the form (TOKEN LEFT-LEVEL RIGHT-LEVEL). | ||
| 279 | Parsing is done using an operator precedence parser.") | ||
| 280 | |||
| 281 | (defun smie-backward-token () | ||
| 282 | ;; FIXME: This may be an OK default but probably needs a hook. | ||
| 283 | (buffer-substring (point) | ||
| 284 | (progn (if (zerop (skip-syntax-backward ".")) | ||
| 285 | (skip-syntax-backward "w_'")) | ||
| 286 | (point)))) | ||
| 287 | |||
| 288 | (defun smie-forward-token () | ||
| 289 | ;; FIXME: This may be an OK default but probably needs a hook. | ||
| 290 | (buffer-substring (point) | ||
| 291 | (progn (if (zerop (skip-syntax-forward ".")) | ||
| 292 | (skip-syntax-forward "w_'")) | ||
| 293 | (point)))) | ||
| 294 | |||
| 295 | (defun smie-backward-sexp (&optional halfsexp) | ||
| 296 | "Skip over one sexp. | ||
| 297 | HALFSEXP if non-nil, means skip over a partial sexp if needed. I.e. if the | ||
| 298 | first token we see is an operator, skip over its left-hand-side argument. | ||
| 299 | Possible return values: | ||
| 300 | (LEFT-LEVEL POS TOKEN): we couldn't skip TOKEN because its right-level | ||
| 301 | is too high. LEFT-LEVEL is the left-level of TOKEN, | ||
| 302 | POS is its start position in the buffer. | ||
| 303 | (t POS TOKEN): same thing but for an open-paren or the beginning of buffer. | ||
| 304 | (nil POS TOKEN): we skipped over a paren-like pair. | ||
| 305 | nil: we skipped over an identifier, matched parentheses, ..." | ||
| 306 | (if (bobp) (list t (point)) | ||
| 307 | (catch 'return | ||
| 308 | (let ((levels ())) | ||
| 309 | (while | ||
| 310 | (let* ((pos (point)) | ||
| 311 | (token (progn (forward-comment (- (point-max))) | ||
| 312 | (smie-backward-token))) | ||
| 313 | (toklevels (cdr (assoc token smie-op-levels)))) | ||
| 314 | |||
| 315 | (cond | ||
| 316 | ((null toklevels) | ||
| 317 | (if (equal token "") | ||
| 318 | (condition-case err | ||
| 319 | (progn (goto-char pos) (backward-sexp 1) nil) | ||
| 320 | (scan-error (throw 'return (list t (caddr err))))))) | ||
| 321 | ((null (nth 1 toklevels)) | ||
| 322 | ;; A token like a paren-close. | ||
| 323 | (assert (nth 0 toklevels)) ;Otherwise, why mention it? | ||
| 324 | (push (nth 0 toklevels) levels)) | ||
| 325 | (t | ||
| 326 | (while (and levels (< (nth 1 toklevels) (car levels))) | ||
| 327 | (setq levels (cdr levels))) | ||
| 328 | (cond | ||
| 329 | ((null levels) | ||
| 330 | (if (and halfsexp (nth 0 toklevels)) | ||
| 331 | (push (nth 0 toklevels) levels) | ||
| 332 | (throw 'return | ||
| 333 | (prog1 (list (or (car toklevels) t) (point) token) | ||
| 334 | (goto-char pos))))) | ||
| 335 | (t | ||
| 336 | (while (and levels (= (nth 1 toklevels) (car levels))) | ||
| 337 | (setq levels (cdr levels))) | ||
| 338 | (cond | ||
| 339 | ((null levels) | ||
| 340 | (cond | ||
| 341 | ((null (nth 0 toklevels)) | ||
| 342 | (throw 'return (list nil (point) token))) | ||
| 343 | ((eq (nth 0 toklevels) (nth 1 toklevels)) | ||
| 344 | (throw 'return | ||
| 345 | (prog1 (list (or (car toklevels) t) (point) token) | ||
| 346 | (goto-char pos)))) | ||
| 347 | (t (debug)))) ;Not sure yet what to do here. | ||
| 348 | (t | ||
| 349 | (if (nth 0 toklevels) | ||
| 350 | (push (nth 0 toklevels) levels)))))))) | ||
| 351 | levels) | ||
| 352 | (setq halfsexp nil)))))) | ||
| 353 | |||
| 354 | ;; Mirror image, not used for indentation. | ||
| 355 | (defun smie-forward-sexp (&optional halfsexp) | ||
| 356 | "Skip over one sexp. | ||
| 357 | HALFSEXP if non-nil, means skip over a partial sexp if needed. I.e. if the | ||
| 358 | first token we see is an operator, skip over its left-hand-side argument. | ||
| 359 | Possible return values: | ||
| 360 | (RIGHT-LEVEL POS TOKEN): we couldn't skip TOKEN because its left-level | ||
| 361 | is too high. RIGHT-LEVEL is the right-level of TOKEN, | ||
| 362 | POS is its end position in the buffer. | ||
| 363 | (t POS TOKEN): same thing but for an open-paren or the beginning of buffer. | ||
| 364 | (nil POS TOKEN): we skipped over a paren-like pair. | ||
| 365 | nil: we skipped over an identifier, matched parentheses, ..." | ||
| 366 | (if (eobp) (list t (point)) | ||
| 367 | (catch 'return | ||
| 368 | (let ((levels ())) | ||
| 369 | (while | ||
| 370 | (let* ((pos (point)) | ||
| 371 | (token (progn (forward-comment (point-max)) | ||
| 372 | (smie-forward-token))) | ||
| 373 | (toklevels (cdr (assoc token smie-op-levels)))) | ||
| 374 | |||
| 375 | (cond | ||
| 376 | ((null toklevels) | ||
| 377 | (if (equal token "") | ||
| 378 | (condition-case err | ||
| 379 | (progn (goto-char pos) (forward-sexp 1) nil) | ||
| 380 | (scan-error (throw 'return (list t (caddr err))))))) | ||
| 381 | ((null (nth 0 toklevels)) | ||
| 382 | ;; A token like a paren-close. | ||
| 383 | (assert (nth 1 toklevels)) ;Otherwise, why mention it? | ||
| 384 | (push (nth 1 toklevels) levels)) | ||
| 385 | (t | ||
| 386 | (while (and levels (< (nth 0 toklevels) (car levels))) | ||
| 387 | (setq levels (cdr levels))) | ||
| 388 | (cond | ||
| 389 | ((null levels) | ||
| 390 | (if (and halfsexp (nth 1 toklevels)) | ||
| 391 | (push (nth 1 toklevels) levels) | ||
| 392 | (throw 'return | ||
| 393 | (prog1 (list (or (nth 1 toklevels) t) (point) token) | ||
| 394 | (goto-char pos))))) | ||
| 395 | (t | ||
| 396 | (while (and levels (= (nth 0 toklevels) (car levels))) | ||
| 397 | (setq levels (cdr levels))) | ||
| 398 | (cond | ||
| 399 | ((null levels) | ||
| 400 | (cond | ||
| 401 | ((null (nth 1 toklevels)) | ||
| 402 | (throw 'return (list nil (point) token))) | ||
| 403 | ((eq (nth 1 toklevels) (nth 0 toklevels)) | ||
| 404 | (throw 'return | ||
| 405 | (prog1 (list (or (nth 1 toklevels) t) (point) token) | ||
| 406 | (goto-char pos)))) | ||
| 407 | (t (debug)))) ;Not sure yet what to do here. | ||
| 408 | (t | ||
| 409 | (if (nth 1 toklevels) | ||
| 410 | (push (nth 1 toklevels) levels)))))))) | ||
| 411 | levels) | ||
| 412 | (setq halfsexp nil)))))) | ||
| 413 | |||
| 414 | (defun smie-backward-sexp-command (&optional n) | ||
| 415 | "Move backward through N logical elements." | ||
| 416 | (interactive "p") | ||
| 417 | (if (< n 0) | ||
| 418 | (smie-forward-sexp-command (- n)) | ||
| 419 | (let ((forward-sexp-function nil)) | ||
| 420 | (while (> n 0) | ||
| 421 | (decf n) | ||
| 422 | (let ((pos (point)) | ||
| 423 | (res (smie-backward-sexp 'halfsexp))) | ||
| 424 | (if (and (car res) (= pos (point)) (not (bolp))) | ||
| 425 | (signal 'scan-error | ||
| 426 | (list "Containing expression ends prematurely" | ||
| 427 | (cadr res) (cadr res))) | ||
| 428 | nil)))))) | ||
| 429 | |||
| 430 | (defun smie-forward-sexp-command (&optional n) | ||
| 431 | "Move forward through N logical elements." | ||
| 432 | (interactive "p") | ||
| 433 | (if (< n 0) | ||
| 434 | (smie-backward-sexp-command (- n)) | ||
| 435 | (let ((forward-sexp-function nil)) | ||
| 436 | (while (> n 0) | ||
| 437 | (decf n) | ||
| 438 | (let ((pos (point)) | ||
| 439 | (res (smie-forward-sexp 'halfsexp))) | ||
| 440 | (if (and (car res) (= pos (point)) (not (bolp))) | ||
| 441 | (signal 'scan-error | ||
| 442 | (list "Containing expression ends prematurely" | ||
| 443 | (cadr res) (cadr res))) | ||
| 444 | nil)))))) | ||
| 445 | |||
| 446 | ;;; The indentation engine. | ||
| 447 | |||
| 448 | (defcustom smie-indent-basic 4 | ||
| 449 | "Basic amount of indentation." | ||
| 450 | :type 'integer) | ||
| 451 | |||
| 452 | (defvar smie-indent-rules 'unset | ||
| 453 | "Rules of the following form. | ||
| 454 | \(TOK OFFSET) how to indent right after TOK. | ||
| 455 | \(TOK O1 O2) how to indent right after TOK: | ||
| 456 | O1 is the default; | ||
| 457 | O2 is used if TOK is \"hanging\". | ||
| 458 | \((T1 . T2) . OFFSET) how to indent token T2 w.r.t T1. | ||
| 459 | \((t . TOK) . OFFSET) how to indent TOK with respect to its parent. | ||
| 460 | \(list-intro . TOKENS) declare TOKENS as being followed by what may look like | ||
| 461 | a funcall but is just a sequence of expressions. | ||
| 462 | \(t . OFFSET) basic indentation step. | ||
| 463 | \(args . OFFSET) indentation of arguments. | ||
| 464 | A nil offset defaults to `smie-indent-basic'.") | ||
| 465 | |||
| 466 | (defun smie-indent-hanging-p () | ||
| 467 | ;; A Hanging keyword is one that's at the end of a line except it's not at | ||
| 468 | ;; the beginning of a line. | ||
| 469 | (and (save-excursion (smie-forward-token) | ||
| 470 | (skip-chars-forward " \t") (eolp)) | ||
| 471 | (save-excursion (skip-chars-backward " \t") (not (bolp))))) | ||
| 472 | |||
| 473 | (defun smie-bolp () | ||
| 474 | (save-excursion (skip-chars-backward " \t") (bolp))) | ||
| 475 | |||
| 476 | (defun smie-indent-offset (elem) | ||
| 477 | (or (cdr (assq elem smie-indent-rules)) | ||
| 478 | (cdr (assq t smie-indent-rules)) | ||
| 479 | smie-indent-basic)) | ||
| 480 | |||
| 481 | (defun smie-indent-calculate (&optional virtual) | ||
| 482 | "Compute the indentation to use for point. | ||
| 483 | If VIRTUAL is non-nil, it means we're not trying to indent point but just | ||
| 484 | need to compute the column at which point should be indented | ||
| 485 | in order to figure out the indentation of some other (further down) point. | ||
| 486 | VIRTUAL can take two different non-nil values: | ||
| 487 | - :bolp: means that the current indentation of point can be trusted | ||
| 488 | to be good only if it follows a line break. | ||
| 489 | - :hanging: means that the current indentation of point can be | ||
| 490 | trusted to be good except if the following token is hanging." | ||
| 491 | ;; FIXME: This has accumulated a lot of rules, some of which aren't | ||
| 492 | ;; clearly orthogonal any more, so we should probably try and | ||
| 493 | ;; restructure it somewhat. | ||
| 494 | (or | ||
| 495 | ;; Trust pre-existing indentation on other lines. | ||
| 496 | (and virtual | ||
| 497 | (if (eq virtual :hanging) (not (smie-indent-hanging-p)) (smie-bolp)) | ||
| 498 | (current-column)) | ||
| 499 | ;; Align close paren with opening paren. | ||
| 500 | (save-excursion | ||
| 501 | ;; (forward-comment (point-max)) | ||
| 502 | (when (looking-at "\\s)") | ||
| 503 | (while (not (zerop (skip-syntax-forward ")"))) | ||
| 504 | (skip-chars-forward " \t")) | ||
| 505 | (condition-case nil | ||
| 506 | (progn | ||
| 507 | (backward-sexp 1) | ||
| 508 | (smie-indent-calculate :hanging)) | ||
| 509 | (scan-error nil)))) | ||
| 510 | ;; Align closing token with the corresponding opening one. | ||
| 511 | ;; (e.g. "of" with "case", or "in" with "let"). | ||
| 512 | (save-excursion | ||
| 513 | (let* ((pos (point)) | ||
| 514 | (token (smie-forward-token)) | ||
| 515 | (toklevels (cdr (assoc token smie-op-levels)))) | ||
| 516 | (when (car toklevels) | ||
| 517 | (let ((res (smie-backward-sexp 'halfsexp)) tmp) | ||
| 518 | ;; If we didn't move at all, that means we didn't really skip | ||
| 519 | ;; what we wanted. | ||
| 520 | (when (< (point) pos) | ||
| 521 | (cond | ||
| 522 | ((eq (car res) (car toklevels)) | ||
| 523 | ;; We bumped into a same-level operator. align with it. | ||
| 524 | (goto-char (cadr res)) | ||
| 525 | ;; Don't use (smie-indent-calculate :hanging) here, because we | ||
| 526 | ;; want to jump back over a sequence of same-level ops such as | ||
| 527 | ;; a -> b -> c | ||
| 528 | ;; -> d | ||
| 529 | ;; So as to align with the earliest appropriate place. | ||
| 530 | (smie-indent-calculate :bolp)) | ||
| 531 | ((equal token (save-excursion | ||
| 532 | (forward-comment (- (point-max))) | ||
| 533 | (smie-backward-token))) | ||
| 534 | ;; in cases such as "fn x => fn y => fn z =>", | ||
| 535 | ;; jump back to the very first fn. | ||
| 536 | ;; FIXME: should we only do that for special tokens like "=>"? | ||
| 537 | (smie-indent-calculate :bolp)) | ||
| 538 | ((setq tmp (assoc (cons (caddr res) token) | ||
| 539 | smie-indent-rules)) | ||
| 540 | (goto-char (cadr res)) | ||
| 541 | (+ (cdr tmp) (smie-indent-calculate :hanging))) | ||
| 542 | (t | ||
| 543 | (+ (or (cdr (assoc (cons t token) smie-indent-rules)) 0) | ||
| 544 | (current-column))))))))) | ||
| 545 | ;; Indentation of a comment. | ||
| 546 | (and (looking-at comment-start-skip) | ||
| 547 | (save-excursion | ||
| 548 | (forward-comment (point-max)) | ||
| 549 | (skip-chars-forward " \t\r\n") | ||
| 550 | (smie-indent-calculate nil))) | ||
| 551 | ;; Indentation inside a comment. | ||
| 552 | (and (looking-at "\\*") (nth 4 (syntax-ppss)) | ||
| 553 | (let ((ppss (syntax-ppss))) | ||
| 554 | (save-excursion | ||
| 555 | (forward-line -1) | ||
| 556 | (if (<= (point) (nth 8 ppss)) | ||
| 557 | (progn (goto-char (1+ (nth 8 ppss))) (current-column)) | ||
| 558 | (skip-chars-forward " \t") | ||
| 559 | (if (looking-at "\\*") | ||
| 560 | (current-column)))))) | ||
| 561 | ;; Indentation right after a special keyword. | ||
| 562 | (save-excursion | ||
| 563 | (let* ((tok (progn (forward-comment (- (point-max))) | ||
| 564 | (smie-backward-token))) | ||
| 565 | (tokinfo (assoc tok smie-indent-rules)) | ||
| 566 | (toklevel (assoc tok smie-op-levels))) | ||
| 567 | (when (or tokinfo (and toklevel (null (cadr toklevel)))) | ||
| 568 | (if (or (smie-indent-hanging-p) | ||
| 569 | ;; If calculating the virtual indentation point, prefer | ||
| 570 | ;; looking up the virtual indentation of the alignment | ||
| 571 | ;; point as well. This is used for indentation after | ||
| 572 | ;; "fn x => fn y =>". | ||
| 573 | virtual) | ||
| 574 | (+ (smie-indent-calculate :bolp) | ||
| 575 | (or (caddr tokinfo) (cadr tokinfo) (smie-indent-offset t))) | ||
| 576 | (+ (current-column) | ||
| 577 | (or (cadr tokinfo) (smie-indent-offset t))))))) | ||
| 578 | ;; Main loop (FIXME: whatever that means!?). | ||
| 579 | (save-excursion | ||
| 580 | (let ((positions nil) | ||
| 581 | (begline nil) | ||
| 582 | arg) | ||
| 583 | (while (and (null (car (smie-backward-sexp))) | ||
| 584 | (push (point) positions) | ||
| 585 | (not (setq begline (smie-bolp))))) | ||
| 586 | (save-excursion | ||
| 587 | ;; Figure out if the atom we just skipped is an argument rather | ||
| 588 | ;; than a function. | ||
| 589 | (setq arg (or (null (car (smie-backward-sexp))) | ||
| 590 | (member (progn (forward-comment (- (point-max))) | ||
| 591 | (smie-backward-token)) | ||
| 592 | (cdr (assoc 'list-intro smie-indent-rules)))))) | ||
| 593 | (cond | ||
| 594 | ((and arg positions) | ||
| 595 | (goto-char (car positions)) | ||
| 596 | (current-column)) | ||
| 597 | ((and (null begline) (cdr positions)) | ||
| 598 | ;; We skipped some args plus the function and bumped into something. | ||
| 599 | ;; Align with the first arg. | ||
| 600 | (goto-char (cadr positions)) | ||
| 601 | (current-column)) | ||
| 602 | ((and (null begline) positions) | ||
| 603 | ;; We're the first arg. | ||
| 604 | ;; FIXME: it might not be a funcall, in which case we might be the | ||
| 605 | ;; second element. | ||
| 606 | (goto-char (car positions)) | ||
| 607 | (+ (smie-indent-offset 'args) | ||
| 608 | ;; We used to use (smie-indent-calculate :bolp), but that | ||
| 609 | ;; doesn't seem right since it might then indent args less than | ||
| 610 | ;; the function itself. | ||
| 611 | (current-column))) | ||
| 612 | ((and (null arg) (null positions)) | ||
| 613 | ;; We're the function itself. Not sure what to do here yet. | ||
| 614 | (if virtual (current-column) | ||
| 615 | (save-excursion | ||
| 616 | (let* ((pos (point)) | ||
| 617 | (tok (progn (forward-comment (- (point-max))) | ||
| 618 | (smie-backward-token))) | ||
| 619 | (toklevels (cdr (assoc tok smie-op-levels)))) | ||
| 620 | (cond | ||
| 621 | ((numberp (car toklevels)) | ||
| 622 | ;; We're right after an infix token. Let's skip over the | ||
| 623 | ;; lefthand side. | ||
| 624 | (goto-char pos) | ||
| 625 | (let (res) | ||
| 626 | (while (progn (setq res (smie-backward-sexp 'halfsexp)) | ||
| 627 | (and (not (smie-bolp)) | ||
| 628 | (equal (car res) (car toklevels))))) | ||
| 629 | ;; We should be right after a token of equal or | ||
| 630 | ;; higher precedence. | ||
| 631 | (cond | ||
| 632 | ((and (consp res) (memq (car res) '(t nil))) | ||
| 633 | ;; The token of higher-precedence is like an open-paren. | ||
| 634 | ;; Sample case for t: foo { bar, \n[TAB] baz }. | ||
| 635 | ;; Sample case for nil: match ... with \n[TAB] | toto ... | ||
| 636 | ;; (goto-char (cadr res)) | ||
| 637 | (smie-indent-calculate :hanging)) | ||
| 638 | ((and (consp res) (<= (car res) (car toklevels))) | ||
| 639 | ;; We stopped at a token of equal or higher precedence | ||
| 640 | ;; because we found a place with which to align. | ||
| 641 | (current-column)) | ||
| 642 | ))) | ||
| 643 | ;; For other cases.... hmm... we'll see when we get there. | ||
| 644 | ))))) | ||
| 645 | ((null positions) | ||
| 646 | (smie-backward-token) | ||
| 647 | (+ (smie-indent-offset 'args) (smie-indent-calculate :bolp))) | ||
| 648 | ((car (smie-backward-sexp)) | ||
| 649 | ;; No arg stands on its own line, but the function does: | ||
| 650 | (if (cdr positions) | ||
| 651 | (progn | ||
| 652 | (goto-char (cadr positions)) | ||
| 653 | (current-column)) | ||
| 654 | (goto-char (car positions)) | ||
| 655 | (+ (current-column) (smie-indent-offset 'args)))) | ||
| 656 | (t | ||
| 657 | ;; We've skipped to a previous arg on its own line: align. | ||
| 658 | (goto-char (car positions)) | ||
| 659 | (current-column))))))) | ||
| 660 | |||
| 661 | (defun smie-indent-line () | ||
| 662 | "Indent current line using the SMIE indentation engine." | ||
| 663 | (interactive) | ||
| 664 | (let* ((savep (point)) | ||
| 665 | (indent (condition-case nil | ||
| 666 | (save-excursion | ||
| 667 | (forward-line 0) | ||
| 668 | (skip-chars-forward " \t") | ||
| 669 | (if (>= (point) savep) (setq savep nil)) | ||
| 670 | (or (smie-indent-calculate) 0)) | ||
| 671 | (error 0)))) | ||
| 672 | (if (not (numberp indent)) | ||
| 673 | ;; If something funny is used (e.g. `noindent'), return it. | ||
| 674 | indent | ||
| 675 | (if (< indent 0) (setq indent 0)) ;Just in case. | ||
| 676 | (if savep | ||
| 677 | (save-excursion (indent-line-to indent)) | ||
| 678 | (indent-line-to indent))))) | ||
| 679 | |||
| 680 | ;;;###autoload | ||
| 681 | (defun smie-setup (op-levels indent-rules) | ||
| 682 | (set (make-local-variable 'smie-indent-rules) indent-rules) | ||
| 683 | (set (make-local-variable 'smie-op-levels) op-levels) | ||
| 684 | (set (make-local-variable 'indent-line-function) 'smie-indent-line)) | ||
| 685 | |||
| 686 | |||
| 687 | (provide 'smie) | ||
| 688 | ;;; smie.el ends here | ||
diff --git a/lisp/files.el b/lisp/files.el index 83ae91dd63a..d4c05bdc5d6 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -574,6 +574,9 @@ Runs the usual ange-ftp hook, but only for completion operations." | |||
| 574 | (inhibit-file-name-operation op)) | 574 | (inhibit-file-name-operation op)) |
| 575 | (apply op args)))) | 575 | (apply op args)))) |
| 576 | 576 | ||
| 577 | (declare-function dos-convert-standard-filename "dos-fns.el" (filename)) | ||
| 578 | (declare-function w32-convert-standard-filename "w32-fns.el" (filename)) | ||
| 579 | |||
| 577 | (defun convert-standard-filename (filename) | 580 | (defun convert-standard-filename (filename) |
| 578 | "Convert a standard file's name to something suitable for the OS. | 581 | "Convert a standard file's name to something suitable for the OS. |
| 579 | This means to guarantee valid names and perhaps to canonicalize | 582 | This means to guarantee valid names and perhaps to canonicalize |
| @@ -591,15 +594,20 @@ and also turn slashes into backslashes if the shell requires it (see | |||
| 591 | `w32-shell-dos-semantics'). | 594 | `w32-shell-dos-semantics'). |
| 592 | 595 | ||
| 593 | See Info node `(elisp)Standard File Names' for more details." | 596 | See Info node `(elisp)Standard File Names' for more details." |
| 594 | (if (eq system-type 'cygwin) | 597 | (cond |
| 595 | (let ((name (copy-sequence filename)) | 598 | ((eq system-type 'cygwin) |
| 596 | (start 0)) | 599 | (let ((name (copy-sequence filename)) |
| 597 | ;; Replace invalid filename characters with ! | 600 | (start 0)) |
| 598 | (while (string-match "[?*:<>|\"\000-\037]" name start) | 601 | ;; Replace invalid filename characters with ! |
| 599 | (aset name (match-beginning 0) ?!) | 602 | (while (string-match "[?*:<>|\"\000-\037]" name start) |
| 600 | (setq start (match-end 0))) | 603 | (aset name (match-beginning 0) ?!) |
| 601 | name) | 604 | (setq start (match-end 0))) |
| 602 | filename)) | 605 | name)) |
| 606 | ((eq system-type 'windows-nt) | ||
| 607 | (w32-convert-standard-filename filename)) | ||
| 608 | ((eq system-type 'ms-dos) | ||
| 609 | (dos-convert-standard-filename filename)) | ||
| 610 | (t filename))) | ||
| 603 | 611 | ||
| 604 | (defun read-directory-name (prompt &optional dir default-dirname mustmatch initial) | 612 | (defun read-directory-name (prompt &optional dir default-dirname mustmatch initial) |
| 605 | "Read directory name, prompting with PROMPT and completing in directory DIR. | 613 | "Read directory name, prompting with PROMPT and completing in directory DIR. |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 0b7eaf7ed72..395cca72a93 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-05-14 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * gnus-sum.el (gnus-summary-save-article): Don't bother to re-fetch | ||
| 4 | article unless decoding article to be saved. | ||
| 5 | |||
| 1 | 2010-05-13 Katsumi Yamaoka <yamaoka@jpl.org> | 6 | 2010-05-13 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 7 | ||
| 3 | * mml1991.el (mml1991-mailcrypt-encrypt, mml1991-gpg-encrypt) | 8 | * mml1991.el (mml1991-mailcrypt-encrypt, mml1991-gpg-encrypt) |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 3a2c944ed2f..3626d0bd904 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -11664,12 +11664,8 @@ will not be marked as saved." | |||
| 11664 | (gnus-message 1 "Article %d is unsaveable" article)) | 11664 | (gnus-message 1 "Article %d is unsaveable" article)) |
| 11665 | ;; This is a real article. | 11665 | ;; This is a real article. |
| 11666 | (save-window-excursion | 11666 | (save-window-excursion |
| 11667 | (let ((gnus-display-mime-function (when decode | 11667 | (gnus-summary-select-article decode decode nil article) |
| 11668 | gnus-display-mime-function)) | 11668 | (gnus-summary-goto-subject article)) |
| 11669 | (gnus-article-prepare-hook (when decode | ||
| 11670 | gnus-article-prepare-hook))) | ||
| 11671 | (gnus-summary-select-article t t nil article) | ||
| 11672 | (gnus-summary-goto-subject article))) | ||
| 11673 | (with-current-buffer save-buffer | 11669 | (with-current-buffer save-buffer |
| 11674 | (erase-buffer) | 11670 | (erase-buffer) |
| 11675 | (insert-buffer-substring (if decode | 11671 | (insert-buffer-substring (if decode |
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index fb13df54045..d97320da861 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el | |||
| @@ -140,7 +140,7 @@ | |||
| 140 | 140 | ||
| 141 | (define-key-after map [describe-language-environment] | 141 | (define-key-after map [describe-language-environment] |
| 142 | `(menu-item ,(purecopy "Describe Language Environment") | 142 | `(menu-item ,(purecopy "Describe Language Environment") |
| 143 | describe-language-environment-map | 143 | ,describe-language-environment-map |
| 144 | :help ,(purecopy "Show multilingual settings for a specific language"))) | 144 | :help ,(purecopy "Show multilingual settings for a specific language"))) |
| 145 | (define-key-after map [describe-input-method] | 145 | (define-key-after map [describe-input-method] |
| 146 | `(menu-item ,(purecopy "Describe Input Method...") describe-input-method | 146 | `(menu-item ,(purecopy "Describe Input Method...") describe-input-method |
diff --git a/lisp/language/hebrew.el b/lisp/language/hebrew.el index 993df98b3a6..fd98fcfecb7 100644 --- a/lisp/language/hebrew.el +++ b/lisp/language/hebrew.el | |||
| @@ -60,14 +60,14 @@ | |||
| 60 | (input-method . "hebrew") | 60 | (input-method . "hebrew") |
| 61 | (unibyte-display . hebrew-iso-8bit) | 61 | (unibyte-display . hebrew-iso-8bit) |
| 62 | (sample-text . "Hebrew ,Hylem(B") | 62 | (sample-text . "Hebrew ,Hylem(B") |
| 63 | (documentation . "Right-to-left writing is not yet supported."))) | 63 | (documentation . "Bidirectional editing is supported."))) |
| 64 | 64 | ||
| 65 | (set-language-info-alist | 65 | (set-language-info-alist |
| 66 | "Windows-1255" '((coding-priority windows-1255) | 66 | "Windows-1255" '((coding-priority windows-1255) |
| 67 | (coding-system windows-1255) | 67 | (coding-system windows-1255) |
| 68 | (documentation . "\ | 68 | (documentation . "\ |
| 69 | Support for Windows-1255 encoding, e.g. for Yiddish. | 69 | Support for Windows-1255 encoding, e.g. for Yiddish. |
| 70 | Right-to-left writing is not yet supported."))) | 70 | Bidirectional editing is supported."))) |
| 71 | 71 | ||
| 72 | (define-coding-system 'windows-1255 | 72 | (define-coding-system 'windows-1255 |
| 73 | "windows-1255 (Hebrew) encoding (MIME: WINDOWS-1255)" | 73 | "windows-1255 (Hebrew) encoding (MIME: WINDOWS-1255)" |
diff --git a/lisp/org/org-docview.el b/lisp/org/org-docview.el index 612d6cf053b..ad507546696 100644 --- a/lisp/org/org-docview.el +++ b/lisp/org/org-docview.el | |||
| @@ -1,9 +1,8 @@ | |||
| 1 | ;;; org-docview.el --- support for links to doc-view-mode buffers | 1 | ;;; org-docview.el --- support for links to doc-view-mode buffers |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 | 3 | ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. |
| 4 | ;; Free Software Foundation, Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: Jan Böcker <jan.boecker at jboecker dot de> | 5 | ;; Author: Jan Böcker <jan.boecker at jboecker dot de> |
| 7 | ;; Keywords: outlines, hypermedia, calendar, wp | 6 | ;; Keywords: outlines, hypermedia, calendar, wp |
| 8 | ;; Homepage: http://orgmode.org | 7 | ;; Homepage: http://orgmode.org |
| 9 | ;; Version: 6.35i | 8 | ;; Version: 6.35i |
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index 65c05ae7487..cf199e69a33 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el | |||
| @@ -444,12 +444,14 @@ in the same way as TABLE completes strings of the form (concat S2 S)." | |||
| 444 | ;; I don't think such commands are usable before first setting up buffer-local | 444 | ;; I don't think such commands are usable before first setting up buffer-local |
| 445 | ;; variables to parse args, so there's no point autoloading it. | 445 | ;; variables to parse args, so there's no point autoloading it. |
| 446 | ;; ;;;###autoload | 446 | ;; ;;;###autoload |
| 447 | (defun pcomplete-std-complete () | 447 | (defun pcomplete-completions-at-point () |
| 448 | "Provide standard completion using pcomplete's completion tables. | 448 | "Provide standard completion using pcomplete's completion tables. |
| 449 | Same as `pcomplete' but using the standard completion UI." | 449 | Same as `pcomplete' but using the standard completion UI." |
| 450 | (interactive) | ||
| 451 | ;; FIXME: it only completes the text before point, whereas the | 450 | ;; FIXME: it only completes the text before point, whereas the |
| 452 | ;; standard UI may also consider text after point. | 451 | ;; standard UI may also consider text after point. |
| 452 | ;; FIXME: the `pcomplete' UI may be used internally during | ||
| 453 | ;; pcomplete-completions and then throw to `pcompleted', thus | ||
| 454 | ;; imposing the pcomplete UI over the standard UI. | ||
| 453 | (catch 'pcompleted | 455 | (catch 'pcompleted |
| 454 | (let* ((pcomplete-stub) | 456 | (let* ((pcomplete-stub) |
| 455 | pcomplete-seen pcomplete-norm-func | 457 | pcomplete-seen pcomplete-norm-func |
| @@ -516,7 +518,7 @@ Same as `pcomplete' but using the standard completion UI." | |||
| 516 | (directory-file-name f)) | 518 | (directory-file-name f)) |
| 517 | pcomplete-seen)))))) | 519 | pcomplete-seen)))))) |
| 518 | 520 | ||
| 519 | (completion-in-region | 521 | (list |
| 520 | beg (point) | 522 | beg (point) |
| 521 | ;; Add a space at the end of completion. Use a terminator-regexp | 523 | ;; Add a space at the end of completion. Use a terminator-regexp |
| 522 | ;; that never matches since the terminator cannot appear | 524 | ;; that never matches since the terminator cannot appear |
| @@ -527,7 +529,14 @@ Same as `pcomplete' but using the standard completion UI." | |||
| 527 | (cons pcomplete-termination-string | 529 | (cons pcomplete-termination-string |
| 528 | "\\`a\\`") | 530 | "\\`a\\`") |
| 529 | table)) | 531 | table)) |
| 530 | pred)))) | 532 | :predicate pred)))) |
| 533 | |||
| 534 | ;; I don't think such commands are usable before first setting up buffer-local | ||
| 535 | ;; variables to parse args, so there's no point autoloading it. | ||
| 536 | ;; ;;;###autoload | ||
| 537 | (defun pcomplete-std-complete () | ||
| 538 | (let ((completion-at-point-functions '(pcomplete-completions-at-point))) | ||
| 539 | (completion-at-point))) | ||
| 531 | 540 | ||
| 532 | ;;; Pcomplete's native UI. | 541 | ;;; Pcomplete's native UI. |
| 533 | 542 | ||
diff --git a/lisp/progmodes/asm-mode.el b/lisp/progmodes/asm-mode.el index 0ce7d780d1f..f5fef76a009 100644 --- a/lisp/progmodes/asm-mode.el +++ b/lisp/progmodes/asm-mode.el | |||
| @@ -109,7 +109,7 @@ | |||
| 109 | "Additional expressions to highlight in Assembler mode.") | 109 | "Additional expressions to highlight in Assembler mode.") |
| 110 | 110 | ||
| 111 | ;;;###autoload | 111 | ;;;###autoload |
| 112 | (defun asm-mode () | 112 | (define-derived-mode asm-mode prog-mode "Assembler" |
| 113 | "Major mode for editing typical assembler code. | 113 | "Major mode for editing typical assembler code. |
| 114 | Features a private abbrev table and the following bindings: | 114 | Features a private abbrev table and the following bindings: |
| 115 | 115 | ||
| @@ -128,13 +128,8 @@ Turning on Asm mode runs the hook `asm-mode-hook' at the end of initialization. | |||
| 128 | 128 | ||
| 129 | Special commands: | 129 | Special commands: |
| 130 | \\{asm-mode-map}" | 130 | \\{asm-mode-map}" |
| 131 | (interactive) | ||
| 132 | (kill-all-local-variables) | ||
| 133 | (setq mode-name "Assembler") | ||
| 134 | (setq major-mode 'asm-mode) | ||
| 135 | (setq local-abbrev-table asm-mode-abbrev-table) | 131 | (setq local-abbrev-table asm-mode-abbrev-table) |
| 136 | (make-local-variable 'font-lock-defaults) | 132 | (set (make-local-variable 'font-lock-defaults) '(asm-font-lock-keywords)) |
| 137 | (setq font-lock-defaults '(asm-font-lock-keywords)) | ||
| 138 | (set (make-local-variable 'indent-line-function) 'asm-indent-line) | 133 | (set (make-local-variable 'indent-line-function) 'asm-indent-line) |
| 139 | ;; Stay closer to the old TAB behavior (was tab-to-tab-stop). | 134 | ;; Stay closer to the old TAB behavior (was tab-to-tab-stop). |
| 140 | (set (make-local-variable 'tab-always-indent) nil) | 135 | (set (make-local-variable 'tab-always-indent) nil) |
| @@ -157,8 +152,7 @@ Special commands: | |||
| 157 | (setq comment-end-skip "[ \t]*\\(\\s>\\|\\*+/\\)") | 152 | (setq comment-end-skip "[ \t]*\\(\\s>\\|\\*+/\\)") |
| 158 | (make-local-variable 'comment-end) | 153 | (make-local-variable 'comment-end) |
| 159 | (setq comment-end "") | 154 | (setq comment-end "") |
| 160 | (setq fill-prefix "\t") | 155 | (setq fill-prefix "\t")) |
| 161 | (run-mode-hooks 'asm-mode-hook)) | ||
| 162 | 156 | ||
| 163 | (defun asm-indent-line () | 157 | (defun asm-indent-line () |
| 164 | "Auto-indent the current line." | 158 | "Auto-indent the current line." |
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 197b41506bd..64277dc4f82 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | 31 | ||
| 32 | (defvar comint-prompt-regexp) | 32 | (defvar comint-prompt-regexp) |
| 33 | (defvar comint-process-echoes) | 33 | (defvar comint-process-echoes) |
| 34 | (defvar smie-indent-basic) | ||
| 34 | 35 | ||
| 35 | (defgroup prolog nil | 36 | (defgroup prolog nil |
| 36 | "Major mode for editing and running Prolog under Emacs." | 37 | "Major mode for editing and running Prolog under Emacs." |
| @@ -98,6 +99,61 @@ When nil, send actual operating system end of file." | |||
| 98 | (defvar prolog-mode-abbrev-table nil) | 99 | (defvar prolog-mode-abbrev-table nil) |
| 99 | (define-abbrev-table 'prolog-mode-abbrev-table ()) | 100 | (define-abbrev-table 'prolog-mode-abbrev-table ()) |
| 100 | 101 | ||
| 102 | (defconst prolog-smie-op-levels | ||
| 103 | ;; Rather than construct the operator levels table from the BNF, | ||
| 104 | ;; we directly provide the operator precedences from GNU Prolog's | ||
| 105 | ;; manual. The only problem is that GNU Prolog's manual uses | ||
| 106 | ;; precedence levels in the opposite sense (higher numbers bind less | ||
| 107 | ;; tightly) than SMIE, so we use negative numbers. | ||
| 108 | '(("." -10000 -10000) | ||
| 109 | (":-" -1200 -1200) | ||
| 110 | ("-->" -1200 -1200) | ||
| 111 | (";" -1100 -1100) | ||
| 112 | ("->" -1050 -1050) | ||
| 113 | ("," -1000 -1000) | ||
| 114 | ("\\+" -900 -900) | ||
| 115 | ("=" -700 -700) | ||
| 116 | ("\\=" -700 -700) | ||
| 117 | ("=.." -700 -700) | ||
| 118 | ("==" -700 -700) | ||
| 119 | ("\\==" -700 -700) | ||
| 120 | ("@<" -700 -700) | ||
| 121 | ("@=<" -700 -700) | ||
| 122 | ("@>" -700 -700) | ||
| 123 | ("@>=" -700 -700) | ||
| 124 | ("is" -700 -700) | ||
| 125 | ("=:=" -700 -700) | ||
| 126 | ("=\\=" -700 -700) | ||
| 127 | ("<" -700 -700) | ||
| 128 | ("=<" -700 -700) | ||
| 129 | (">" -700 -700) | ||
| 130 | (">=" -700 -700) | ||
| 131 | (":" -600 -600) | ||
| 132 | ("+" -500 -500) | ||
| 133 | ("-" -500 -500) | ||
| 134 | ("/\\" -500 -500) | ||
| 135 | ("\\/" -500 -500) | ||
| 136 | ("*" -400 -400) | ||
| 137 | ("/" -400 -400) | ||
| 138 | ("//" -400 -400) | ||
| 139 | ("rem" -400 -400) | ||
| 140 | ("mod" -400 -400) | ||
| 141 | ("<<" -400 -400) | ||
| 142 | (">>" -400 -400) | ||
| 143 | ("**" -200 -200) | ||
| 144 | ("^" -200 -200) | ||
| 145 | ;; Prefix | ||
| 146 | ;; ("+" 200 200) | ||
| 147 | ;; ("-" 200 200) | ||
| 148 | ;; ("\\" 200 200) | ||
| 149 | ) | ||
| 150 | "Precedence levels of infix operators.") | ||
| 151 | |||
| 152 | (defconst prolog-smie-indent-rules | ||
| 153 | '((":-") | ||
| 154 | ("->")) | ||
| 155 | "Prolog indentation rules.") | ||
| 156 | |||
| 101 | (defun prolog-mode-variables () | 157 | (defun prolog-mode-variables () |
| 102 | (make-local-variable 'paragraph-separate) | 158 | (make-local-variable 'paragraph-separate) |
| 103 | (setq paragraph-separate (concat "%%\\|$\\|" page-delimiter)) ;'%%..' | 159 | (setq paragraph-separate (concat "%%\\|$\\|" page-delimiter)) ;'%%..' |
| @@ -105,8 +161,10 @@ When nil, send actual operating system end of file." | |||
| 105 | (setq paragraph-ignore-fill-prefix t) | 161 | (setq paragraph-ignore-fill-prefix t) |
| 106 | (make-local-variable 'imenu-generic-expression) | 162 | (make-local-variable 'imenu-generic-expression) |
| 107 | (setq imenu-generic-expression '((nil "^\\sw+" 0))) | 163 | (setq imenu-generic-expression '((nil "^\\sw+" 0))) |
| 108 | (make-local-variable 'indent-line-function) | 164 | (smie-setup prolog-smie-op-levels prolog-smie-indent-rules) |
| 109 | (setq indent-line-function 'prolog-indent-line) | 165 | (set (make-local-variable 'forward-sexp-function) |
| 166 | 'smie-forward-sexp-command) | ||
| 167 | (set (make-local-variable 'smie-indent-basic) prolog-indent-width) | ||
| 110 | (make-local-variable 'comment-start) | 168 | (make-local-variable 'comment-start) |
| 111 | (setq comment-start "%") | 169 | (setq comment-start "%") |
| 112 | (make-local-variable 'comment-start-skip) | 170 | (make-local-variable 'comment-start-skip) |
| @@ -122,7 +180,7 @@ When nil, send actual operating system end of file." | |||
| 122 | (define-key map "\C-c\C-l" 'inferior-prolog-load-file) | 180 | (define-key map "\C-c\C-l" 'inferior-prolog-load-file) |
| 123 | (define-key map "\C-c\C-z" 'switch-to-prolog) | 181 | (define-key map "\C-c\C-z" 'switch-to-prolog) |
| 124 | map)) | 182 | map)) |
| 125 | 183 | ||
| 126 | (easy-menu-define prolog-mode-menu prolog-mode-map "Menu for Prolog mode." | 184 | (easy-menu-define prolog-mode-menu prolog-mode-map "Menu for Prolog mode." |
| 127 | ;; Mostly copied from scheme-mode's menu. | 185 | ;; Mostly copied from scheme-mode's menu. |
| 128 | ;; Not tremendously useful, but it's a start. | 186 | ;; Not tremendously useful, but it's a start. |
| @@ -136,85 +194,18 @@ When nil, send actual operating system end of file." | |||
| 136 | )) | 194 | )) |
| 137 | 195 | ||
| 138 | ;;;###autoload | 196 | ;;;###autoload |
| 139 | (defun prolog-mode () | 197 | (define-derived-mode prolog-mode prog-mode "Prolog" |
| 140 | "Major mode for editing Prolog code for Prologs. | 198 | "Major mode for editing Prolog code for Prologs. |
| 141 | Blank lines and `%%...' separate paragraphs. `%'s start comments. | 199 | Blank lines and `%%...' separate paragraphs. `%'s start comments. |
| 142 | Commands: | 200 | Commands: |
| 143 | \\{prolog-mode-map} | 201 | \\{prolog-mode-map} |
| 144 | Entry to this mode calls the value of `prolog-mode-hook' | 202 | Entry to this mode calls the value of `prolog-mode-hook' |
| 145 | if that value is non-nil." | 203 | if that value is non-nil." |
| 146 | (interactive) | ||
| 147 | (kill-all-local-variables) | ||
| 148 | (use-local-map prolog-mode-map) | ||
| 149 | (set-syntax-table prolog-mode-syntax-table) | ||
| 150 | (setq major-mode 'prolog-mode) | ||
| 151 | (setq mode-name "Prolog") | ||
| 152 | (prolog-mode-variables) | 204 | (prolog-mode-variables) |
| 153 | (set (make-local-variable 'comment-add) 1) | 205 | (set (make-local-variable 'comment-add) 1) |
| 154 | ;; font lock | ||
| 155 | (setq font-lock-defaults '(prolog-font-lock-keywords | 206 | (setq font-lock-defaults '(prolog-font-lock-keywords |
| 156 | nil nil nil | 207 | nil nil nil |
| 157 | beginning-of-line)) | 208 | beginning-of-line))) |
| 158 | (run-mode-hooks 'prolog-mode-hook)) | ||
| 159 | |||
| 160 | (defun prolog-indent-line () | ||
| 161 | "Indent current line as Prolog code. | ||
| 162 | With argument, indent any additional lines of the same clause | ||
| 163 | rigidly along with this one (not yet)." | ||
| 164 | (interactive "p") | ||
| 165 | (let ((indent (prolog-indent-level)) | ||
| 166 | (pos (- (point-max) (point)))) | ||
| 167 | (beginning-of-line) | ||
| 168 | (indent-line-to indent) | ||
| 169 | (if (> (- (point-max) pos) (point)) | ||
| 170 | (goto-char (- (point-max) pos))))) | ||
| 171 | |||
| 172 | (defun prolog-indent-level () | ||
| 173 | "Compute Prolog indentation level." | ||
| 174 | (save-excursion | ||
| 175 | (beginning-of-line) | ||
| 176 | (skip-chars-forward " \t") | ||
| 177 | (cond | ||
| 178 | ((looking-at "%%%") 0) ;Large comment starts | ||
| 179 | ((looking-at "%[^%]") comment-column) ;Small comment starts | ||
| 180 | ((bobp) 0) ;Beginning of buffer | ||
| 181 | (t | ||
| 182 | (let ((empty t) ind more less) | ||
| 183 | (if (looking-at ")") | ||
| 184 | (setq less t) ;Find close | ||
| 185 | (setq less nil)) | ||
| 186 | ;; See previous indentation | ||
| 187 | (while empty | ||
| 188 | (forward-line -1) | ||
| 189 | (beginning-of-line) | ||
| 190 | (if (bobp) | ||
| 191 | (setq empty nil) | ||
| 192 | (skip-chars-forward " \t") | ||
| 193 | (if (not (or (looking-at "%[^%]") (looking-at "\n"))) | ||
| 194 | (setq empty nil)))) | ||
| 195 | (if (bobp) | ||
| 196 | (setq ind 0) ;Beginning of buffer | ||
| 197 | (setq ind (current-column))) ;Beginning of clause | ||
| 198 | ;; See its beginning | ||
| 199 | (if (looking-at "%%[^%]") | ||
| 200 | ind | ||
| 201 | ;; Real prolog code | ||
| 202 | (if (looking-at "(") | ||
| 203 | (setq more t) ;Find open | ||
| 204 | (setq more nil)) | ||
| 205 | ;; See its tail | ||
| 206 | (end-of-prolog-clause) | ||
| 207 | (or (bobp) (forward-char -1)) | ||
| 208 | (cond ((looking-at "[,(;>]") | ||
| 209 | (if (and more (looking-at "[^,]")) | ||
| 210 | (+ ind prolog-indent-width) ;More indentation | ||
| 211 | (max tab-width ind))) ;Same indentation | ||
| 212 | ((looking-at "-") tab-width) ;TAB | ||
| 213 | ((or less (looking-at "[^.]")) | ||
| 214 | (max (- ind prolog-indent-width) 0)) ;Less indentation | ||
| 215 | (t 0)) ;No indentation | ||
| 216 | ))) | ||
| 217 | ))) | ||
| 218 | 209 | ||
| 219 | (defun end-of-prolog-clause () | 210 | (defun end-of-prolog-clause () |
| 220 | "Go to end of clause in this line." | 211 | "Go to end of clause in this line." |
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index eca6d5fbe7b..5f4028af89a 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -411,11 +411,7 @@ the car and cdr are the same symbol.") | |||
| 411 | (modify-syntax-entry (pop list) (pop list) table)) | 411 | (modify-syntax-entry (pop list) (pop list) table)) |
| 412 | table) | 412 | table) |
| 413 | 413 | ||
| 414 | (defvar sh-mode-syntax-table nil | 414 | (defvar sh-mode-syntax-table |
| 415 | "The syntax table to use for Shell-Script mode. | ||
| 416 | This is buffer-local in every such buffer.") | ||
| 417 | |||
| 418 | (defvar sh-mode-default-syntax-table | ||
| 419 | (sh-mode-syntax-table () | 415 | (sh-mode-syntax-table () |
| 420 | ?\# "<" | 416 | ?\# "<" |
| 421 | ?\n ">#" | 417 | ?\n ">#" |
| @@ -436,7 +432,8 @@ This is buffer-local in every such buffer.") | |||
| 436 | ?= "." | 432 | ?= "." |
| 437 | ?< "." | 433 | ?< "." |
| 438 | ?> ".") | 434 | ?> ".") |
| 439 | "Default syntax table for shell mode.") | 435 | "The syntax table to use for Shell-Script mode. |
| 436 | This is buffer-local in every such buffer.") | ||
| 440 | 437 | ||
| 441 | (defvar sh-mode-syntax-table-input | 438 | (defvar sh-mode-syntax-table-input |
| 442 | '((sh . nil)) | 439 | '((sh . nil)) |
| @@ -611,7 +608,7 @@ sign. See `sh-feature'." | |||
| 611 | (defvar sh-header-marker nil | 608 | (defvar sh-header-marker nil |
| 612 | "When non-nil is the end of header for prepending by \\[sh-execute-region]. | 609 | "When non-nil is the end of header for prepending by \\[sh-execute-region]. |
| 613 | That command is also used for setting this variable.") | 610 | That command is also used for setting this variable.") |
| 614 | 611 | (make-variable-buffer-local 'sh-header-marker) | |
| 615 | 612 | ||
| 616 | (defcustom sh-beginning-of-command | 613 | (defcustom sh-beginning-of-command |
| 617 | "\\([;({`|&]\\|\\`\\|[^\\]\n\\)[ \t]*\\([/~[:alnum:]:]\\)" | 614 | "\\([;({`|&]\\|\\`\\|[^\\]\n\\)[ \t]*\\([/~[:alnum:]:]\\)" |
| @@ -1533,57 +1530,41 @@ indicate what shell it is use `sh-alias-alist' to translate. | |||
| 1533 | 1530 | ||
| 1534 | If your shell gives error messages with line numbers, you can use \\[executable-interpret] | 1531 | If your shell gives error messages with line numbers, you can use \\[executable-interpret] |
| 1535 | with your script for an edit-interpret-debug cycle." | 1532 | with your script for an edit-interpret-debug cycle." |
| 1536 | (make-local-variable 'skeleton-end-hook) | ||
| 1537 | (make-local-variable 'paragraph-start) | ||
| 1538 | (make-local-variable 'paragraph-separate) | ||
| 1539 | (make-local-variable 'comment-start) | ||
| 1540 | (make-local-variable 'comment-start-skip) | ||
| 1541 | (make-local-variable 'require-final-newline) | ||
| 1542 | (make-local-variable 'sh-header-marker) | ||
| 1543 | (make-local-variable 'sh-shell-file) | 1533 | (make-local-variable 'sh-shell-file) |
| 1544 | (make-local-variable 'sh-shell) | 1534 | (make-local-variable 'sh-shell) |
| 1545 | (make-local-variable 'skeleton-pair-alist) | 1535 | |
| 1546 | (make-local-variable 'skeleton-pair-filter-function) | 1536 | (set (make-local-variable 'skeleton-pair-default-alist) |
| 1547 | (make-local-variable 'comint-dynamic-complete-functions) | 1537 | sh-skeleton-pair-default-alist) |
| 1548 | (make-local-variable 'comint-prompt-regexp) | 1538 | (set (make-local-variable 'skeleton-end-hook) |
| 1549 | (make-local-variable 'font-lock-defaults) | 1539 | (lambda () (or (eolp) (newline) (indent-relative)))) |
| 1550 | (make-local-variable 'skeleton-filter-function) | 1540 | |
| 1551 | (make-local-variable 'skeleton-newline-indent-rigidly) | 1541 | (set (make-local-variable 'paragraph-start) (concat page-delimiter "\\|$")) |
| 1552 | (make-local-variable 'sh-shell-variables) | 1542 | (set (make-local-variable 'paragraph-separate) paragraph-start) |
| 1553 | (make-local-variable 'sh-shell-variables-initialized) | 1543 | (set (make-local-variable 'comment-start) "# ") |
| 1554 | (make-local-variable 'imenu-generic-expression) | 1544 | (set (make-local-variable 'comment-start-skip) "#+[\t ]*") |
| 1555 | (make-local-variable 'sh-indent-supported-here) | 1545 | (set (make-local-variable 'local-abbrev-table) sh-mode-abbrev-table) |
| 1556 | (make-local-variable 'skeleton-pair-default-alist) | 1546 | (set (make-local-variable 'comint-dynamic-complete-functions) |
| 1557 | (setq skeleton-pair-default-alist sh-skeleton-pair-default-alist) | 1547 | sh-dynamic-complete-functions) |
| 1558 | (setq skeleton-end-hook (lambda () | 1548 | ;; we can't look if previous line ended with `\' |
| 1559 | (or (eolp) (newline) (indent-relative))) | 1549 | (set (make-local-variable 'comint-prompt-regexp) "^[ \t]*") |
| 1560 | paragraph-start (concat page-delimiter "\\|$") | 1550 | (set (make-local-variable 'imenu-case-fold-search) nil) |
| 1561 | paragraph-separate paragraph-start | 1551 | (set (make-local-variable 'font-lock-defaults) |
| 1562 | comment-start "# " | 1552 | `((sh-font-lock-keywords |
| 1563 | comment-start-skip "#+[\t ]*" | 1553 | sh-font-lock-keywords-1 sh-font-lock-keywords-2) |
| 1564 | local-abbrev-table sh-mode-abbrev-table | 1554 | nil nil |
| 1565 | comint-dynamic-complete-functions sh-dynamic-complete-functions | 1555 | ((?/ . "w") (?~ . "w") (?. . "w") (?- . "w") (?_ . "w")) nil |
| 1566 | ;; we can't look if previous line ended with `\' | 1556 | (font-lock-syntactic-keywords . sh-font-lock-syntactic-keywords) |
| 1567 | comint-prompt-regexp "^[ \t]*" | 1557 | (font-lock-syntactic-face-function |
| 1568 | imenu-case-fold-search nil | 1558 | . sh-font-lock-syntactic-face-function))) |
| 1569 | font-lock-defaults | 1559 | (set (make-local-variable 'skeleton-pair-alist) '((?` _ ?`))) |
| 1570 | `((sh-font-lock-keywords | 1560 | (set (make-local-variable 'skeleton-pair-filter-function) 'sh-quoted-p) |
| 1571 | sh-font-lock-keywords-1 sh-font-lock-keywords-2) | 1561 | (set (make-local-variable 'skeleton-further-elements) |
| 1572 | nil nil | 1562 | '((< '(- (min sh-indentation (current-column)))))) |
| 1573 | ((?/ . "w") (?~ . "w") (?. . "w") (?- . "w") (?_ . "w")) nil | 1563 | (set (make-local-variable 'skeleton-filter-function) 'sh-feature) |
| 1574 | (font-lock-syntactic-keywords . sh-font-lock-syntactic-keywords) | 1564 | (set (make-local-variable 'skeleton-newline-indent-rigidly) t) |
| 1575 | (font-lock-syntactic-face-function | 1565 | (set (make-local-variable 'sh-indent-supported-here) nil) |
| 1576 | . sh-font-lock-syntactic-face-function)) | ||
| 1577 | skeleton-pair-alist '((?` _ ?`)) | ||
| 1578 | skeleton-pair-filter-function 'sh-quoted-p | ||
| 1579 | skeleton-further-elements '((< '(- (min sh-indentation | ||
| 1580 | (current-column))))) | ||
| 1581 | skeleton-filter-function 'sh-feature | ||
| 1582 | skeleton-newline-indent-rigidly t | ||
| 1583 | sh-indent-supported-here nil) | ||
| 1584 | (set (make-local-variable 'defun-prompt-regexp) | 1566 | (set (make-local-variable 'defun-prompt-regexp) |
| 1585 | (concat "^\\(function[ \t]\\|[[:alnum:]]+[ \t]+()[ \t]+\\)")) | 1567 | (concat "^\\(function[ \t]\\|[[:alnum:]]+[ \t]+()[ \t]+\\)")) |
| 1586 | (set (make-local-variable 'parse-sexp-ignore-comments) t) | ||
| 1587 | ;; Parse or insert magic number for exec, and set all variables depending | 1568 | ;; Parse or insert magic number for exec, and set all variables depending |
| 1588 | ;; on the shell thus determined. | 1569 | ;; on the shell thus determined. |
| 1589 | (sh-set-shell | 1570 | (sh-set-shell |
| @@ -1737,21 +1718,20 @@ Calls the value of `sh-set-shell-hook' if set." | |||
| 1737 | no-query-flag insert-flag))) | 1718 | no-query-flag insert-flag))) |
| 1738 | (let ((tem (sh-feature sh-require-final-newline))) | 1719 | (let ((tem (sh-feature sh-require-final-newline))) |
| 1739 | (if (eq tem t) | 1720 | (if (eq tem t) |
| 1740 | (setq require-final-newline mode-require-final-newline))) | 1721 | (set (make-local-variable 'require-final-newline) |
| 1741 | (setq | 1722 | mode-require-final-newline))) |
| 1742 | mode-line-process (format "[%s]" sh-shell) | 1723 | (setq mode-line-process (format "[%s]" sh-shell)) |
| 1743 | sh-shell-variables nil | 1724 | (set (make-local-variable 'sh-shell-variables) nil) |
| 1744 | sh-shell-variables-initialized nil | 1725 | (set (make-local-variable 'sh-shell-variables-initialized) nil) |
| 1745 | imenu-generic-expression (sh-feature sh-imenu-generic-expression)) | 1726 | (set (make-local-variable 'imenu-generic-expression) |
| 1746 | (make-local-variable 'sh-mode-syntax-table) | 1727 | (sh-feature sh-imenu-generic-expression)) |
| 1747 | (let ((tem (sh-feature sh-mode-syntax-table-input))) | 1728 | (let ((tem (sh-feature sh-mode-syntax-table-input))) |
| 1748 | (setq sh-mode-syntax-table | 1729 | (when tem |
| 1749 | (if tem (apply 'sh-mode-syntax-table tem) | 1730 | (set (make-local-variable 'sh-mode-syntax-table) |
| 1750 | sh-mode-default-syntax-table))) | 1731 | (apply 'sh-mode-syntax-table tem)) |
| 1751 | (set-syntax-table sh-mode-syntax-table) | 1732 | (set-syntax-table sh-mode-syntax-table))) |
| 1752 | (dolist (var (sh-feature sh-variables)) | 1733 | (dolist (var (sh-feature sh-variables)) |
| 1753 | (sh-remember-variable var)) | 1734 | (sh-remember-variable var)) |
| 1754 | (make-local-variable 'indent-line-function) | ||
| 1755 | (if (setq sh-indent-supported-here (sh-feature sh-indent-supported)) | 1735 | (if (setq sh-indent-supported-here (sh-feature sh-indent-supported)) |
| 1756 | (progn | 1736 | (progn |
| 1757 | (message "Setting up indent for shell type %s" sh-shell) | 1737 | (message "Setting up indent for shell type %s" sh-shell) |
| @@ -1764,7 +1744,7 @@ Calls the value of `sh-set-shell-hook' if set." | |||
| 1764 | (message "setting up indent stuff") | 1744 | (message "setting up indent stuff") |
| 1765 | ;; sh-mode has already made indent-line-function local | 1745 | ;; sh-mode has already made indent-line-function local |
| 1766 | ;; but do it in case this is called before that. | 1746 | ;; but do it in case this is called before that. |
| 1767 | (setq indent-line-function 'sh-indent-line) | 1747 | (set (make-local-variable 'indent-line-function) 'sh-indent-line) |
| 1768 | (if sh-make-vars-local | 1748 | (if sh-make-vars-local |
| 1769 | (sh-make-vars-local)) | 1749 | (sh-make-vars-local)) |
| 1770 | (message "Indentation setup for shell type %s" sh-shell)) | 1750 | (message "Indentation setup for shell type %s" sh-shell)) |
| @@ -3463,20 +3443,15 @@ CODE can be nil, t or `lambda'. | |||
| 3463 | nil means to return the best completion of STRING, or nil if there is none. | 3443 | nil means to return the best completion of STRING, or nil if there is none. |
| 3464 | t means to return a list of all possible completions of STRING. | 3444 | t means to return a list of all possible completions of STRING. |
| 3465 | `lambda' means to return t if STRING is a valid completion as it stands." | 3445 | `lambda' means to return t if STRING is a valid completion as it stands." |
| 3466 | (let ((sh-shell-variables | 3446 | (let ((vars |
| 3467 | (with-current-buffer sh-add-buffer | 3447 | (with-current-buffer sh-add-buffer |
| 3468 | (or sh-shell-variables-initialized | 3448 | (or sh-shell-variables-initialized |
| 3469 | (sh-shell-initialize-variables)) | 3449 | (sh-shell-initialize-variables)) |
| 3470 | (nconc (mapcar (lambda (var) | 3450 | (nconc (mapcar (lambda (var) |
| 3471 | (let ((name | 3451 | (substring var 0 (string-match "=" var))) |
| 3472 | (substring var 0 (string-match "=" var)))) | ||
| 3473 | (cons name name))) | ||
| 3474 | process-environment) | 3452 | process-environment) |
| 3475 | sh-shell-variables)))) | 3453 | sh-shell-variables)))) |
| 3476 | (case code | 3454 | (complete-with-action code vars string predicate))) |
| 3477 | ((nil) (try-completion string sh-shell-variables predicate)) | ||
| 3478 | (lambda (test-completion string sh-shell-variables predicate)) | ||
| 3479 | (t (all-completions string sh-shell-variables predicate))))) | ||
| 3480 | 3455 | ||
| 3481 | (defun sh-add (var delta) | 3456 | (defun sh-add (var delta) |
| 3482 | "Insert an addition of VAR and prefix DELTA for Bourne (type) shell." | 3457 | "Insert an addition of VAR and prefix DELTA for Bourne (type) shell." |
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 1f981e5a3d7..e4df102f542 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el | |||
| @@ -663,9 +663,9 @@ is changed." | |||
| 663 | 663 | ||
| 664 | Starts `sql-interactive-mode' after doing some setup. | 664 | Starts `sql-interactive-mode' after doing some setup. |
| 665 | 665 | ||
| 666 | On Windows, \"sqlplus\" usually starts the sqlplus \"GUI\". In order to | 666 | On Windows, \"sqlplus\" usually starts the sqlplus \"GUI\". In order |
| 667 | start the sqlplus console, use \"plus33\" or something similar. You | 667 | to start the sqlplus console, use \"plus33\" or something similar. |
| 668 | will find the file in your Orant\\bin directory." | 668 | You will find the file in your Orant\\bin directory." |
| 669 | :type 'file | 669 | :type 'file |
| 670 | :group 'SQL) | 670 | :group 'SQL) |
| 671 | 671 | ||
| @@ -690,7 +690,7 @@ will find the file in your Orant\\bin directory." | |||
| 690 | 690 | ||
| 691 | When non-nil, Emacs will scan text sent to sqlplus and prompt | 691 | When non-nil, Emacs will scan text sent to sqlplus and prompt |
| 692 | for replacement text for & placeholders as sqlplus does. This | 692 | for replacement text for & placeholders as sqlplus does. This |
| 693 | is needed on Windows where sqlplus output is buffer and the | 693 | is needed on Windows where sqlplus output is buffered and the |
| 694 | prompts are not shown until after the text is entered. | 694 | prompts are not shown until after the text is entered. |
| 695 | 695 | ||
| 696 | You will probably want to issue the following command in sqlplus | 696 | You will probably want to issue the following command in sqlplus |
| @@ -772,10 +772,10 @@ Starts `sql-interactive-mode' after doing some setup." | |||
| 772 | :version "24.1" | 772 | :version "24.1" |
| 773 | :group 'SQL) | 773 | :group 'SQL) |
| 774 | 774 | ||
| 775 | ;; Customization for SyBase | 775 | ;; Customization for Sybase |
| 776 | 776 | ||
| 777 | (defcustom sql-sybase-program "isql" | 777 | (defcustom sql-sybase-program "isql" |
| 778 | "Command to start isql by SyBase. | 778 | "Command to start isql by Sybase. |
| 779 | 779 | ||
| 780 | Starts `sql-interactive-mode' after doing some setup." | 780 | Starts `sql-interactive-mode' after doing some setup." |
| 781 | :type 'file | 781 | :type 'file |
| @@ -2042,7 +2042,7 @@ See `sql-product-alist' for a list of products and supported features." | |||
| 2042 | (message "`%s' is not a known product; use `sql-add-product' to add it first." product)))) | 2042 | (message "`%s' is not a known product; use `sql-add-product' to add it first." product)))) |
| 2043 | 2043 | ||
| 2044 | (defun sql-product-font-lock (keywords-only imenu) | 2044 | (defun sql-product-font-lock (keywords-only imenu) |
| 2045 | "Configures font-lock and imenu with product-specific settings. | 2045 | "Configure font-lock and imenu with product-specific settings. |
| 2046 | 2046 | ||
| 2047 | The KEYWORDS-ONLY flag is passed to font-lock to specify whether | 2047 | The KEYWORDS-ONLY flag is passed to font-lock to specify whether |
| 2048 | only keywords should be hilighted and syntactic hilighting | 2048 | only keywords should be hilighted and syntactic hilighting |
| @@ -2098,7 +2098,7 @@ also be configured." | |||
| 2098 | (defun sql-add-product-keywords (product keywords &optional append) | 2098 | (defun sql-add-product-keywords (product keywords &optional append) |
| 2099 | "Add highlighting KEYWORDS for SQL PRODUCT. | 2099 | "Add highlighting KEYWORDS for SQL PRODUCT. |
| 2100 | 2100 | ||
| 2101 | PRODUCT should be a symbol, the name of a sql product, such as | 2101 | PRODUCT should be a symbol, the name of a SQL product, such as |
| 2102 | `oracle'. KEYWORDS should be a list; see the variable | 2102 | `oracle'. KEYWORDS should be a list; see the variable |
| 2103 | `font-lock-keywords'. By default they are added at the beginning | 2103 | `font-lock-keywords'. By default they are added at the beginning |
| 2104 | of the current highlighting list. If optional argument APPEND is | 2104 | of the current highlighting list. If optional argument APPEND is |
| @@ -2131,7 +2131,7 @@ adds a fontification pattern to fontify identifiers ending in | |||
| 2131 | ;;; Functions to switch highlighting | 2131 | ;;; Functions to switch highlighting |
| 2132 | 2132 | ||
| 2133 | (defun sql-highlight-product () | 2133 | (defun sql-highlight-product () |
| 2134 | "Turns on the font highlighting for the SQL product selected." | 2134 | "Turn on the font highlighting for the SQL product selected." |
| 2135 | (when (derived-mode-p 'sql-mode) | 2135 | (when (derived-mode-p 'sql-mode) |
| 2136 | ;; Setup font-lock | 2136 | ;; Setup font-lock |
| 2137 | (sql-product-font-lock nil t) | 2137 | (sql-product-font-lock nil t) |
| @@ -2141,7 +2141,7 @@ adds a fontification pattern to fontify identifiers ending in | |||
| 2141 | (symbol-name sql-product)) "]")))) | 2141 | (symbol-name sql-product)) "]")))) |
| 2142 | 2142 | ||
| 2143 | (defun sql-set-product (product) | 2143 | (defun sql-set-product (product) |
| 2144 | "Set `sql-product' to product and enable appropriate highlighting." | 2144 | "Set `sql-product' to PRODUCT and enable appropriate highlighting." |
| 2145 | (interactive | 2145 | (interactive |
| 2146 | (list (completing-read "SQL product: " | 2146 | (list (completing-read "SQL product: " |
| 2147 | (mapcar (lambda (info) (symbol-name (car info))) | 2147 | (mapcar (lambda (info) (symbol-name (car info))) |
| @@ -2416,7 +2416,7 @@ variable `sql-buffer'. See `sql-help' on how to create such a buffer." | |||
| 2416 | (message "Current SQLi buffer is %s." (buffer-name sql-buffer))))) | 2416 | (message "Current SQLi buffer is %s." (buffer-name sql-buffer))))) |
| 2417 | 2417 | ||
| 2418 | (defun sql-make-alternate-buffer-name () | 2418 | (defun sql-make-alternate-buffer-name () |
| 2419 | "Returns a string that can be used to rename a SQLi buffer. | 2419 | "Return a string that can be used to rename a SQLi buffer. |
| 2420 | 2420 | ||
| 2421 | This is used to set `sql-alternate-buffer-name' within | 2421 | This is used to set `sql-alternate-buffer-name' within |
| 2422 | `sql-interactive-mode'." | 2422 | `sql-interactive-mode'." |
| @@ -2475,7 +2475,7 @@ Inserts SELECT or commas if appropriate." | |||
| 2475 | 2475 | ||
| 2476 | (defun sql-placeholders-filter (string) | 2476 | (defun sql-placeholders-filter (string) |
| 2477 | "Replace placeholders in STRING. | 2477 | "Replace placeholders in STRING. |
| 2478 | Placeholders are words starting with and ampersand like &this." | 2478 | Placeholders are words starting with an ampersand like &this." |
| 2479 | 2479 | ||
| 2480 | (when sql-oracle-scan-on | 2480 | (when sql-oracle-scan-on |
| 2481 | (while (string-match "&\\(\\sw+\\)" string) | 2481 | (while (string-match "&\\(\\sw+\\)" string) |
| @@ -2489,7 +2489,7 @@ Placeholders are words starting with and ampersand like &this." | |||
| 2489 | ;; Using DB2 interactively, newlines must be escaped with " \". | 2489 | ;; Using DB2 interactively, newlines must be escaped with " \". |
| 2490 | ;; The space before the backslash is relevant. | 2490 | ;; The space before the backslash is relevant. |
| 2491 | (defun sql-escape-newlines-filter (string) | 2491 | (defun sql-escape-newlines-filter (string) |
| 2492 | "Escapes newlines in STRING. | 2492 | "Escape newlines in STRING. |
| 2493 | Every newline in STRING will be preceded with a space and a backslash." | 2493 | Every newline in STRING will be preceded with a space and a backslash." |
| 2494 | (let ((result "") (start 0) mb me) | 2494 | (let ((result "") (start 0) mb me) |
| 2495 | (while (string-match "\n" string start) | 2495 | (while (string-match "\n" string start) |
| @@ -2508,7 +2508,7 @@ Every newline in STRING will be preceded with a space and a backslash." | |||
| 2508 | ;;; Input sender for SQLi buffers | 2508 | ;;; Input sender for SQLi buffers |
| 2509 | 2509 | ||
| 2510 | (defun sql-input-sender (proc string) | 2510 | (defun sql-input-sender (proc string) |
| 2511 | "Sends STRING to PROC after applying filters." | 2511 | "Send STRING to PROC after applying filters." |
| 2512 | 2512 | ||
| 2513 | (let* ((product (with-current-buffer (process-buffer proc) sql-product)) | 2513 | (let* ((product (with-current-buffer (process-buffer proc) sql-product)) |
| 2514 | (filter (sql-get-product-feature product :input-filter))) | 2514 | (filter (sql-get-product-feature product :input-filter))) |
| @@ -2575,7 +2575,7 @@ Every newline in STRING will be preceded with a space and a backslash." | |||
| 2575 | (sql-send-region (point-min) (point-max))) | 2575 | (sql-send-region (point-min) (point-max))) |
| 2576 | 2576 | ||
| 2577 | (defun sql-send-magic-terminator (buf str terminator) | 2577 | (defun sql-send-magic-terminator (buf str terminator) |
| 2578 | "Sends TERMINATOR to buffer BUF if its not present in STR." | 2578 | "Send TERMINATOR to buffer BUF if its not present in STR." |
| 2579 | (let (pat term) | 2579 | (let (pat term) |
| 2580 | ;; If flag is merely on(t), get product-specific terminator | 2580 | ;; If flag is merely on(t), get product-specific terminator |
| 2581 | (if (eq terminator t) | 2581 | (if (eq terminator t) |
| @@ -2961,7 +2961,7 @@ The default comes from `process-coding-system-alist' and | |||
| 2961 | 2961 | ||
| 2962 | ;;;###autoload | 2962 | ;;;###autoload |
| 2963 | (defun sql-sybase () | 2963 | (defun sql-sybase () |
| 2964 | "Run isql by SyBase as an inferior process. | 2964 | "Run isql by Sybase as an inferior process. |
| 2965 | 2965 | ||
| 2966 | If buffer `*SQL*' exists but no process is running, make a new process. | 2966 | If buffer `*SQL*' exists but no process is running, make a new process. |
| 2967 | If buffer exists and a process is running, just switch to buffer | 2967 | If buffer exists and a process is running, just switch to buffer |
diff --git a/lisp/simple.el b/lisp/simple.el index 5948536262c..48e1148ae6b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -422,6 +422,13 @@ Other major modes are defined by comparison with this one." | |||
| 422 | "Parent major mode from which special major modes should inherit." | 422 | "Parent major mode from which special major modes should inherit." |
| 423 | (setq buffer-read-only t)) | 423 | (setq buffer-read-only t)) |
| 424 | 424 | ||
| 425 | ;; Major mode meant to be the parent of programming modes. | ||
| 426 | |||
| 427 | (define-derived-mode prog-mode fundamental-mode "Prog" | ||
| 428 | "Major mode for editing programming language source code." | ||
| 429 | (set (make-local-variable 'require-final-newline) mode-require-final-newline) | ||
| 430 | (set (make-local-variable 'parse-sexp-ignore-comments) t)) | ||
| 431 | |||
| 425 | ;; Making and deleting lines. | 432 | ;; Making and deleting lines. |
| 426 | 433 | ||
| 427 | (defvar hard-newline (propertize "\n" 'hard t 'rear-nonsticky '(hard)) | 434 | (defvar hard-newline (propertize "\n" 'hard t 'rear-nonsticky '(hard)) |
| @@ -2070,7 +2077,11 @@ to `shell-command-history'." | |||
| 2070 | 2077 | ||
| 2071 | Like `shell-command' but if COMMAND doesn't end in ampersand, adds `&' | 2078 | Like `shell-command' but if COMMAND doesn't end in ampersand, adds `&' |
| 2072 | surrounded by whitespace and executes the command asynchronously. | 2079 | surrounded by whitespace and executes the command asynchronously. |
| 2073 | The output appears in the buffer `*Async Shell Command*'." | 2080 | The output appears in the buffer `*Async Shell Command*'. |
| 2081 | |||
| 2082 | In Elisp, you will often be better served by calling `start-process' | ||
| 2083 | directly, since it offers more control and does not impose the use of a | ||
| 2084 | shell (with its need to quote arguments)." | ||
| 2074 | (interactive | 2085 | (interactive |
| 2075 | (list | 2086 | (list |
| 2076 | (read-shell-command "Async shell command: " nil nil | 2087 | (read-shell-command "Async shell command: " nil nil |
| @@ -2131,7 +2142,11 @@ If the optional third argument ERROR-BUFFER is non-nil, it is a buffer | |||
| 2131 | or buffer name to which to direct the command's standard error output. | 2142 | or buffer name to which to direct the command's standard error output. |
| 2132 | If it is nil, error output is mingled with regular output. | 2143 | If it is nil, error output is mingled with regular output. |
| 2133 | In an interactive call, the variable `shell-command-default-error-buffer' | 2144 | In an interactive call, the variable `shell-command-default-error-buffer' |
| 2134 | specifies the value of ERROR-BUFFER." | 2145 | specifies the value of ERROR-BUFFER. |
| 2146 | |||
| 2147 | In Elisp, you will often be better served by calling `call-process' or | ||
| 2148 | `start-process' directly, since it offers more control and does not impose | ||
| 2149 | the use of a shell (with its need to quote arguments)." | ||
| 2135 | 2150 | ||
| 2136 | (interactive | 2151 | (interactive |
| 2137 | (list | 2152 | (list |
diff --git a/lisp/subr.el b/lisp/subr.el index 0cc05a78bc7..1c399f89b9c 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -3804,5 +3804,30 @@ which is higher than \"1alpha\"." | |||
| 3804 | (prin1-to-string (make-hash-table))))) | 3804 | (prin1-to-string (make-hash-table))))) |
| 3805 | (provide 'hashtable-print-readable)) | 3805 | (provide 'hashtable-print-readable)) |
| 3806 | 3806 | ||
| 3807 | ;; Moving with arrows in bidi-sensitive direction. | ||
| 3808 | (defun right-arrow-command (&optional n) | ||
| 3809 | "Move point N characters to the right (to the left if N is negative). | ||
| 3810 | On reaching beginning or end of buffer, stop and signal error. | ||
| 3811 | |||
| 3812 | Depending on the bidirectional context, this may move either forward | ||
| 3813 | or backward in the buffer. This is in contrast with \\[forward-char] | ||
| 3814 | and \\[backward-char], which see." | ||
| 3815 | (interactive "^p") | ||
| 3816 | (if (eq (current-bidi-paragraph-direction) 'left-to-right) | ||
| 3817 | (forward-char n) | ||
| 3818 | (backward-char n))) | ||
| 3819 | |||
| 3820 | (defun left-arrow-command ( &optional n) | ||
| 3821 | "Move point N characters to the left (to the right if N is negative). | ||
| 3822 | On reaching beginning or end of buffer, stop and signal error. | ||
| 3823 | |||
| 3824 | Depending on the bidirectional context, this may move either backward | ||
| 3825 | or forward in the buffer. This is in contrast with \\[backward-char] | ||
| 3826 | and \\[forward-char], which see." | ||
| 3827 | (interactive "^p") | ||
| 3828 | (if (eq (current-bidi-paragraph-direction) 'left-to-right) | ||
| 3829 | (backward-char n) | ||
| 3830 | (forward-char n))) | ||
| 3831 | |||
| 3807 | ;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc | 3832 | ;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc |
| 3808 | ;;; subr.el ends here | 3833 | ;;; subr.el ends here |
diff --git a/lisp/version.el b/lisp/version.el index 5cd0cc8d634..770409b9487 100644 --- a/lisp/version.el +++ b/lisp/version.el | |||
| @@ -29,12 +29,6 @@ | |||
| 29 | 29 | ||
| 30 | ;;; Code: | 30 | ;;; Code: |
| 31 | 31 | ||
| 32 | (defconst emacs-copyright "Copyright (C) 2010 Free Software Foundation, Inc." "\ | ||
| 33 | Short copyright string for this version of Emacs.") | ||
| 34 | |||
| 35 | (defconst emacs-version "24.0.50" "\ | ||
| 36 | Version numbers of this version of Emacs.") | ||
| 37 | |||
| 38 | (defconst emacs-major-version (progn (string-match "^[0-9]+" emacs-version) (string-to-number (match-string 0 emacs-version))) "\ | 32 | (defconst emacs-major-version (progn (string-match "^[0-9]+" emacs-version) (string-to-number (match-string 0 emacs-version))) "\ |
| 39 | Major version number of this version of Emacs. | 33 | Major version number of this version of Emacs. |
| 40 | This variable first existed in version 19.23.") | 34 | This variable first existed in version 19.23.") |
diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el index efdf26b529c..0b97b184d22 100644 --- a/lisp/w32-fns.el +++ b/lisp/w32-fns.el | |||
| @@ -253,15 +253,16 @@ You should set this to t when using a non-system shell.\n\n")))) | |||
| 253 | ;; (setq source-directory (file-name-as-directory | 253 | ;; (setq source-directory (file-name-as-directory |
| 254 | ;; (expand-file-name ".." exec-directory))))) | 254 | ;; (expand-file-name ".." exec-directory))))) |
| 255 | 255 | ||
| 256 | (defun convert-standard-filename (filename) | 256 | (defun w32-convert-standard-filename (filename) |
| 257 | "Convert a standard file's name to something suitable for the current OS. | 257 | "Convert a standard file's name to something suitable for the MS-Windows. |
| 258 | This means to guarantee valid names and perhaps to canonicalize | 258 | This means to guarantee valid names and perhaps to canonicalize |
| 259 | certain patterns. | 259 | certain patterns. |
| 260 | 260 | ||
| 261 | On Windows and DOS, replace invalid characters. On DOS, make | 261 | This function is called by `convert-standard-filename'. |
| 262 | sure to obey the 8.3 limitations. On Windows, turn Cygwin names | 262 | |
| 263 | into native names, and also turn slashes into backslashes if the | 263 | Replace invalid characters and turn Cygwin names into native |
| 264 | shell requires it (see `w32-shell-dos-semantics')." | 264 | names, and also turn slashes into backslashes if the shell |
| 265 | requires it (see `w32-shell-dos-semantics')." | ||
| 265 | (save-match-data | 266 | (save-match-data |
| 266 | (let ((name | 267 | (let ((name |
| 267 | (if (string-match "\\`/cygdrive/\\([a-zA-Z]\\)/" filename) | 268 | (if (string-match "\\`/cygdrive/\\([a-zA-Z]\\)/" filename) |
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index dfa61888467..7e8edb930ad 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-05-15 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * Makefile.in (mostlyclean): Remove references to non-existent files. | ||
| 4 | |||
| 1 | 2010-05-13 Jan Djärv <jan.h.d@swipnet.se> | 5 | 2010-05-13 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 6 | ||
| 3 | * lwlib-Xaw.c (make_dialog): Remove extra arg to XtVaGetSubresources. | 7 | * lwlib-Xaw.c (make_dialog): Remove extra arg to XtVaGetSubresources. |
diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in index c72b3920814..eac09174451 100644 --- a/lwlib/Makefile.in +++ b/lwlib/Makefile.in | |||
| @@ -75,7 +75,7 @@ lwlib-Xm.o: lwlib-Xm.c lwlib-Xm.h lwlib.h lwlib-int.h lwlib-utils.h | |||
| 75 | xlwmenu.o: xlwmenu.c xlwmenu.h lwlib.h xlwmenuP.h | 75 | xlwmenu.o: xlwmenu.c xlwmenu.h lwlib.h xlwmenuP.h |
| 76 | 76 | ||
| 77 | mostlyclean: | 77 | mostlyclean: |
| 78 | $(RM) *.o core errs ,* *.a .emacs_* make.log MakeOut \#* | 78 | $(RM) *.o core liblw.a \#* |
| 79 | 79 | ||
| 80 | clean: mostlyclean | 80 | clean: mostlyclean |
| 81 | distclean: clean | 81 | distclean: clean |
diff --git a/msdos/ChangeLog b/msdos/ChangeLog index 0c7752b0f66..fd320d85920 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog | |||
| @@ -1,3 +1,56 @@ | |||
| 1 | 2010-05-18 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * sed1x.inp: Add copyright notice. | ||
| 4 | |||
| 5 | 2010-05-18 Glenn Morris <rgm@gnu.org> | ||
| 6 | |||
| 7 | * sed1v2.inp (RALLOC_OBJ): Edit to ralloc.o. | ||
| 8 | |||
| 9 | * sed1v2.inp (GMALLOC_OBJ): Edit to gmalloc.o. | ||
| 10 | (VMLIMIT_OBJ): Edit to vm-limit.o. | ||
| 11 | |||
| 12 | 2010-05-17 Glenn Morris <rgm@gnu.org> | ||
| 13 | |||
| 14 | * sed1v2.inp (OLDXMENU_DEPS): Edit to empty. | ||
| 15 | * sed1x.inp (OLDXMENU_DEPS): Edit to ${OLDXMENU} ../src/${OLDXMENU}. | ||
| 16 | |||
| 17 | 2010-05-16 Glenn Morris <rgm@gnu.org> | ||
| 18 | |||
| 19 | * sed1v2.inp (TEMACS_LDFLAGS2): Edit to $(LDFLAGS). | ||
| 20 | |||
| 21 | * sed1v2.inp (GNUSTEP_SYSTEM_LIBRARIES): Remove. | ||
| 22 | (NS_IMPL_GNUSTEP_TEMACS_LDFLAGS): Edit to empty. | ||
| 23 | |||
| 24 | 2010-05-15 Glenn Morris <rgm@gnu.org> | ||
| 25 | |||
| 26 | * sed1v2.inp (LIBXMENU): Edit to empty. | ||
| 27 | * sed1x.inp (LIBXMENU): Expect empty initial value. | ||
| 28 | |||
| 29 | * sed1v2.inp (OLDXMENU): Edit to empty. | ||
| 30 | * sed1x.inp (OLDXMENU): Expect empty initial value. | ||
| 31 | |||
| 32 | * sed1v2.inp (LIBX_OTHER): Edit to empty. | ||
| 33 | * sed1x.inp (LIBX_OTHER): Expect empty initial value. | ||
| 34 | |||
| 35 | * sed1v2.inp (FONT_OBJ): Edit to empty for non-X case. | ||
| 36 | * sed1x.inp (FONT_OBJ): Edit to xfont.o for X case. | ||
| 37 | |||
| 38 | 2010-05-15 Eli Zaretskii <eliz@gnu.org> | ||
| 39 | |||
| 40 | * sed3v2.inp (INSTALLABLES): Edit out extra ${EXEEXT} after | ||
| 41 | "emacsclient". | ||
| 42 | (emacsserver, timer, wakeup): Remove edit-out commands. | ||
| 43 | |||
| 44 | * sed1v2.inp (MSDOS_OBJ): Add w16select.o. | ||
| 45 | (TERMCAP_OBJ): Add termcap.o. | ||
| 46 | |||
| 47 | 2010-05-15 Glenn Morris <rgm@gnu.org> | ||
| 48 | |||
| 49 | * sed1v2.inp (OLDXMENU_TARGET): Edit to empty. | ||
| 50 | * sed1x.inp (OLDXMENU_TARGET): Edit to really-oldxmenu. | ||
| 51 | |||
| 52 | * sed1v2.inp (LIBXT_OTHER): Edit to empty. | ||
| 53 | |||
| 1 | 2010-05-14 Glenn Morris <rgm@gnu.org> | 54 | 2010-05-14 Glenn Morris <rgm@gnu.org> |
| 2 | 55 | ||
| 3 | * sed1v2.inp (ns_appdir, ns_appbindir, ns_appsrc): Edit to empty. | 56 | * sed1v2.inp (ns_appdir, ns_appbindir, ns_appsrc): Edit to empty. |
diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index 2d1b2bf5f59..574910d2beb 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp | |||
| @@ -52,6 +52,7 @@ s/\.h\.in/.h-in/ | |||
| 52 | /^LD_SWITCH_X_SITE_AUX_RPATH *=/s/@LD_SWITCH_X_SITE_AUX_RPATH@// | 52 | /^LD_SWITCH_X_SITE_AUX_RPATH *=/s/@LD_SWITCH_X_SITE_AUX_RPATH@// |
| 53 | /^LD_SWITCH_SYSTEM *=/s/@LD_SWITCH_SYSTEM@// | 53 | /^LD_SWITCH_SYSTEM *=/s/@LD_SWITCH_SYSTEM@// |
| 54 | /^LD_SWITCH_SYSTEM_EXTRA *=/s/@LD_SWITCH_SYSTEM_EXTRA@// | 54 | /^LD_SWITCH_SYSTEM_EXTRA *=/s/@LD_SWITCH_SYSTEM_EXTRA@// |
| 55 | /^TEMACS_LDFLAGS2 *=/s/@TEMACS_LDFLAGS2@/$(LDFLAGS)/ | ||
| 55 | /^LIBS_SYSTEM *=/s/@LIBS_SYSTEM@// | 56 | /^LIBS_SYSTEM *=/s/@LIBS_SYSTEM@// |
| 56 | /^LIB_GCC *=/s/@LIB_GCC@/-Lgcc/ | 57 | /^LIB_GCC *=/s/@LIB_GCC@/-Lgcc/ |
| 57 | /^LIB_STANDARD *=/s/@LIB_STANDARD@// | 58 | /^LIB_STANDARD *=/s/@LIB_STANDARD@// |
| @@ -77,10 +78,13 @@ s/\.h\.in/.h-in/ | |||
| 77 | /^GCONF_LIBS *=/s/@GCONF_LIBS@// | 78 | /^GCONF_LIBS *=/s/@GCONF_LIBS@// |
| 78 | /^GTK_OBJ *=/s/@GTK_OBJ@// | 79 | /^GTK_OBJ *=/s/@GTK_OBJ@// |
| 79 | /^LIBS_TERMCAP *=/s/@LIBS_TERMCAP@// | 80 | /^LIBS_TERMCAP *=/s/@LIBS_TERMCAP@// |
| 80 | /^TERMCAP_OBJ *=/s/@TERMCAP_OBJ@/tparam.o/ | 81 | /^TERMCAP_OBJ *=/s/@TERMCAP_OBJ@/termcap.o tparam.o/ |
| 81 | /^LIBXMU *=/s/@LIBXMU@// | 82 | /^LIBXMU *=/s/@LIBXMU@// |
| 82 | /^LIBXSM *=/s/@LIBXSM@// | 83 | /^LIBXSM *=/s/@LIBXSM@// |
| 83 | /^LIBXTR6 *=/s/@LIBXTR6@// | 84 | /^LIBXTR6 *=/s/@LIBXTR6@// |
| 85 | /^LIBXT_OTHER *=/s/@LIBXT_OTHER@// | ||
| 86 | /^OLDXMENU_TARGET *=/s/@OLDXMENU_TARGET@// | ||
| 87 | /^OLDXMENU_DEPS *=/s/@OLDXMENU_DEPS@// | ||
| 84 | /^XOBJ *=/s/@XOBJ@// | 88 | /^XOBJ *=/s/@XOBJ@// |
| 85 | /^TOOLKIT_LIBW *=/s/@TOOLKIT_LIBW@// | 89 | /^TOOLKIT_LIBW *=/s/@TOOLKIT_LIBW@// |
| 86 | /^LIBSOUND *=/s/@LIBSOUND@// | 90 | /^LIBSOUND *=/s/@LIBSOUND@// |
| @@ -89,7 +93,7 @@ s/\.h\.in/.h-in/ | |||
| 89 | /^RSVG_CFLAGS *=/s/@RSVG_CFLAGS@// | 93 | /^RSVG_CFLAGS *=/s/@RSVG_CFLAGS@// |
| 90 | /^WIDGET_OBJ *=/s/@WIDGET_OBJ@// | 94 | /^WIDGET_OBJ *=/s/@WIDGET_OBJ@// |
| 91 | /^CYGWIN_OBJ *=/s/@CYGWIN_OBJ@// | 95 | /^CYGWIN_OBJ *=/s/@CYGWIN_OBJ@// |
| 92 | /^MSDOS_OBJ *=/s/= */= dosfns.o msdos.o/ | 96 | /^MSDOS_OBJ *=/s/= */= dosfns.o msdos.o w16select.o/ |
| 93 | /^MSDOS_SUPPORT *=/s/= */= $(MSDOS_SUPPORT_REAL)/ | 97 | /^MSDOS_SUPPORT *=/s/= */= $(MSDOS_SUPPORT_REAL)/ |
| 94 | /^ns_appdir *=/s/@ns_appdir@// | 98 | /^ns_appdir *=/s/@ns_appdir@// |
| 95 | /^ns_appbindir *=/s/@ns_appbindir@// | 99 | /^ns_appbindir *=/s/@ns_appbindir@// |
| @@ -97,19 +101,24 @@ s/\.h\.in/.h-in/ | |||
| 97 | /^NS_OBJ *=/s/@NS_OBJ@// | 101 | /^NS_OBJ *=/s/@NS_OBJ@// |
| 98 | /^NS_SUPPORT *=/s/@NS_SUPPORT@// | 102 | /^NS_SUPPORT *=/s/@NS_SUPPORT@// |
| 99 | /^GNU_OBJC_CFLAGS*=/s/@GNU_OBJC_CFLAGS@// | 103 | /^GNU_OBJC_CFLAGS*=/s/@GNU_OBJC_CFLAGS@// |
| 100 | /^GNUSTEP_SYSTEM_LIBRARIES *=/s/@GNUSTEP_SYSTEM_LIBRARIES@// | ||
| 101 | /^LIBRESOLV *=/s/@LIBRESOLV@// | 104 | /^LIBRESOLV *=/s/@LIBRESOLV@// |
| 102 | /^LIBSELINUX_LIBS *=/s/@LIBSELINUX_LIBS@// | 105 | /^LIBSELINUX_LIBS *=/s/@LIBSELINUX_LIBS@// |
| 103 | /^GETLOADAVG_LIBS *=/s/@[^@\n]*@// | 106 | /^GETLOADAVG_LIBS *=/s/@[^@\n]*@// |
| 104 | /^START_FILES *=/s/@START_FILES@// | 107 | /^START_FILES *=/s/@START_FILES@// |
| 105 | /^OTHER_FILES *=/s/@OTHER_FILES@// | 108 | /^OTHER_FILES *=/s/@OTHER_FILES@// |
| 106 | /^XMENU_OBJ *=/s/@XMENU_OBJ@/xmenu.o/ | 109 | /^XMENU_OBJ *=/s/@XMENU_OBJ@/xmenu.o/ |
| 107 | /^FONT_OBJ *=/s/@FONT_OBJ@/xfont.o/ | 110 | /^FONT_OBJ *=/s/@FONT_OBJ@// |
| 108 | /^MOUSE_SUPPORT *=/s/@MOUSE_SUPPORT@/$(REAL_MOUSE_SUPPORT)/ | 111 | /^MOUSE_SUPPORT *=/s/@MOUSE_SUPPORT@/$(REAL_MOUSE_SUPPORT)/ |
| 109 | /^TOOLTIP_SUPPORT *=/s/@TOOLTIP_SUPPORT@// | 112 | /^TOOLTIP_SUPPORT *=/s/@TOOLTIP_SUPPORT@// |
| 110 | /^WINDOW_SUPPORT *=/s/@WINDOW_SUPPORT@// | 113 | /^WINDOW_SUPPORT *=/s/@WINDOW_SUPPORT@// |
| 111 | /^LIBGPM *=/s/@LIBGPM@// | 114 | /^LIBGPM *=/s/@LIBGPM@// |
| 112 | /^EXEEXT *=/s/@EXEEXT@/.exe/ | 115 | /^EXEEXT *=/s/@EXEEXT@/.exe/ |
| 116 | /^OLDXMENU *=/s/@OLDXMENU@// | ||
| 117 | /^LIBXMENU *=/s/@LIBXMENU@// | ||
| 118 | /^LIBX_OTHER *=/s/@LIBX_OTHER@// | ||
| 119 | /^GMALLOC_OBJ *=/s/@GMALLOC_OBJ@/gmalloc.o/ | ||
| 120 | /^VMLIMIT_OBJ *=/s/@VMLIMIT_OBJ@/vm-limit.o/ | ||
| 121 | /^RALLOC_OBJ *=/s/@RALLOC_OBJ@/ralloc.o/ | ||
| 113 | /^PRE_ALLOC_OBJ *=/s/@PRE_ALLOC_OBJ@/lastfile.o/ | 122 | /^PRE_ALLOC_OBJ *=/s/@PRE_ALLOC_OBJ@/lastfile.o/ |
| 114 | /^POST_ALLOC_OBJ *=/s/@POST_ALLOC_OBJ@/$(vmlimitobj)/ | 123 | /^POST_ALLOC_OBJ *=/s/@POST_ALLOC_OBJ@/$(vmlimitobj)/ |
| 115 | /^UNEXEC_OBJ *=/s/@unexec@/unexec.o/ | 124 | /^UNEXEC_OBJ *=/s/@unexec@/unexec.o/ |
| @@ -118,6 +127,7 @@ s/\.h\.in/.h-in/ | |||
| 118 | /^S_FILE *=/s!@[^@\n]*@!s/msdos.h! | 127 | /^S_FILE *=/s!@[^@\n]*@!s/msdos.h! |
| 119 | /^@SET_MAKE@$/s/@SET_MAKE@// | 128 | /^@SET_MAKE@$/s/@SET_MAKE@// |
| 120 | /^@NS_IMPL_GNUSTEP_INC@/s/@NS_IMPL_GNUSTEP_INC@// | 129 | /^@NS_IMPL_GNUSTEP_INC@/s/@NS_IMPL_GNUSTEP_INC@// |
| 130 | /^NS_IMPL_GNUSTEP_TEMACS_LDFLAGS *=/s/@NS_IMPL_GNUSTEP_TEMACS_LDFLAGS@// | ||
| 121 | /^.\${libsrc}make-docfile.*>/s!make-docfile!make-docfile -o ../etc/DOC! | 131 | /^.\${libsrc}make-docfile.*>/s!make-docfile!make-docfile -o ../etc/DOC! |
| 122 | /^.\${libsrc}make-doc/s!>.*$!! | 132 | /^.\${libsrc}make-doc/s!>.*$!! |
| 123 | /^[ ]*$/d | 133 | /^[ ]*$/d |
diff --git a/msdos/sed1x.inp b/msdos/sed1x.inp index bcdb0fec0ed..118b00c2538 100644 --- a/msdos/sed1x.inp +++ b/msdos/sed1x.inp | |||
| @@ -1,14 +1,32 @@ | |||
| 1 | # -sed1x.inp------------------------------------------------------------ | 1 | # -sed1x.inp------------------------------------------------------------ |
| 2 | # Extra configuration script for src/makefile for DesqView/X | 2 | # Extra configuration script for src/makefile for DesqView/X |
| 3 | # ---------------------------------------------------------------------- | 3 | # ---------------------------------------------------------------------- |
| 4 | # | ||
| 5 | # Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, | ||
| 6 | # 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 7 | # | ||
| 8 | # This file is part of GNU Emacs. | ||
| 9 | # | ||
| 10 | # This file is free software; as a special exception, the author gives | ||
| 11 | # unlimited permission to copy and/or distribute it, with or without | ||
| 12 | # modifications, as long as this notice is preserved. | ||
| 13 | # | ||
| 14 | # This program is distributed in the hope that it will be useful, | ||
| 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| 17 | # | ||
| 18 | # ---------------------------------------------------------------------- | ||
| 4 | s!^ cd \${oldXMenudir}; \${MAKE}.*$! ${MAKE} -C ${oldXMenudir}.! | 19 | s!^ cd \${oldXMenudir}; \${MAKE}.*$! ${MAKE} -C ${oldXMenudir}.! |
| 5 | s!^ @true *$! @rem! | 20 | s!^ @true *$! @rem! |
| 6 | s/DOC/DOC-X/g | 21 | s/DOC/DOC-X/g |
| 7 | /^OLDXMENU *=/s!@OLDXMENU@!${oldXMenudir}libXMenu11.a! | 22 | /^OLDXMENU *=/s!= *!= ${oldXMenudir}libXMenu11.a! |
| 8 | /^LIBXMENU *=/s!@LIBXMENU@!${OLDXMENU}! | 23 | /^LIBXMENU *=/s!= *!= ${OLDXMENU}! |
| 9 | /^LIBX_OTHER *=/s!@LIBX_OTHER@!${LIBXT} ${LIBX_EXTRA}! | 24 | /^LIBX_OTHER *=/s!= *!= ${LIBXT} ${LIBX_EXTRA}! |
| 25 | /^OLDXMENU_TARGET *=/s!= *!= really-oldxmenu! | ||
| 26 | /^OLDXMENU_DEPS *=/s!= *!= ${OLDXMENU} ../src/${OLDXMENU}! | ||
| 10 | /^LIBS_SYSTEM *=/s!= *!= -lxext -lsys! | 27 | /^LIBS_SYSTEM *=/s!= *!= -lxext -lsys! |
| 11 | /^MSDOS_X_OBJ *=/s!= *!= w16select.o termcap.o! | 28 | /^MSDOS_X_OBJ *=/s!= *!= w16select.o termcap.o! |
| 29 | /^FONT_OBJ *=/s!= *!= xfont.o! | ||
| 12 | /^TOOLTIP_SUPPORT *=/s!= *!= ${lispsource}tooltip.elc! | 30 | /^TOOLTIP_SUPPORT *=/s!= *!= ${lispsource}tooltip.elc! |
| 13 | /^WINDOW_SUPPORT *=/s!= *!= $(BASE_WINDOW_SUPPORT) $(X_WINDOW_SUPPORT)! | 31 | /^WINDOW_SUPPORT *=/s!= *!= $(BASE_WINDOW_SUPPORT) $(X_WINDOW_SUPPORT)! |
| 14 | /^temacs *:/s!OLDXMENU!LIBXMENU! | 32 | /^temacs *:/s!OLDXMENU!LIBXMENU! |
diff --git a/msdos/sed3v2.inp b/msdos/sed3v2.inp index 323029ecf39..bc555cc0b08 100644 --- a/msdos/sed3v2.inp +++ b/msdos/sed3v2.inp | |||
| @@ -44,11 +44,10 @@ | |||
| 44 | /^EXEEXT *=/s!@EXEEXT@!! | 44 | /^EXEEXT *=/s!@EXEEXT@!! |
| 45 | /^GETOPT_H *=/s!@GETOPT_H@!getopt.h! | 45 | /^GETOPT_H *=/s!@GETOPT_H@!getopt.h! |
| 46 | /^GETOPTOBJS *=/s!@GETOPTOBJS@!getopt.o getopt1.o! | 46 | /^GETOPTOBJS *=/s!@GETOPTOBJS@!getopt.o getopt1.o! |
| 47 | /^INSTALLABLES/s/emacsclient *// | 47 | /^INSTALLABLES/s/emacsclient[^ ]* *// |
| 48 | s!^ \./! ! | 48 | s!^ \./! ! |
| 49 | /^UTILITIES=/s/ wakeup// | 49 | /^UTILITIES *=/,/^$/{ |
| 50 | /^UTILITIES=/s/ movemail// | 50 | s/movemail[^ ]* *// |
| 51 | /^UTILITIES=/s/ emacsserver// | 51 | } |
| 52 | /^UTILITIES=/s/ timer// | ||
| 53 | 52 | ||
| 54 | # arch-tag: 16f3be18-a45b-496c-b19c-e43840359de8 | 53 | # arch-tag: 16f3be18-a45b-496c-b19c-e43840359de8 |
diff --git a/src/ChangeLog b/src/ChangeLog index 5d47f437d4a..b0965f8e514 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,125 @@ | |||
| 1 | 2010-05-18 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * charset.c (load_charset_map_from_file): Don't call close after fclose. | ||
| 4 | |||
| 5 | 2010-05-18 Glenn Morris <rgm@gnu.org> | ||
| 6 | |||
| 7 | * s/gnu-linux.h: Combine two conditionals. | ||
| 8 | |||
| 9 | * Makefile.in (otherobj): Include $(VMLIMIT_OBJ) separately from | ||
| 10 | $(POST_ALLOC_OBJ). | ||
| 11 | |||
| 12 | * Makefile.in (RALLOC_OBJ): New, set by configure. | ||
| 13 | (rallocobj): Replace with the previous variable. | ||
| 14 | (otherobj): Use $RALLOC_OBJ. | ||
| 15 | |||
| 16 | * s/gnu.h (REL_ALLOC) [DOUG_LEA_MALLOC]: | ||
| 17 | * s/gnu-linux.h (REL_ALLOC) [DOUG_LEA_MALLOC]: Move undef to configure. | ||
| 18 | |||
| 19 | * Makefile.in (GMALLOC_OBJ, VMLIMIT_OBJ): New, set by configure. | ||
| 20 | (gmallocobj, vmlimitobj): Replace with previous two variables. | ||
| 21 | (otherobj): Use $GMALLOC_OBJ, $VMLIMIT_OBJ. | ||
| 22 | |||
| 23 | 2010-05-17 Glenn Morris <rgm@gnu.org> | ||
| 24 | |||
| 25 | * Makefile.in (OLDXMENU_DEPS): New, set by configure. | ||
| 26 | (stamp-oldxmenu): Use $OLDXMENU_DEPS. | ||
| 27 | |||
| 28 | 2010-05-16 Glenn Morris <rgm@gnu.org> | ||
| 29 | |||
| 30 | * Makefile.in (${ns_appbindir}Emacs, ns-app): Always define these rules. | ||
| 31 | |||
| 32 | * Makefile.in (clean): Get rid of HAVE_NS conditional. | ||
| 33 | |||
| 34 | * Makefile.in (ns_appdir, ns_appbindir): Now configure adds the | ||
| 35 | trailing "/". | ||
| 36 | |||
| 37 | * Makefile.in (TEMACS_LDFLAGS2): New, set by configure. | ||
| 38 | (temacs${EXEEXT}): Combine the NS_IMPL_GNUSTEP case with the default. | ||
| 39 | |||
| 40 | * Makefile.in (GNUSTEP_SYSTEM_LIBRARIES): Remove, unused. | ||
| 41 | (NS_IMPL_GNUSTEP_TEMACS_LDFLAGS): New, set by configure. | ||
| 42 | (LD) [NS_IMPL_GNUSTEP]: Set to $(CC) -rdynamic. | ||
| 43 | (temacs${EXEEXT}): Remove $LOCALCPP, never defined or referenced. | ||
| 44 | Make most of the NS_IMPL_GNUSTEP case the same as the default case. | ||
| 45 | |||
| 46 | * Makefile.in (temacs${EXEEXT}) [!NS_IMPL_GNUSTEP]: | ||
| 47 | Remove ${STARTFLAGS}, nothing ever sets it. | ||
| 48 | |||
| 49 | 2010-05-16 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 50 | |||
| 51 | * m/ia64.h (UNEXEC): Remove, set in s/*.h. | ||
| 52 | |||
| 53 | 2010-05-16 Glenn Morris <rgm@gnu.org> | ||
| 54 | |||
| 55 | * Makefile.in (LIBX_BASE): Always define. | ||
| 56 | |||
| 57 | * Makefile.in (LIBX_OTHER): Move out of cpp section. | ||
| 58 | |||
| 59 | * Makefile.in (LIBXT): Always define. | ||
| 60 | |||
| 61 | 2010-05-15 Glenn Morris <rgm@gnu.org> | ||
| 62 | |||
| 63 | * Makefile.in (OLDXMENU, LIBXMENU, LIBX_OTHER): Always define. | ||
| 64 | |||
| 65 | * Makefile.in (FONT_DRIVERS): Remove, replace with $FONT_OBJ. | ||
| 66 | (obj, SOME_MACHINE_OBJECTS): Use $FONT_OBJ. | ||
| 67 | |||
| 68 | 2010-05-15 Ken Raeburn <raeburn@raeburn.org> | ||
| 69 | |||
| 70 | * lisp.h (XFLOAT_DATA): Use "0?x:x" to generate an rvalue. (Bug#5916) | ||
| 71 | (LISP_MAKE_RVALUE) [!USE_LISP_UNION_TYPE && !__GNUC__]: Likewise. | ||
| 72 | |||
| 73 | * emacs.c (main): Initialize initial-environment and | ||
| 74 | process-environment before generating from env, not after. | ||
| 75 | |||
| 76 | Handle --version reasonably in CANNOT_DUMP configuration. | ||
| 77 | * emacs.c (emacs_version, emacs_copyright): New string variables. | ||
| 78 | (Vemacs_version, Vemacs_copyright): New Lisp_Object variables. | ||
| 79 | (syms_of_emacs): Defvar them, and initialize them from the C | ||
| 80 | string variables. | ||
| 81 | (main): If initialization hasn't been done, print initial version | ||
| 82 | info from the C strings, instead of starting an interactive session. | ||
| 83 | |||
| 84 | 2010-05-15 Eli Zaretskii <eliz@gnu.org> | ||
| 85 | |||
| 86 | * bidi.c (bidi_paragraph_init): Don't leave alone garbage values | ||
| 87 | of bidi_it->paragraph_dir. Call bidi_initialize if needed. | ||
| 88 | (bidi_paragraph_init): Remove redundant assertion that we are at | ||
| 89 | the beginning of a line after call to bidi_find_paragraph_start. | ||
| 90 | |||
| 91 | * xdisp.c (Fcurrent_bidi_paragraph_direction): New function. | ||
| 92 | (syms_of_xdisp): Defsubr it. | ||
| 93 | |||
| 94 | * Makefile.in: Fix MSDOS-related comments. | ||
| 95 | |||
| 96 | 2010-05-15 Glenn Morris <rgm@gnu.org> | ||
| 97 | |||
| 98 | * Makefile.in (OLDXMENU_TARGET): New, set by configure. | ||
| 99 | (really-lwlib, really-oldXMenu): Always define. | ||
| 100 | ($OLDXMENU): Depend on $OLDXMENU_TARGET. | ||
| 101 | |||
| 102 | * Makefile.in: Simplify cpp conditional. | ||
| 103 | |||
| 104 | * Makefile.in (${ns_appdir}): Simplify using umask. | ||
| 105 | |||
| 106 | * Makefile.in (${ns_appdir}): Remove references to CVS-related files. | ||
| 107 | |||
| 108 | 2010-05-14 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 109 | |||
| 110 | * eval.c (specbind): Remove left-over duplicate test. | ||
| 111 | Disallow let-binding frame-local vars. Add comment. | ||
| 112 | |||
| 113 | 2010-05-14 Eli Zaretskii <eliz@gnu.org> | ||
| 114 | |||
| 115 | Make the cache of bidi iterator states dynamically allocated. | ||
| 116 | * bidi.c (bidi_cache_shrink): New function. | ||
| 117 | (bidi_init_it): Call it. | ||
| 118 | (bidi_cache_iterator_state): Enlarge the cache if needed. | ||
| 119 | |||
| 120 | * bidi.c (bidi_move_to_visually_next): Rename from | ||
| 121 | bidi_get_next_char_visually. All callers changed. | ||
| 122 | |||
| 1 | 2010-05-14 Kenichi Handa <handa@m17n.org> | 123 | 2010-05-14 Kenichi Handa <handa@m17n.org> |
| 2 | 124 | ||
| 3 | * dispextern.h (struct composition_it): New member reversed_p. | 125 | * dispextern.h (struct composition_it): New member reversed_p. |
| @@ -6,10 +128,10 @@ | |||
| 6 | ENDPOS < CHARPOS. | 128 | ENDPOS < CHARPOS. |
| 7 | (composition_reseat_it): Handle the case that ENDPOS < CHARPOS. | 129 | (composition_reseat_it): Handle the case that ENDPOS < CHARPOS. |
| 8 | Set CMP_IT->reversed_p. | 130 | Set CMP_IT->reversed_p. |
| 9 | (composition_update_it): Pay attention ot CMP_IT->reversed_p. | 131 | (composition_update_it): Pay attention to CMP_IT->reversed_p. |
| 10 | 132 | ||
| 11 | * xdisp.c (set_iterator_to_next): Call | 133 | * xdisp.c (set_iterator_to_next): |
| 12 | composition_compute_stop_pos with negative ENDPOS if we are | 134 | Call composition_compute_stop_pos with negative ENDPOS if we are |
| 13 | scanning backward. Call composition_compute_stop_pos if scan | 135 | scanning backward. Call composition_compute_stop_pos if scan |
| 14 | direction is changed. | 136 | direction is changed. |
| 15 | (next_element_from_buffer): Call composition_compute_stop_pos with | 137 | (next_element_from_buffer): Call composition_compute_stop_pos with |
| @@ -19,8 +141,7 @@ | |||
| 19 | 141 | ||
| 20 | 2010-05-14 Kenichi Handa <handa@m17n.org> | 142 | 2010-05-14 Kenichi Handa <handa@m17n.org> |
| 21 | 143 | ||
| 22 | * font.c (font_range): Return the range for the font found at | 144 | * font.c (font_range): Return the range for the font found at first. |
| 23 | first. | ||
| 24 | 145 | ||
| 25 | 2010-05-14 Glenn Morris <rgm@gnu.org> | 146 | 2010-05-14 Glenn Morris <rgm@gnu.org> |
| 26 | 147 | ||
| @@ -102,7 +223,6 @@ | |||
| 102 | * xdisp.c (init_iterator): Don't turn on bidi reordering in | 223 | * xdisp.c (init_iterator): Don't turn on bidi reordering in |
| 103 | unibyte buffers. See | 224 | unibyte buffers. See |
| 104 | http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00263.html. | 225 | http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00263.html. |
| 105 | >>>>>>> MERGE-SOURCE | ||
| 106 | 226 | ||
| 107 | 2010-05-10 Glenn Morris <rgm@gnu.org> | 227 | 2010-05-10 Glenn Morris <rgm@gnu.org> |
| 108 | 228 | ||
| @@ -11480,7 +11600,7 @@ | |||
| 11480 | definitions from xmenu.c. Suggested by Adrian Robert. | 11600 | definitions from xmenu.c. Suggested by Adrian Robert. |
| 11481 | 11601 | ||
| 11482 | * xmenu.c: Remove platform-independent menu definitions. | 11602 | * xmenu.c: Remove platform-independent menu definitions. |
| 11483 | (menu_items menu_items_inuse, menu_items_allocated) | 11603 | (menu_items, menu_items_inuse, menu_items_allocated) |
| 11484 | (menu_items_used, menu_items_n_panes) | 11604 | (menu_items_used, menu_items_n_panes) |
| 11485 | (menu_items_submenu_depth): Move to keyboard.h. | 11605 | (menu_items_submenu_depth): Move to keyboard.h. |
| 11486 | (init_menu_items, finish_menu_items, unuse_menu_items) | 11606 | (init_menu_items, finish_menu_items, unuse_menu_items) |
diff --git a/src/Makefile.in b/src/Makefile.in index 8c723d1c886..676d2a0834e 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -65,6 +65,7 @@ config_h = config.h $(M_FILE) $(S_FILE) | |||
| 65 | 65 | ||
| 66 | bootstrap_exe = ${abs_builddir}/bootstrap-emacs${EXEEXT} | 66 | bootstrap_exe = ${abs_builddir}/bootstrap-emacs${EXEEXT} |
| 67 | 67 | ||
| 68 | ## ns-app if HAVE_NS, else empty. | ||
| 68 | OTHER_FILES = @OTHER_FILES@ | 69 | OTHER_FILES = @OTHER_FILES@ |
| 69 | 70 | ||
| 70 | CRT_DIR=@CRT_DIR@ | 71 | CRT_DIR=@CRT_DIR@ |
| @@ -114,6 +115,9 @@ LD_SWITCH_SYSTEM_EXTRA=@LD_SWITCH_SYSTEM_EXTRA@ | |||
| 114 | ## Flags to pass to ld only for temacs. | 115 | ## Flags to pass to ld only for temacs. |
| 115 | TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_EXTRA) $(LD_SWITCH_SYSTEM_TEMACS) | 116 | TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_EXTRA) $(LD_SWITCH_SYSTEM_TEMACS) |
| 116 | 117 | ||
| 118 | ## $LDFLAGS, or empty if NS_IMPL_GNUSTEP (for some reason). | ||
| 119 | TEMACS_LDFLAGS2 = @TEMACS_LDFLAGS2@ | ||
| 120 | |||
| 117 | ## Some systems define this to request special libraries. | 121 | ## Some systems define this to request special libraries. |
| 118 | LIBS_SYSTEM=@LIBS_SYSTEM@ | 122 | LIBS_SYSTEM=@LIBS_SYSTEM@ |
| 119 | 123 | ||
| @@ -167,11 +171,43 @@ LIBXTR6=@LIBXTR6@ | |||
| 167 | ## Only used if HAVE_X_WINDOWS. | 171 | ## Only used if HAVE_X_WINDOWS. |
| 168 | LIBXT_OTHER=@LIBXT_OTHER@ | 172 | LIBXT_OTHER=@LIBXT_OTHER@ |
| 169 | 173 | ||
| 174 | ## Only used if HAVE_X11 && !USE_GTK. | ||
| 175 | ## really-lwlib if USE_X_TOOLKIT, else really-oldxmenu. | ||
| 176 | OLDXMENU_TARGET=@OLDXMENU_TARGET@ | ||
| 177 | |||
| 178 | ## If !HAVE_X11 || USE_GTK, empty. | ||
| 179 | ## Else if USE_X_TOOLKIT, ${lwlibdir}liblw.a. | ||
| 180 | ## Else ${oldXMenudir}libXMenu11.a. | ||
| 181 | OLDXMENU=@OLDXMENU@ | ||
| 182 | |||
| 183 | ## If HAVE_X11 && !USE_GTK, ${OLDXMENU} ../src/${OLDXMENU}; else empty. | ||
| 184 | ## We use stamp-xmenu with these two deps to both ensure that lwlib | ||
| 185 | ## gets remade based on its dependencies in its own makefile, | ||
| 186 | ## and remake temacs if lwlib gets changed by this. | ||
| 187 | OLDXMENU_DEPS=@OLDXMENU_DEPS@ | ||
| 188 | |||
| 189 | ## If !HAVE_X11 && HAVE_X_WINDOWS, -lXMenu (this case no longer possible). | ||
| 190 | ## Else if !HAVE_X11 || USE_GTK, empty. | ||
| 191 | ## Else $(OLDXMENU). | ||
| 192 | LIBXMENU=@LIBXMENU@ | ||
| 193 | |||
| 170 | XMENU_OBJ=@XMENU_OBJ@ | 194 | XMENU_OBJ=@XMENU_OBJ@ |
| 171 | XOBJ=@XOBJ@ | 195 | XOBJ=@XOBJ@ |
| 172 | 196 | ||
| 173 | TOOLKIT_LIBW=@TOOLKIT_LIBW@ | 197 | TOOLKIT_LIBW=@TOOLKIT_LIBW@ |
| 174 | 198 | ||
| 199 | ## Only used if HAVE_X11, in LIBX_OTHER. | ||
| 200 | LIBXT=$(TOOLKIT_LIBW) $(LIBXT_OTHER) | ||
| 201 | |||
| 202 | ## If HAVE_X11, $(LIBXT) $(LIBX_EXTRA), else empty. | ||
| 203 | LIBX_OTHER=@LIBX_OTHER@ | ||
| 204 | |||
| 205 | ## LIBXMENU is nil if !HAVE_X_WINDOWS. | ||
| 206 | ## LD_SWITCH_X_SITE should not be used if not using X, but nothing | ||
| 207 | ## sets it at present, and if something ever does, it should be | ||
| 208 | ## configure, which should set it to nil in non-X builds. | ||
| 209 | LIBX_BASE=$(LIBXMENU) $(LD_SWITCH_X_SITE) | ||
| 210 | |||
| 175 | LIBSOUND= @LIBSOUND@ | 211 | LIBSOUND= @LIBSOUND@ |
| 176 | CFLAGS_SOUND= @CFLAGS_SOUND@ | 212 | CFLAGS_SOUND= @CFLAGS_SOUND@ |
| 177 | 213 | ||
| @@ -184,7 +220,7 @@ WIDGET_OBJ=@WIDGET_OBJ@ | |||
| 184 | ## sheap.o if CYGWIN, otherwise empty. | 220 | ## sheap.o if CYGWIN, otherwise empty. |
| 185 | CYGWIN_OBJ=@CYGWIN_OBJ@ | 221 | CYGWIN_OBJ=@CYGWIN_OBJ@ |
| 186 | 222 | ||
| 187 | ## dosfns.o msdos.o if MSDOS. | 223 | ## dosfns.o msdos.o w16select.o if MSDOS. |
| 188 | MSDOS_OBJ = | 224 | MSDOS_OBJ = |
| 189 | ## w16select.o termcap.o if MSDOS && HAVE_X_WINDOWS. | 225 | ## w16select.o termcap.o if MSDOS && HAVE_X_WINDOWS. |
| 190 | MSDOS_X_OBJ = | 226 | MSDOS_X_OBJ = |
| @@ -194,16 +230,18 @@ MSDOS_SUPPORT_REAL = ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \ | |||
| 194 | ## $MSDOS_SUPPORT_REAL if MSDOS. | 230 | ## $MSDOS_SUPPORT_REAL if MSDOS. |
| 195 | MSDOS_SUPPORT = | 231 | MSDOS_SUPPORT = |
| 196 | 232 | ||
| 197 | ns_appdir=@ns_appdir@/ | 233 | ns_appdir=@ns_appdir@ |
| 198 | ns_appbindir=@ns_appbindir@/ | 234 | ns_appbindir=@ns_appbindir@ |
| 199 | ns_appsrc=@ns_appsrc@ | 235 | ns_appsrc=@ns_appsrc@ |
| 200 | NS_OBJ=@NS_OBJ@ | 236 | NS_OBJ=@NS_OBJ@ |
| 201 | NS_SUPPORT=@NS_SUPPORT@ | 237 | NS_SUPPORT=@NS_SUPPORT@ |
| 202 | ## Next two only set if NS_IMPL_GNUSTEP. | 238 | ## Only set if NS_IMPL_GNUSTEP. |
| 203 | GNU_OBJC_CFLAGS=@GNU_OBJC_CFLAGS@ | 239 | GNU_OBJC_CFLAGS=@GNU_OBJC_CFLAGS@ |
| 204 | GNUSTEP_SYSTEM_LIBRARIES=@GNUSTEP_SYSTEM_LIBRARIES@ | ||
| 205 | 240 | ||
| 206 | ## Only used if HAVE_X_WINDOWS. | 241 | ## Empty if !HAVE_X_WINDOWS |
| 242 | ## xfont.o ftfont.o xftfont.o ftxfont.o if HAVE_XFT | ||
| 243 | ## xfont.o ftfont.o ftxfont.o if HAVE_FREETYPE | ||
| 244 | ## else xfont.o | ||
| 207 | FONT_OBJ=@FONT_OBJ@ | 245 | FONT_OBJ=@FONT_OBJ@ |
| 208 | 246 | ||
| 209 | ## Used if HAVE_MOUSE. | 247 | ## Used if HAVE_MOUSE. |
| @@ -257,6 +295,10 @@ DEPFLAGS = -MMD -MF deps/$*.d | |||
| 257 | /* If NS_IMPL_GNUSTEP, some definitions and includes are expanded here. */ | 295 | /* If NS_IMPL_GNUSTEP, some definitions and includes are expanded here. */ |
| 258 | @NS_IMPL_GNUSTEP_INC@ | 296 | @NS_IMPL_GNUSTEP_INC@ |
| 259 | 297 | ||
| 298 | /* FIXME move to LD_SWITCH_SYSTEM_TEMACS? | ||
| 299 | This uses ${CONFIG_SYSTEM_LIBS}, presumably set by the above include. */ | ||
| 300 | NS_IMPL_GNUSTEP_TEMACS_LDFLAGS=@NS_IMPL_GNUSTEP_TEMACS_LDFLAGS@ | ||
| 301 | |||
| 260 | /* DO NOT use -R. There is a special hack described in lastfile.c | 302 | /* DO NOT use -R. There is a special hack described in lastfile.c |
| 261 | which is used instead. Some initialized data areas are modified | 303 | which is used instead. Some initialized data areas are modified |
| 262 | at initial startup, then labeled as part of the text area when | 304 | at initial startup, then labeled as part of the text area when |
| @@ -286,15 +328,6 @@ ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS) | |||
| 286 | #endif | 328 | #endif |
| 287 | $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $< | 329 | $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $< |
| 288 | 330 | ||
| 289 | #ifdef HAVE_X_WINDOWS | ||
| 290 | OLDXMENU=@OLDXMENU@ | ||
| 291 | LIBXMENU=@LIBXMENU@ | ||
| 292 | LIBXT=$(TOOLKIT_LIBW) $(LIBXT_OTHER) | ||
| 293 | LIBX_BASE=$(LIBXMENU) $(LD_SWITCH_X_SITE) | ||
| 294 | LIBX_OTHER=@LIBX_OTHER@ | ||
| 295 | FONT_DRIVERS=$(FONT_OBJ) | ||
| 296 | #endif /* HAVE_X_WINDOWS */ | ||
| 297 | |||
| 298 | 331 | ||
| 299 | /* A macro which other sections of Makefile can redefine to munge the | 332 | /* A macro which other sections of Makefile can redefine to munge the |
| 300 | flags before they are passed to LD. This is helpful if you have | 333 | flags before they are passed to LD. This is helpful if you have |
| @@ -336,6 +369,12 @@ LD=ld | |||
| 336 | 369 | ||
| 337 | #endif /* not ORDINARY_LINK */ | 370 | #endif /* not ORDINARY_LINK */ |
| 338 | 371 | ||
| 372 | |||
| 373 | #ifdef NS_IMPL_GNUSTEP | ||
| 374 | LD=$(CC) -rdynamic | ||
| 375 | #endif | ||
| 376 | |||
| 377 | |||
| 339 | /* lastfile must follow all files whose initialized data areas should | 378 | /* lastfile must follow all files whose initialized data areas should |
| 340 | be dumped as pure by dump-emacs. */ | 379 | be dumped as pure by dump-emacs. */ |
| 341 | obj= dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ | 380 | obj= dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ |
| @@ -351,7 +390,7 @@ obj= dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ | |||
| 351 | process.o callproc.o \ | 390 | process.o callproc.o \ |
| 352 | region-cache.o sound.o atimer.o \ | 391 | region-cache.o sound.o atimer.o \ |
| 353 | doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \ | 392 | doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \ |
| 354 | $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_DRIVERS) | 393 | $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) |
| 355 | 394 | ||
| 356 | /* Object files used on some machine or other. | 395 | /* Object files used on some machine or other. |
| 357 | These go in the DOC file on all machines in case they are needed. */ | 396 | These go in the DOC file on all machines in case they are needed. */ |
| @@ -360,31 +399,25 @@ SOME_MACHINE_OBJECTS = dosfns.o msdos.o \ | |||
| 360 | fontset.o dbusbind.o \ | 399 | fontset.o dbusbind.o \ |
| 361 | nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o \ | 400 | nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o \ |
| 362 | w32.o w32console.o w32fns.o w32heap.o w32inevt.o \ | 401 | w32.o w32console.o w32fns.o w32heap.o w32inevt.o \ |
| 363 | w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o $(FONT_DRIVERS) | 402 | w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o $(FONT_OBJ) |
| 364 | |||
| 365 | gmallocobj = | ||
| 366 | rallocobj = | ||
| 367 | vmlimitobj = | ||
| 368 | #ifndef SYSTEM_MALLOC | ||
| 369 | #ifndef DOUG_LEA_MALLOC | ||
| 370 | gmallocobj = gmalloc.o | ||
| 371 | #endif | ||
| 372 | 403 | ||
| 373 | #ifdef REL_ALLOC | 404 | /* gmalloc.o if !SYSTEM_MALLOC && !DOUG_LEA_MALLOC, else empty. */ |
| 374 | rallocobj = ralloc.o | 405 | GMALLOC_OBJ=@GMALLOC_OBJ@ |
| 375 | #endif | 406 | |
| 407 | /* vm-limit.o if !SYSTEM_MALLOC, else empty. */ | ||
| 408 | VMLIMIT_OBJ=@VMLIMIT_OBJ@ | ||
| 376 | 409 | ||
| 377 | vmlimitobj = vm-limit.o | 410 | /* ralloc.o if !SYSTEM_MALLOC && REL_ALLOC, else empty. */ |
| 378 | #endif /* !SYSTEM_MALLOC */ | 411 | RALLOC_OBJ=@RALLOC_OBJ@ |
| 379 | 412 | ||
| 380 | /* Empty on Cygwin, lastfile.o elsewhere. */ | 413 | /* Empty on Cygwin, lastfile.o elsewhere. */ |
| 381 | PRE_ALLOC_OBJ=@PRE_ALLOC_OBJ@ | 414 | PRE_ALLOC_OBJ=@PRE_ALLOC_OBJ@ |
| 382 | /* lastfile.o vm-limit.o on Cygwin, $vmlimitobj elsewhere. */ | 415 | /* lastfile.o on Cygwin, empty elsewhere. */ |
| 383 | POST_ALLOC_OBJ=@POST_ALLOC_OBJ@ | 416 | POST_ALLOC_OBJ=@POST_ALLOC_OBJ@ |
| 384 | 417 | ||
| 385 | /* List of object files that make-docfile should not be told about. */ | 418 | /* List of object files that make-docfile should not be told about. */ |
| 386 | otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(gmallocobj) $(rallocobj) \ | 419 | otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) \ |
| 387 | $(POST_ALLOC_OBJ) $(WIDGET_OBJ) $(LIBOBJS) | 420 | $(POST_ALLOC_OBJ) $(VMLIMIT_OBJ) $(WIDGET_OBJ) $(LIBOBJS) |
| 388 | 421 | ||
| 389 | /* This is the platform-specific list of Lisp files loaded into the | 422 | /* This is the platform-specific list of Lisp files loaded into the |
| 390 | dumped Emacs. It is arranged like this because it is easier to generate | 423 | dumped Emacs. It is arranged like this because it is easier to generate |
| @@ -611,6 +644,7 @@ LIBES = $(LOADLIBES) $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \ | |||
| 611 | 644 | ||
| 612 | all: emacs${EXEEXT} $(OTHER_FILES) | 645 | all: emacs${EXEEXT} $(OTHER_FILES) |
| 613 | 646 | ||
| 647 | /* Does anyone ever pay attention to the load-path-shadows output here? */ | ||
| 614 | emacs${EXEEXT}: temacs${EXEEXT} ${etc}DOC ${lisp} | 648 | emacs${EXEEXT}: temacs${EXEEXT} ${etc}DOC ${lisp} |
| 615 | #ifdef CANNOT_DUMP | 649 | #ifdef CANNOT_DUMP |
| 616 | rm -f emacs${EXEEXT} | 650 | rm -f emacs${EXEEXT} |
| @@ -648,55 +682,42 @@ ${libsrc}make-docfile${EXEEXT}: | |||
| 648 | buildobj.h: Makefile | 682 | buildobj.h: Makefile |
| 649 | echo "#define BUILDOBJ \"${obj} ${otherobj} " "\"" > buildobj.h | 683 | echo "#define BUILDOBJ \"${obj} ${otherobj} " "\"" > buildobj.h |
| 650 | 684 | ||
| 651 | /* FIXME LOCALCPP not defined or mentioned anywhere. */ | 685 | temacs${EXEEXT}: $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} prefix-args${EXEEXT} |
| 652 | temacs${EXEEXT}: $(LOCALCPP) $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} prefix-args${EXEEXT} | 686 | $(LD) YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \ |
| 653 | #ifdef NS_IMPL_GNUSTEP | 687 | ${NS_IMPL_GNUSTEP_TEMACS_LDFLAGS} ) \ |
| 654 | $(CC) -rdynamic YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \ | 688 | ${TEMACS_LDFLAGS2} \ |
| 655 | -L$(GNUSTEP_SYSTEM_LIBRARIES) -lgnustep-gui -lgnustep-base \ | 689 | -o temacs ${START_FILES} ${obj} ${otherobj} ${LIBES} |
| 656 | -lobjc $(CONFIG_SYSTEM_LIBS) -lpthread ) -o temacs \ | ||
| 657 | ${obj} ${otherobj} ${LIBES} | ||
| 658 | #else | ||
| 659 | $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${TEMACS_LDFLAGS}) $(LDFLAGS) \ | ||
| 660 | -o temacs ${START_FILES} ${obj} ${otherobj} \ | ||
| 661 | ${LIBES} | ||
| 662 | #endif | ||
| 663 | 690 | ||
| 664 | prefix-args${EXEEXT}: prefix-args.o $(config_h) | 691 | prefix-args${EXEEXT}: prefix-args.o $(config_h) |
| 665 | $(CC) $(LDFLAGS) prefix-args.o -o prefix-args | 692 | $(CC) $(LDFLAGS) prefix-args.o -o prefix-args |
| 666 | 693 | ||
| 667 | #if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS) && ! defined (USE_GTK) | ||
| 668 | |||
| 669 | /* We use stamp-xmenu with these two deps to both ensure that lwlib | ||
| 670 | gets remade based on its dependencies in its own makefile, | ||
| 671 | and remake temacs if lwlib gets changed by this. */ | ||
| 672 | stamp-oldxmenu: ${OLDXMENU} ../src/$(OLDXMENU) | ||
| 673 | touch stamp-oldxmenu | ||
| 674 | /* Supply an ordering for parallel make. */ | ||
| 675 | ../src/$(OLDXMENU): ${OLDXMENU} | ||
| 676 | |||
| 677 | #ifdef USE_X_TOOLKIT | ||
| 678 | $(OLDXMENU): really-lwlib | ||
| 679 | 694 | ||
| 695 | /* Only (possibly) used if HAVE_X11 && !USE_GTK, but no harm in always | ||
| 696 | defining. */ | ||
| 680 | really-lwlib: | 697 | really-lwlib: |
| 681 | cd ${lwlibdir}; ${MAKE} ${MFLAGS} \ | 698 | cd ${lwlibdir}; ${MAKE} ${MFLAGS} \ |
| 682 | CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' | 699 | CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' |
| 683 | @true /* make -t should not create really-lwlib. */ | 700 | @true /* make -t should not create really-lwlib. */ |
| 684 | .PHONY: really-lwlib | 701 | .PHONY: really-lwlib |
| 685 | #else /* not USE_X_TOOLKIT */ | ||
| 686 | $(OLDXMENU): really-oldXMenu | ||
| 687 | 702 | ||
| 688 | really-oldXMenu: | 703 | really-oldXMenu: |
| 689 | cd ${oldXMenudir}; ${MAKE} ${MFLAGS} \ | 704 | cd ${oldXMenudir}; ${MAKE} ${MFLAGS} \ |
| 690 | CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' | 705 | CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' |
| 691 | @true /* make -t should not create really-oldXMenu. */ | 706 | @true /* make -t should not create really-oldXMenu. */ |
| 692 | .PHONY: really-oldXMenu | 707 | .PHONY: really-oldXMenu |
| 693 | #endif /* not USE_X_TOOLKIT */ | ||
| 694 | #else /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! USE_GTK) */ | ||
| 695 | 708 | ||
| 696 | /* We don''t really need this, but satisfy the dependency. */ | 709 | /* We don''t really need this when OLDXMENU_DEPS is empty, but as |
| 697 | stamp-oldxmenu: | 710 | things stand we need something to satisfy the temacs dependency. */ |
| 711 | stamp-oldxmenu: ${OLDXMENU_DEPS} | ||
| 698 | touch stamp-oldxmenu | 712 | touch stamp-oldxmenu |
| 699 | #endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! USE_GTK) */ | 713 | |
| 714 | /* HAVE_X11 implies HAVE_X_WINDOWS and HAVE_MENUS. */ | ||
| 715 | #if defined (HAVE_X11) && ! defined (USE_GTK) | ||
| 716 | /* Supply an ordering for parallel make. */ | ||
| 717 | ../src/$(OLDXMENU): ${OLDXMENU} | ||
| 718 | |||
| 719 | $(OLDXMENU): $(OLDXMENU_TARGET) | ||
| 720 | #endif /* HAVE_X11 && !USE_GTK */ | ||
| 700 | 721 | ||
| 701 | ../config.status:: epaths.in | 722 | ../config.status:: epaths.in |
| 702 | @echo "The file epaths.h needs to be set up from epaths.in." | 723 | @echo "The file epaths.h needs to be set up from epaths.in." |
| @@ -972,20 +993,16 @@ textprop.o: textprop.c buffer.h window.h $(INTERVALS_H) \ | |||
| 972 | ${ns_appdir}: ${ns_appsrc} | 993 | ${ns_appdir}: ${ns_appsrc} |
| 973 | rm -fr ${ns_appdir} | 994 | rm -fr ${ns_appdir} |
| 974 | mkdir -p ${ns_appdir} | 995 | mkdir -p ${ns_appdir} |
| 975 | ( cd ${ns_appsrc} ; tar cfh - . ) | ( cd ${ns_appdir} ; tar xf - ) | 996 | ( cd ${ns_appsrc} ; tar cfh - . ) | ( cd ${ns_appdir} ; umask 022; tar xf - ) |
| 976 | ( cd ${ns_appdir} ; for subdir in `find . -type d ! -name CVS -print` ; do \ | 997 | #endif /* HAVE_NS */ |
| 977 | chmod a+rx $${subdir} ; \ | ||
| 978 | rm -rf $${subdir}/CVS ; \ | ||
| 979 | rm -f $${subdir}/.cvsignore ; done ; ) | ||
| 980 | 998 | ||
| 999 | /* These are only used if HAVE_NS, but no harm in always defining them. */ | ||
| 981 | ${ns_appbindir}Emacs: emacs${EXEEXT} | 1000 | ${ns_appbindir}Emacs: emacs${EXEEXT} |
| 982 | mkdir -p ${ns_appbindir} | 1001 | mkdir -p ${ns_appbindir} |
| 983 | cp -f emacs${EXEEXT} ${ns_appbindir}Emacs | 1002 | cp -f emacs${EXEEXT} ${ns_appbindir}Emacs |
| 984 | 1003 | ||
| 985 | ns-app: ${ns_appdir} ${ns_appbindir}Emacs | 1004 | ns-app: ${ns_appdir} ${ns_appbindir}Emacs |
| 986 | 1005 | ||
| 987 | #endif /* HAVE_NS */ | ||
| 988 | |||
| 989 | mostlyclean: | 1006 | mostlyclean: |
| 990 | rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a | 1007 | rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a |
| 991 | rm -f ../etc/DOC | 1008 | rm -f ../etc/DOC |
| @@ -994,9 +1011,8 @@ mostlyclean: | |||
| 994 | clean: mostlyclean | 1011 | clean: mostlyclean |
| 995 | rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT} | 1012 | rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT} |
| 996 | -rm -rf deps | 1013 | -rm -rf deps |
| 997 | #ifdef HAVE_NS | 1014 | test "X${ns_appdir}" = "X" || rm -rf ${ns_appdir} |
| 998 | rm -fr ${ns_appdir} | 1015 | |
| 999 | #endif | ||
| 1000 | /* bootstrap-clean is used to clean up just before a bootstrap. | 1016 | /* bootstrap-clean is used to clean up just before a bootstrap. |
| 1001 | It should remove all files generated during a compilation/bootstrap, | 1017 | It should remove all files generated during a compilation/bootstrap, |
| 1002 | but not things like config.status or TAGS. */ | 1018 | but not things like config.status or TAGS. */ |
| @@ -1076,7 +1092,9 @@ tags: TAGS TAGS-LISP $(lwlibdir)TAGS | |||
| 1076 | /* Since the .el.elc rule cannot specify an extra dependency, we do it here. */ | 1092 | /* Since the .el.elc rule cannot specify an extra dependency, we do it here. */ |
| 1077 | ${lisp} ${SOME_MACHINE_LISP}: $(BOOTSTRAPEMACS) | 1093 | ${lisp} ${SOME_MACHINE_LISP}: $(BOOTSTRAPEMACS) |
| 1078 | 1094 | ||
| 1079 | ${lispsource}loaddefs.el: $(BOOTSTRAPEMACS) | 1095 | /* VCSWITNESS points to the file that holds info about the current checkout. |
| 1096 | We use it as a heuristic to decide when to rebuild loaddefs.el. */ | ||
| 1097 | ${lispsource}loaddefs.el: $(BOOTSTRAPEMACS) $(VCSWITNESS) | ||
| 1080 | cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS=${bootstrap_exe} | 1098 | cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS=${bootstrap_exe} |
| 1081 | 1099 | ||
| 1082 | /* Dump an Emacs executable named bootstrap-emacs containing the | 1100 | /* Dump an Emacs executable named bootstrap-emacs containing the |
diff --git a/src/bidi.c b/src/bidi.c index d4c7d2451d7..dbc95608fea 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -26,13 +26,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 26 | designed to be called once for every character in the buffer or | 26 | designed to be called once for every character in the buffer or |
| 27 | string. | 27 | string. |
| 28 | 28 | ||
| 29 | The main entry point is bidi_get_next_char_visually. Each time it | 29 | The main entry point is bidi_move_to_visually_next. Each time it |
| 30 | is called, it finds the next character in the visual order, and | 30 | is called, it finds the next character in the visual order, and |
| 31 | returns its information in a special structure. The caller is then | 31 | returns its information in a special structure. The caller is then |
| 32 | expected to process this character for display or any other | 32 | expected to process this character for display or any other |
| 33 | purposes, and call bidi_get_next_char_visually for the next | 33 | purposes, and call bidi_move_to_visually_next for the next |
| 34 | character. See the comments in bidi_get_next_char_visually for | 34 | character. See the comments in bidi_move_to_visually_next for more |
| 35 | more details about its algorithm that finds the next visual-order | 35 | details about its algorithm that finds the next visual-order |
| 36 | character by resolving their levels on the fly. | 36 | character by resolving their levels on the fly. |
| 37 | 37 | ||
| 38 | The two other entry points are bidi_paragraph_init and | 38 | The two other entry points are bidi_paragraph_init and |
| @@ -540,9 +540,11 @@ bidi_copy_it (struct bidi_it *to, struct bidi_it *from) | |||
| 540 | 540 | ||
| 541 | /* Caching the bidi iterator states. */ | 541 | /* Caching the bidi iterator states. */ |
| 542 | 542 | ||
| 543 | static struct bidi_it bidi_cache[1000]; /* FIXME: make this dynamically allocated! */ | 543 | #define BIDI_CACHE_CHUNK 200 |
| 544 | static int bidi_cache_idx; | 544 | static struct bidi_it *bidi_cache; |
| 545 | static int bidi_cache_last_idx; | 545 | static size_t bidi_cache_size = 0; |
| 546 | static int bidi_cache_idx; /* next unused cache slot */ | ||
| 547 | static int bidi_cache_last_idx; /* slot of last cache hit */ | ||
| 546 | 548 | ||
| 547 | static INLINE void | 549 | static INLINE void |
| 548 | bidi_cache_reset (void) | 550 | bidi_cache_reset (void) |
| @@ -552,6 +554,17 @@ bidi_cache_reset (void) | |||
| 552 | } | 554 | } |
| 553 | 555 | ||
| 554 | static INLINE void | 556 | static INLINE void |
| 557 | bidi_cache_shrink (void) | ||
| 558 | { | ||
| 559 | if (bidi_cache_size > BIDI_CACHE_CHUNK) | ||
| 560 | { | ||
| 561 | bidi_cache_size = BIDI_CACHE_CHUNK * sizeof (struct bidi_it); | ||
| 562 | bidi_cache = (struct bidi_it *) xrealloc (bidi_cache, bidi_cache_size); | ||
| 563 | } | ||
| 564 | bidi_cache_reset (); | ||
| 565 | } | ||
| 566 | |||
| 567 | static INLINE void | ||
| 555 | bidi_cache_fetch_state (int idx, struct bidi_it *bidi_it) | 568 | bidi_cache_fetch_state (int idx, struct bidi_it *bidi_it) |
| 556 | { | 569 | { |
| 557 | int current_scan_dir = bidi_it->scan_dir; | 570 | int current_scan_dir = bidi_it->scan_dir; |
| @@ -672,9 +685,13 @@ bidi_cache_iterator_state (struct bidi_it *bidi_it, int resolved) | |||
| 672 | if (idx < 0) | 685 | if (idx < 0) |
| 673 | { | 686 | { |
| 674 | idx = bidi_cache_idx; | 687 | idx = bidi_cache_idx; |
| 675 | /* Don't overrun the cache limit. */ | 688 | /* Enlarge the cache as needed. */ |
| 676 | if (idx > sizeof (bidi_cache) / sizeof (bidi_cache[0]) - 1) | 689 | if (idx >= bidi_cache_size) |
| 677 | abort (); | 690 | { |
| 691 | bidi_cache_size += BIDI_CACHE_CHUNK * sizeof (struct bidi_it); | ||
| 692 | bidi_cache = | ||
| 693 | (struct bidi_it *) xrealloc (bidi_cache, bidi_cache_size); | ||
| 694 | } | ||
| 678 | /* Character positions should correspond to cache positions 1:1. | 695 | /* Character positions should correspond to cache positions 1:1. |
| 679 | If we are outside the range of cached positions, the cache is | 696 | If we are outside the range of cached positions, the cache is |
| 680 | useless and must be reset. */ | 697 | useless and must be reset. */ |
| @@ -873,6 +890,9 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it) | |||
| 873 | EMACS_INT pos; | 890 | EMACS_INT pos; |
| 874 | bidi_type_t type; | 891 | bidi_type_t type; |
| 875 | 892 | ||
| 893 | if (!bidi_initialized) | ||
| 894 | bidi_initialize (); | ||
| 895 | |||
| 876 | /* If we are inside a paragraph separator, we are just waiting | 896 | /* If we are inside a paragraph separator, we are just waiting |
| 877 | for the separator to be exhausted; use the previous paragraph | 897 | for the separator to be exhausted; use the previous paragraph |
| 878 | direction. But don't do that if we have been just reseated, | 898 | direction. But don't do that if we have been just reseated, |
| @@ -896,11 +916,6 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it) | |||
| 896 | middle of it. Find where this paragraph starts. */ | 916 | middle of it. Find where this paragraph starts. */ |
| 897 | bytepos = bidi_find_paragraph_start (pos, bytepos); | 917 | bytepos = bidi_find_paragraph_start (pos, bytepos); |
| 898 | 918 | ||
| 899 | /* We should always be at the beginning of a new line at this | ||
| 900 | point. */ | ||
| 901 | if (!(bytepos == BEGV_BYTE || FETCH_CHAR (bytepos - 1) == '\n')) | ||
| 902 | abort (); | ||
| 903 | |||
| 904 | bidi_it->separator_limit = -1; | 919 | bidi_it->separator_limit = -1; |
| 905 | bidi_it->new_paragraph = 0; | 920 | bidi_it->new_paragraph = 0; |
| 906 | ch = FETCH_CHAR (bytepos); | 921 | ch = FETCH_CHAR (bytepos); |
| @@ -940,7 +955,7 @@ bidi_paragraph_init (bidi_dir_t dir, struct bidi_it *bidi_it) | |||
| 940 | /* Contrary to UAX#9 clause P3, we only default the paragraph | 955 | /* Contrary to UAX#9 clause P3, we only default the paragraph |
| 941 | direction to L2R if we have no previous usable paragraph | 956 | direction to L2R if we have no previous usable paragraph |
| 942 | direction. */ | 957 | direction. */ |
| 943 | if (bidi_it->paragraph_dir == NEUTRAL_DIR) | 958 | if (bidi_it->paragraph_dir != L2R && bidi_it->paragraph_dir != R2L) |
| 944 | bidi_it->paragraph_dir = L2R; /* P3 and ``higher protocols'' */ | 959 | bidi_it->paragraph_dir = L2R; /* P3 and ``higher protocols'' */ |
| 945 | if (bidi_it->paragraph_dir == R2L) | 960 | if (bidi_it->paragraph_dir == R2L) |
| 946 | bidi_it->level_stack[0].level = 1; | 961 | bidi_it->level_stack[0].level = 1; |
| @@ -990,6 +1005,7 @@ bidi_init_it (EMACS_INT charpos, EMACS_INT bytepos, struct bidi_it *bidi_it) | |||
| 990 | bidi_it->prev_for_neutral.type_after_w1 = | 1005 | bidi_it->prev_for_neutral.type_after_w1 = |
| 991 | bidi_it->prev_for_neutral.orig_type = UNKNOWN_BT; | 1006 | bidi_it->prev_for_neutral.orig_type = UNKNOWN_BT; |
| 992 | bidi_it->sor = L2R; /* FIXME: should it be user-selectable? */ | 1007 | bidi_it->sor = L2R; /* FIXME: should it be user-selectable? */ |
| 1008 | bidi_cache_shrink (); | ||
| 993 | } | 1009 | } |
| 994 | 1010 | ||
| 995 | /* Push the current embedding level and override status; reset the | 1011 | /* Push the current embedding level and override status; reset the |
| @@ -1876,7 +1892,7 @@ bidi_find_other_level_edge (struct bidi_it *bidi_it, int level, int end_flag) | |||
| 1876 | } | 1892 | } |
| 1877 | 1893 | ||
| 1878 | void | 1894 | void |
| 1879 | bidi_get_next_char_visually (struct bidi_it *bidi_it) | 1895 | bidi_move_to_visually_next (struct bidi_it *bidi_it) |
| 1880 | { | 1896 | { |
| 1881 | int old_level, new_level, next_level; | 1897 | int old_level, new_level, next_level; |
| 1882 | struct bidi_it sentinel; | 1898 | struct bidi_it sentinel; |
diff --git a/src/charset.c b/src/charset.c index 18c0bbb6310..f83fa994536 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -567,7 +567,6 @@ load_charset_map_from_file (charset, mapfile, control_flag) | |||
| 567 | n_entries++; | 567 | n_entries++; |
| 568 | } | 568 | } |
| 569 | fclose (fp); | 569 | fclose (fp); |
| 570 | close (fd); | ||
| 571 | 570 | ||
| 572 | load_charset_map (charset, head, n_entries, control_flag); | 571 | load_charset_map (charset, head, n_entries, control_flag); |
| 573 | SAFE_FREE (); | 572 | SAFE_FREE (); |
diff --git a/src/cmds.c b/src/cmds.c index 5d450fe9a13..b8a65324e9f 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -57,8 +57,12 @@ DEFUN ("forward-point", Fforward_point, Sforward_point, 1, 1, 0, | |||
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | DEFUN ("forward-char", Fforward_char, Sforward_char, 0, 1, "^p", | 59 | DEFUN ("forward-char", Fforward_char, Sforward_char, 0, 1, "^p", |
| 60 | doc: /* Move point right N characters (left if N is negative). | 60 | doc: /* Move point N characters forward (backward if N is negative). |
| 61 | On reaching end of buffer, stop and signal error. */) | 61 | On reaching end or beginning of buffer, stop and signal error. |
| 62 | |||
| 63 | Depending on the bidirectional context, the movement may be to the | ||
| 64 | right or to the left on the screen. This is in contrast with | ||
| 65 | \\[right-arrow-command], which see. */) | ||
| 62 | (n) | 66 | (n) |
| 63 | Lisp_Object n; | 67 | Lisp_Object n; |
| 64 | { | 68 | { |
| @@ -93,8 +97,12 @@ On reaching end of buffer, stop and signal error. */) | |||
| 93 | } | 97 | } |
| 94 | 98 | ||
| 95 | DEFUN ("backward-char", Fbackward_char, Sbackward_char, 0, 1, "^p", | 99 | DEFUN ("backward-char", Fbackward_char, Sbackward_char, 0, 1, "^p", |
| 96 | doc: /* Move point left N characters (right if N is negative). | 100 | doc: /* Move point N characters backward (forward if N is negative). |
| 97 | On attempt to pass beginning or end of buffer, stop and signal error. */) | 101 | On attempt to pass beginning or end of buffer, stop and signal error. |
| 102 | |||
| 103 | Depending on the bidirectional context, the movement may be to the | ||
| 104 | right or to the left on the screen. This is in contrast with | ||
| 105 | \\[left-arrow-command], which see. */) | ||
| 98 | (n) | 106 | (n) |
| 99 | Lisp_Object n; | 107 | Lisp_Object n; |
| 100 | { | 108 | { |
diff --git a/src/composite.c b/src/composite.c index cbfb4aa66d3..f392053bac9 100644 --- a/src/composite.c +++ b/src/composite.c | |||
| @@ -1150,13 +1150,13 @@ composition_compute_stop_pos (cmp_it, charpos, bytepos, endpos, string) | |||
| 1150 | /* Search backward for a pattern that may be composed and the | 1150 | /* Search backward for a pattern that may be composed and the |
| 1151 | position of (possibly) the last character of the match is | 1151 | position of (possibly) the last character of the match is |
| 1152 | closest to (but not after) START. The reason for the last | 1152 | closest to (but not after) START. The reason for the last |
| 1153 | character is that set_iterator_to_next works in reverse order | 1153 | character is that set_iterator_to_next works in reverse order, |
| 1154 | and, thus we must stop at the last character for composition | 1154 | and thus we must stop at the last character for composition |
| 1155 | check. */ | 1155 | check. */ |
| 1156 | unsigned char *p; | 1156 | unsigned char *p; |
| 1157 | int len; | 1157 | int len; |
| 1158 | /* limit byte position used in fast_looking_at. This is the | 1158 | /* Limit byte position used in fast_looking_at. This is the |
| 1159 | byte position of the next character of START. */ | 1159 | byte position of the character after START. */ |
| 1160 | EMACS_INT limit; | 1160 | EMACS_INT limit; |
| 1161 | 1161 | ||
| 1162 | if (NILP (string)) | 1162 | if (NILP (string)) |
| @@ -1191,7 +1191,7 @@ composition_compute_stop_pos (cmp_it, charpos, bytepos, endpos, string) | |||
| 1191 | len = 1; | 1191 | len = 1; |
| 1192 | if (len > 0) | 1192 | if (len > 0) |
| 1193 | { | 1193 | { |
| 1194 | /* Make CPOS points the last character of match. | 1194 | /* Make CPOS point to the last character of match. |
| 1195 | Note that LEN is byte-length. */ | 1195 | Note that LEN is byte-length. */ |
| 1196 | bpos += len; | 1196 | bpos += len; |
| 1197 | if (NILP (string)) | 1197 | if (NILP (string)) |
diff --git a/src/config.in b/src/config.in index 35530943682..99a95d7f15d 100644 --- a/src/config.in +++ b/src/config.in | |||
| @@ -1179,8 +1179,6 @@ typedef unsigned size_t; | |||
| 1179 | 1179 | ||
| 1180 | #ifdef HAVE_X11R6 | 1180 | #ifdef HAVE_X11R6 |
| 1181 | #define HAVE_X_I18N | 1181 | #define HAVE_X_I18N |
| 1182 | #elif !defined X11R5_INHIBIT_I18N | ||
| 1183 | #define HAVE_X_I18N | ||
| 1184 | #endif | 1182 | #endif |
| 1185 | 1183 | ||
| 1186 | /* Define HAVE_X11R6_XIM if we have usable X11R6-style XIM support. */ | 1184 | /* Define HAVE_X11R6_XIM if we have usable X11R6-style XIM support. */ |
| @@ -1200,11 +1198,7 @@ typedef unsigned size_t; | |||
| 1200 | that the stack is continuous. */ | 1198 | that the stack is continuous. */ |
| 1201 | #ifdef __GNUC__ | 1199 | #ifdef __GNUC__ |
| 1202 | # ifndef GC_SETJMP_WORKS | 1200 | # ifndef GC_SETJMP_WORKS |
| 1203 | /* GC_SETJMP_WORKS is nearly always appropriate for GCC -- | 1201 | /* GC_SETJMP_WORKS is nearly always appropriate for GCC. */ |
| 1204 | see NON_SAVING_SETJMP in the target descriptions. */ | ||
| 1205 | /* Exceptions (see NON_SAVING_SETJMP in target description) are | ||
| 1206 | SCO5 non-ELF (but Emacs specifies ELF) and SVR3 on x86. | ||
| 1207 | Fixme: Deal with SVR3. */ | ||
| 1208 | # define GC_SETJMP_WORKS 1 | 1202 | # define GC_SETJMP_WORKS 1 |
| 1209 | # endif | 1203 | # endif |
| 1210 | # ifndef GC_LISP_OBJECT_ALIGNMENT | 1204 | # ifndef GC_LISP_OBJECT_ALIGNMENT |
diff --git a/src/dispextern.h b/src/dispextern.h index 1b631493705..8e8da36daea 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -2868,7 +2868,7 @@ extern EMACS_INT tool_bar_button_relief; | |||
| 2868 | /* Defined in bidi.c */ | 2868 | /* Defined in bidi.c */ |
| 2869 | 2869 | ||
| 2870 | extern void bidi_init_it P_ ((EMACS_INT, EMACS_INT, struct bidi_it *)); | 2870 | extern void bidi_init_it P_ ((EMACS_INT, EMACS_INT, struct bidi_it *)); |
| 2871 | extern void bidi_get_next_char_visually P_ ((struct bidi_it *)); | 2871 | extern void bidi_move_to_visually_next P_ ((struct bidi_it *)); |
| 2872 | extern void bidi_paragraph_init P_ ((bidi_dir_t, struct bidi_it *)); | 2872 | extern void bidi_paragraph_init P_ ((bidi_dir_t, struct bidi_it *)); |
| 2873 | extern int bidi_mirror_char P_ ((int)); | 2873 | extern int bidi_mirror_char P_ ((int)); |
| 2874 | 2874 | ||
diff --git a/src/emacs.c b/src/emacs.c index 6b19b45d0b0..c0ef926da75 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -87,6 +87,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 87 | #endif | 87 | #endif |
| 88 | #endif | 88 | #endif |
| 89 | 89 | ||
| 90 | const char emacs_copyright[] = "Copyright (C) 2010 Free Software Foundation, Inc."; | ||
| 91 | const char emacs_version[] = "24.0.50"; | ||
| 92 | |||
| 90 | extern void malloc_warning P_ ((char *)); | 93 | extern void malloc_warning P_ ((char *)); |
| 91 | extern void set_time_zone_rule P_ ((char *)); | 94 | extern void set_time_zone_rule P_ ((char *)); |
| 92 | #ifdef HAVE_INDEX | 95 | #ifdef HAVE_INDEX |
| @@ -180,6 +183,10 @@ Lisp_Object Vprevious_system_messages_locale; | |||
| 180 | Lisp_Object Vsystem_time_locale; | 183 | Lisp_Object Vsystem_time_locale; |
| 181 | Lisp_Object Vprevious_system_time_locale; | 184 | Lisp_Object Vprevious_system_time_locale; |
| 182 | 185 | ||
| 186 | /* Copyright and version info. The version number may be updated by | ||
| 187 | Lisp code. */ | ||
| 188 | Lisp_Object Vemacs_copyright, Vemacs_version; | ||
| 189 | |||
| 183 | /* If non-zero, emacs should not attempt to use a window-specific code, | 190 | /* If non-zero, emacs should not attempt to use a window-specific code, |
| 184 | but instead should use the virtual terminal under which it was started. */ | 191 | but instead should use the virtual terminal under which it was started. */ |
| 185 | int inhibit_window_system; | 192 | int inhibit_window_system; |
| @@ -802,35 +809,43 @@ main (int argc, char **argv) | |||
| 802 | argc = 0; | 809 | argc = 0; |
| 803 | while (argv[argc]) argc++; | 810 | while (argv[argc]) argc++; |
| 804 | 811 | ||
| 805 | if (argmatch (argv, argc, "-version", "--version", 3, NULL, &skip_args) | 812 | if (argmatch (argv, argc, "-version", "--version", 3, NULL, &skip_args)) |
| 806 | /* We don't know the version number unless this is a dumped Emacs. | ||
| 807 | So ignore --version otherwise. */ | ||
| 808 | && initialized) | ||
| 809 | { | 813 | { |
| 810 | Lisp_Object tem, tem2; | 814 | const char *version, *copyright; |
| 811 | tem = Fsymbol_value (intern_c_string ("emacs-version")); | 815 | if (initialized) |
| 812 | tem2 = Fsymbol_value (intern_c_string ("emacs-copyright")); | ||
| 813 | if (!STRINGP (tem)) | ||
| 814 | { | ||
| 815 | fprintf (stderr, "Invalid value of `emacs-version'\n"); | ||
| 816 | exit (1); | ||
| 817 | } | ||
| 818 | if (!STRINGP (tem2)) | ||
| 819 | { | 816 | { |
| 820 | fprintf (stderr, "Invalid value of `emacs-copyright'\n"); | 817 | Lisp_Object tem, tem2; |
| 821 | exit (1); | 818 | tem = Fsymbol_value (intern_c_string ("emacs-version")); |
| 819 | tem2 = Fsymbol_value (intern_c_string ("emacs-copyright")); | ||
| 820 | if (!STRINGP (tem)) | ||
| 821 | { | ||
| 822 | fprintf (stderr, "Invalid value of `emacs-version'\n"); | ||
| 823 | exit (1); | ||
| 824 | } | ||
| 825 | if (!STRINGP (tem2)) | ||
| 826 | { | ||
| 827 | fprintf (stderr, "Invalid value of `emacs-copyright'\n"); | ||
| 828 | exit (1); | ||
| 829 | } | ||
| 830 | else | ||
| 831 | { | ||
| 832 | version = SDATA (tem); | ||
| 833 | copyright = SDATA (tem2); | ||
| 834 | } | ||
| 822 | } | 835 | } |
| 823 | else | 836 | else |
| 824 | { | 837 | { |
| 825 | printf ("GNU Emacs %s\n", SDATA (tem)); | 838 | version = emacs_version; |
| 826 | printf ("%s\n", SDATA(tem2)); | 839 | copyright = emacs_copyright; |
| 827 | printf ("GNU Emacs comes with ABSOLUTELY NO WARRANTY.\n"); | ||
| 828 | printf ("You may redistribute copies of Emacs\n"); | ||
| 829 | printf ("under the terms of the GNU General Public License.\n"); | ||
| 830 | printf ("For more information about these matters, "); | ||
| 831 | printf ("see the file named COPYING.\n"); | ||
| 832 | exit (0); | ||
| 833 | } | 840 | } |
| 841 | printf ("GNU Emacs %s\n", version); | ||
| 842 | printf ("%s\n", copyright); | ||
| 843 | printf ("GNU Emacs comes with ABSOLUTELY NO WARRANTY.\n"); | ||
| 844 | printf ("You may redistribute copies of Emacs\n"); | ||
| 845 | printf ("under the terms of the GNU General Public License.\n"); | ||
| 846 | printf ("For more information about these matters, "); | ||
| 847 | printf ("see the file named COPYING.\n"); | ||
| 848 | exit (0); | ||
| 834 | } | 849 | } |
| 835 | if (argmatch (argv, argc, "-chdir", "--chdir", 2, &ch_to_dir, &skip_args)) | 850 | if (argmatch (argv, argc, "-chdir", "--chdir", 2, &ch_to_dir, &skip_args)) |
| 836 | if (chdir (ch_to_dir) == -1) | 851 | if (chdir (ch_to_dir) == -1) |
| @@ -1528,6 +1543,11 @@ main (int argc, char **argv) | |||
| 1528 | ns_init_paths (); | 1543 | ns_init_paths (); |
| 1529 | #endif | 1544 | #endif |
| 1530 | 1545 | ||
| 1546 | /* Initialize and GC-protect Vinitial_environment and | ||
| 1547 | Vprocess_environment before set_initial_environment fills them | ||
| 1548 | in. */ | ||
| 1549 | if (!initialized) | ||
| 1550 | syms_of_callproc (); | ||
| 1531 | /* egetenv is a pretty low-level facility, which may get called in | 1551 | /* egetenv is a pretty low-level facility, which may get called in |
| 1532 | many circumstances; it seems flimsy to put off initializing it | 1552 | many circumstances; it seems flimsy to put off initializing it |
| 1533 | until calling init_callproc. */ | 1553 | until calling init_callproc. */ |
| @@ -1577,7 +1597,6 @@ main (int argc, char **argv) | |||
| 1577 | syms_of_callint (); | 1597 | syms_of_callint (); |
| 1578 | syms_of_casefiddle (); | 1598 | syms_of_casefiddle (); |
| 1579 | syms_of_casetab (); | 1599 | syms_of_casetab (); |
| 1580 | syms_of_callproc (); | ||
| 1581 | syms_of_category (); | 1600 | syms_of_category (); |
| 1582 | syms_of_ccl (); | 1601 | syms_of_ccl (); |
| 1583 | syms_of_character (); | 1602 | syms_of_character (); |
| @@ -2577,6 +2596,14 @@ This is nil during initialization. */); | |||
| 2577 | doc: /* If non-nil, X resources, Windows Registry settings, and NS defaults are not used. */); | 2596 | doc: /* If non-nil, X resources, Windows Registry settings, and NS defaults are not used. */); |
| 2578 | inhibit_x_resources = 0; | 2597 | inhibit_x_resources = 0; |
| 2579 | 2598 | ||
| 2599 | DEFVAR_LISP ("emacs-copyright", &Vemacs_copyright, | ||
| 2600 | doc: /* Short copyright string for this version of Emacs. */); | ||
| 2601 | Vemacs_copyright = build_string (emacs_copyright); | ||
| 2602 | |||
| 2603 | DEFVAR_LISP ("emacs-version", &Vemacs_version, | ||
| 2604 | doc: /* Version numbers of this version of Emacs. */); | ||
| 2605 | Vemacs_version = build_string (emacs_version); | ||
| 2606 | |||
| 2580 | /* Make sure IS_DAEMON starts up as false. */ | 2607 | /* Make sure IS_DAEMON starts up as false. */ |
| 2581 | daemon_pipe[1] = 0; | 2608 | daemon_pipe[1] = 0; |
| 2582 | } | 2609 | } |
diff --git a/src/eval.c b/src/eval.c index 2a0330acc38..199c4705736 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -3308,6 +3308,21 @@ grow_specpdl () | |||
| 3308 | specpdl_ptr = specpdl + count; | 3308 | specpdl_ptr = specpdl + count; |
| 3309 | } | 3309 | } |
| 3310 | 3310 | ||
| 3311 | /* specpdl_ptr->symbol is a field which describes which variable is | ||
| 3312 | let-bound, so it can be properly undone when we unbind_to. | ||
| 3313 | It can have the following two shapes: | ||
| 3314 | - SYMBOL : if it's a plain symbol, it means that we have let-bound | ||
| 3315 | a symbol that is not buffer-local (at least at the time | ||
| 3316 | the let binding started). Note also that it should not be | ||
| 3317 | aliased (i.e. when let-binding V1 that's aliased to V2, we want | ||
| 3318 | to record V2 here). | ||
| 3319 | - (SYMBOL WHERE . BUFFER) : this means that it is a let-binding for | ||
| 3320 | variable SYMBOL which can be buffer-local. WHERE tells us | ||
| 3321 | which buffer is affected (or nil if the let-binding affects the | ||
| 3322 | global value of the variable) and BUFFER tells us which buffer was | ||
| 3323 | current (i.e. if WHERE is non-nil, then BUFFER==WHERE, otherwise | ||
| 3324 | BUFFER did not yet have a buffer-local value). */ | ||
| 3325 | |||
| 3311 | void | 3326 | void |
| 3312 | specbind (symbol, value) | 3327 | specbind (symbol, value) |
| 3313 | Lisp_Object symbol, value; | 3328 | Lisp_Object symbol, value; |
| @@ -3339,7 +3354,10 @@ specbind (symbol, value) | |||
| 3339 | set_internal (symbol, value, Qnil, 1); | 3354 | set_internal (symbol, value, Qnil, 1); |
| 3340 | break; | 3355 | break; |
| 3341 | } | 3356 | } |
| 3342 | case SYMBOL_LOCALIZED: case SYMBOL_FORWARDED: | 3357 | case SYMBOL_LOCALIZED: |
| 3358 | if (SYMBOL_BLV (sym)->frame_local) | ||
| 3359 | error ("Frame-local vars cannot be let-bound"); | ||
| 3360 | case SYMBOL_FORWARDED: | ||
| 3343 | { | 3361 | { |
| 3344 | Lisp_Object ovalue = find_symbol_value (symbol); | 3362 | Lisp_Object ovalue = find_symbol_value (symbol); |
| 3345 | specpdl_ptr->func = 0; | 3363 | specpdl_ptr->func = 0; |
| @@ -3376,6 +3394,7 @@ specbind (symbol, value) | |||
| 3376 | /* FIXME: The third value `current_buffer' is only used in | 3394 | /* FIXME: The third value `current_buffer' is only used in |
| 3377 | let_shadows_buffer_binding_p which is itself only used | 3395 | let_shadows_buffer_binding_p which is itself only used |
| 3378 | in set_internal for local_if_set. */ | 3396 | in set_internal for local_if_set. */ |
| 3397 | eassert (NILP (where) || EQ (where, cur_buf)); | ||
| 3379 | specpdl_ptr->symbol = Fcons (symbol, Fcons (where, cur_buf)); | 3398 | specpdl_ptr->symbol = Fcons (symbol, Fcons (where, cur_buf)); |
| 3380 | 3399 | ||
| 3381 | /* If SYMBOL is a per-buffer variable which doesn't have a | 3400 | /* If SYMBOL is a per-buffer variable which doesn't have a |
| @@ -3460,13 +3479,10 @@ unbind_to (count, value) | |||
| 3460 | Fset_default (symbol, this_binding.old_value); | 3479 | Fset_default (symbol, this_binding.old_value); |
| 3461 | /* If `where' is non-nil, reset the value in the appropriate | 3480 | /* If `where' is non-nil, reset the value in the appropriate |
| 3462 | local binding, but only if that binding still exists. */ | 3481 | local binding, but only if that binding still exists. */ |
| 3463 | else if (BUFFERP (where)) | 3482 | else if (BUFFERP (where) |
| 3464 | { | 3483 | ? !NILP (Flocal_variable_p (symbol, where)) |
| 3465 | if (BUFFERP (where) | 3484 | : !NILP (Fassq (symbol, XFRAME (where)->param_alist))) |
| 3466 | ? !NILP (Flocal_variable_p (symbol, where)) | 3485 | set_internal (symbol, this_binding.old_value, where, 1); |
| 3467 | : !NILP (Fassq (symbol, XFRAME (where)->param_alist))) | ||
| 3468 | set_internal (symbol, this_binding.old_value, where, 1); | ||
| 3469 | } | ||
| 3470 | } | 3486 | } |
| 3471 | /* If variable has a trivial value (no forwarding), we can | 3487 | /* If variable has a trivial value (no forwarding), we can |
| 3472 | just set it. No need to check for constant symbols here, | 3488 | just set it. No need to check for constant symbols here, |
diff --git a/src/lisp.h b/src/lisp.h index 7d329cc754c..b4ff446b064 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -310,11 +310,10 @@ LISP_MAKE_RVALUE (Lisp_Object o) | |||
| 310 | return o; | 310 | return o; |
| 311 | } | 311 | } |
| 312 | #else | 312 | #else |
| 313 | /* This isn't quite right - it keeps the argument as an lvalue. | 313 | /* This is more portable to pre-C99 non-GCC compilers, but for |
| 314 | Making it const via casting would help avoid code actually | 314 | backwards compatibility GCC still accepts an old GNU extension |
| 315 | modifying the location in question, but the casting could cover | 315 | which caused this to only generate a warning. */ |
| 316 | other type-related bugs. */ | 316 | #define LISP_MAKE_RVALUE(o) (0 ? (o) : (o)) |
| 317 | #define LISP_MAKE_RVALUE(o) (o) | ||
| 318 | #endif | 317 | #endif |
| 319 | 318 | ||
| 320 | #else /* USE_LISP_UNION_TYPE */ | 319 | #else /* USE_LISP_UNION_TYPE */ |
| @@ -1461,9 +1460,9 @@ struct Lisp_Float | |||
| 1461 | }; | 1460 | }; |
| 1462 | 1461 | ||
| 1463 | #ifdef HIDE_LISP_IMPLEMENTATION | 1462 | #ifdef HIDE_LISP_IMPLEMENTATION |
| 1464 | #define XFLOAT_DATA(f) (XFLOAT (f)->u.data_ + 0) | 1463 | #define XFLOAT_DATA(f) (0 ? XFLOAT (f)->u.data_ : XFLOAT (f)->u.data_) |
| 1465 | #else | 1464 | #else |
| 1466 | #define XFLOAT_DATA(f) (XFLOAT (f)->u.data + 0) | 1465 | #define XFLOAT_DATA(f) (0 ? XFLOAT (f)->u.data : XFLOAT (f)->u.data) |
| 1467 | /* This should be used only in alloc.c, which always disables | 1466 | /* This should be used only in alloc.c, which always disables |
| 1468 | HIDE_LISP_IMPLEMENTATION. */ | 1467 | HIDE_LISP_IMPLEMENTATION. */ |
| 1469 | #define XFLOAT_INIT(f,n) (XFLOAT (f)->u.data = (n)) | 1468 | #define XFLOAT_INIT(f,n) (XFLOAT (f)->u.data = (n)) |
diff --git a/src/m/ia64.h b/src/m/ia64.h index acf6c25844f..03ec37b4269 100644 --- a/src/m/ia64.h +++ b/src/m/ia64.h | |||
| @@ -48,11 +48,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 48 | /* Convert that into an integer that is 100 for a load average of 1.0 */ | 48 | /* Convert that into an integer that is 100 for a load average of 1.0 */ |
| 49 | #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE) | 49 | #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE) |
| 50 | 50 | ||
| 51 | #ifdef __ELF__ | ||
| 52 | #undef UNEXEC | ||
| 53 | #define UNEXEC unexelf.o | ||
| 54 | #endif | ||
| 55 | |||
| 56 | #ifndef NOT_C_CODE | 51 | #ifndef NOT_C_CODE |
| 57 | 52 | ||
| 58 | #ifdef REL_ALLOC | 53 | #ifdef REL_ALLOC |
diff --git a/src/m/template.h b/src/m/template.h index 9b8d2d63055..2807cd913ec 100644 --- a/src/m/template.h +++ b/src/m/template.h | |||
| @@ -69,11 +69,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 69 | reasonable place to select for it is in the machine description file. */ | 69 | reasonable place to select for it is in the machine description file. */ |
| 70 | #define NO_SOCK_SIGIO | 70 | #define NO_SOCK_SIGIO |
| 71 | 71 | ||
| 72 | /* After adding support for a new system, modify the large case | 72 | /* After adding support for a new machine, modify the large case |
| 73 | statement in the `configure' script to recognize reasonable | 73 | statement in configure.in to recognize reasonable |
| 74 | configuration names, and add a description of the system to | 74 | configuration names, and add a description of the system to |
| 75 | `etc/MACHINES'. | 75 | `etc/MACHINES'. |
| 76 | 76 | ||
| 77 | Check for any tests of $machine in configure.in, and add an entry | ||
| 78 | for the new machine if needed. | ||
| 79 | |||
| 77 | If you've just fixed a problem in an existing configuration file, | 80 | If you've just fixed a problem in an existing configuration file, |
| 78 | you should also check `etc/MACHINES' to make sure its descriptions | 81 | you should also check `etc/MACHINES' to make sure its descriptions |
| 79 | of known problems in that configuration should be updated. */ | 82 | of known problems in that configuration should be updated. */ |
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h index 3aa2dc16f42..674f00f1d09 100644 --- a/src/s/gnu-linux.h +++ b/src/s/gnu-linux.h | |||
| @@ -97,7 +97,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 97 | /* This is used in list_system_processes. */ | 97 | /* This is used in list_system_processes. */ |
| 98 | #define HAVE_PROCFS 1 | 98 | #define HAVE_PROCFS 1 |
| 99 | 99 | ||
| 100 | |||
| 101 | /* Define CLASH_DETECTION if you want lock files to be written | 100 | /* Define CLASH_DETECTION if you want lock files to be written |
| 102 | so that Emacs can tell instantly when you try to modify | 101 | so that Emacs can tell instantly when you try to modify |
| 103 | a file that someone else has modified in his Emacs. */ | 102 | a file that someone else has modified in his Emacs. */ |
| @@ -126,11 +125,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 126 | #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ | 125 | #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ |
| 127 | ((FILE)->_pptr - (FILE)->_pbase) | 126 | ((FILE)->_pptr - (FILE)->_pbase) |
| 128 | #endif /* !_IO_STDIO_H && ! __UCLIBC__ */ | 127 | #endif /* !_IO_STDIO_H && ! __UCLIBC__ */ |
| 129 | #endif /* emacs */ | ||
| 130 | 128 | ||
| 131 | #ifdef emacs | ||
| 132 | #define INTERRUPT_INPUT | 129 | #define INTERRUPT_INPUT |
| 133 | #endif | 130 | #endif /* emacs */ |
| 134 | 131 | ||
| 135 | #define SYSV_SYSTEM_DIR /* use dirent.h */ | 132 | #define SYSV_SYSTEM_DIR /* use dirent.h */ |
| 136 | 133 | ||
| @@ -147,11 +144,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 147 | 144 | ||
| 148 | #define NARROWPROTO 1 | 145 | #define NARROWPROTO 1 |
| 149 | 146 | ||
| 150 | /* Use mmap directly for allocating larger buffers. */ | ||
| 151 | #ifdef DOUG_LEA_MALLOC | ||
| 152 | #undef REL_ALLOC | ||
| 153 | #endif | ||
| 154 | |||
| 155 | /* Tell that garbage collector that setjmp is known to save all | 147 | /* Tell that garbage collector that setjmp is known to save all |
| 156 | registers relevant for conservative garbage collection in the jmp_buf. */ | 148 | registers relevant for conservative garbage collection in the jmp_buf. */ |
| 157 | /* Not all the architectures are tested, but there are Debian packages | 149 | /* Not all the architectures are tested, but there are Debian packages |
diff --git a/src/s/gnu.h b/src/s/gnu.h index 9f6fe52a5de..cb4c4a9d807 100644 --- a/src/s/gnu.h +++ b/src/s/gnu.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | /* Definitions file for GNU Emacs running on the GNU Hurd. | 1 | /* Definitions file for GNU Emacs running on the GNU Hurd. |
| 2 | Copyright (C) 1994, 1995, 1996, 2001, 2002, 2003, 2004, 2005, 2006, | 2 | |
| 3 | 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 3 | Copyright (C) 1994, 1995, 1996, 2001, 2002, 2003, 2004, 2005, 2006, 2007, |
| 4 | 2008, 2009, 2010 Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 6 | 7 | ||
| @@ -28,11 +29,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 28 | 29 | ||
| 29 | #define SIGNALS_VIA_CHARACTERS | 30 | #define SIGNALS_VIA_CHARACTERS |
| 30 | 31 | ||
| 31 | /* Use mmap directly for allocating larger buffers. */ | ||
| 32 | #ifdef DOUG_LEA_MALLOC | ||
| 33 | #undef REL_ALLOC | ||
| 34 | #endif | ||
| 35 | |||
| 36 | /* GNU needs its own crt0, and libc defines data_start. */ | 32 | /* GNU needs its own crt0, and libc defines data_start. */ |
| 37 | #define ORDINARY_LINK | 33 | #define ORDINARY_LINK |
| 38 | #define DATA_START ({ extern int data_start; (char *) &data_start; }) | 34 | #define DATA_START ({ extern int data_start; (char *) &data_start; }) |
diff --git a/src/s/template.h b/src/s/template.h index 16df03092d2..f355d67b8c6 100644 --- a/src/s/template.h +++ b/src/s/template.h | |||
| @@ -133,10 +133,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 133 | /* ============================================================ */ | 133 | /* ============================================================ */ |
| 134 | 134 | ||
| 135 | /* After adding support for a new system, modify the large case | 135 | /* After adding support for a new system, modify the large case |
| 136 | statement in the `configure' script to recognize reasonable | 136 | statement in configure.in to recognize reasonable |
| 137 | configuration names, and add a description of the system to | 137 | configuration names, and add a description of the system to |
| 138 | `etc/MACHINES'. | 138 | `etc/MACHINES'. |
| 139 | 139 | ||
| 140 | Check for any tests of $opsys in configure.in, and add an entry | ||
| 141 | for the new system if needed. | ||
| 142 | |||
| 140 | If you've just fixed a problem in an existing configuration file, | 143 | If you've just fixed a problem in an existing configuration file, |
| 141 | you should also check `etc/MACHINES' to make sure its descriptions | 144 | you should also check `etc/MACHINES' to make sure its descriptions |
| 142 | of known problems in that configuration should be updated. */ | 145 | of known problems in that configuration should be updated. */ |
diff --git a/src/xdisp.c b/src/xdisp.c index 16936b977fd..6b3097c9a1a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -184,7 +184,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 184 | reordering engine which is called by set_iterator_to_next and | 184 | reordering engine which is called by set_iterator_to_next and |
| 185 | returns the next character to display in the visual order. See | 185 | returns the next character to display in the visual order. See |
| 186 | commentary on bidi.c for more details. As far as redisplay is | 186 | commentary on bidi.c for more details. As far as redisplay is |
| 187 | concerned, the effect of calling bidi_get_next_char_visually, the | 187 | concerned, the effect of calling bidi_move_to_visually_next, the |
| 188 | main interface of the reordering engine, is that the iterator gets | 188 | main interface of the reordering engine, is that the iterator gets |
| 189 | magically placed on the buffer or string position that is to be | 189 | magically placed on the buffer or string position that is to be |
| 190 | displayed next. In other words, a linear iteration through the | 190 | displayed next. In other words, a linear iteration through the |
| @@ -3918,7 +3918,7 @@ handle_invisible_prop (it) | |||
| 3918 | } | 3918 | } |
| 3919 | do | 3919 | do |
| 3920 | { | 3920 | { |
| 3921 | bidi_get_next_char_visually (&it->bidi_it); | 3921 | bidi_move_to_visually_next (&it->bidi_it); |
| 3922 | } | 3922 | } |
| 3923 | while (it->stop_charpos <= it->bidi_it.charpos | 3923 | while (it->stop_charpos <= it->bidi_it.charpos |
| 3924 | && it->bidi_it.charpos < newpos); | 3924 | && it->bidi_it.charpos < newpos); |
| @@ -5276,7 +5276,7 @@ iterate_out_of_display_property (it) | |||
| 5276 | while (it->bidi_it.charpos >= BEGV | 5276 | while (it->bidi_it.charpos >= BEGV |
| 5277 | && it->prev_stop <= it->bidi_it.charpos | 5277 | && it->prev_stop <= it->bidi_it.charpos |
| 5278 | && it->bidi_it.charpos < CHARPOS (it->position)) | 5278 | && it->bidi_it.charpos < CHARPOS (it->position)) |
| 5279 | bidi_get_next_char_visually (&it->bidi_it); | 5279 | bidi_move_to_visually_next (&it->bidi_it); |
| 5280 | /* Record the stop_pos we just crossed, for when we cross it | 5280 | /* Record the stop_pos we just crossed, for when we cross it |
| 5281 | back, maybe. */ | 5281 | back, maybe. */ |
| 5282 | if (it->bidi_it.charpos > CHARPOS (it->position)) | 5282 | if (it->bidi_it.charpos > CHARPOS (it->position)) |
| @@ -6307,29 +6307,14 @@ set_iterator_to_next (it, reseat_p) | |||
| 6307 | else if (! it->cmp_it.reversed_p) | 6307 | else if (! it->cmp_it.reversed_p) |
| 6308 | { | 6308 | { |
| 6309 | /* Composition created while scanning forward. */ | 6309 | /* Composition created while scanning forward. */ |
| 6310 | /* Update IT's char/byte positions to point the first | 6310 | /* Update IT's char/byte positions to point to the first |
| 6311 | character of the next grapheme cluster, or to the | 6311 | character of the next grapheme cluster, or to the |
| 6312 | character visually after the current composition. */ | 6312 | character visually after the current composition. */ |
| 6313 | #if 0 | ||
| 6314 | /* Is it ok to do this directly? */ | ||
| 6315 | IT_CHARPOS (*it) += it->cmp_it.nchars; | ||
| 6316 | IT_BYTEPOS (*it) += it->cmp_it.nbytes; | ||
| 6317 | #else | ||
| 6318 | /* Or do we have to call bidi_get_next_char_visually | ||
| 6319 | repeatedly (perhaps not to confuse some internal | ||
| 6320 | state of bidi_it)? At least we must do this if we | ||
| 6321 | have consumed all grapheme clusters in the current | ||
| 6322 | composition because the next character will be in the | ||
| 6323 | different bidi level. */ | ||
| 6324 | for (i = 0; i < it->cmp_it.nchars; i++) | 6313 | for (i = 0; i < it->cmp_it.nchars; i++) |
| 6325 | bidi_get_next_char_visually (&it->bidi_it); | 6314 | bidi_move_to_visually_next (&it->bidi_it); |
| 6326 | /* BTW, it seems that the name | ||
| 6327 | bidi_get_next_char_visually is confusing because | ||
| 6328 | it sounds like not advancing character position. | ||
| 6329 | How about bidi_set_iterator_to_next? */ | ||
| 6330 | IT_BYTEPOS (*it) = it->bidi_it.bytepos; | 6315 | IT_BYTEPOS (*it) = it->bidi_it.bytepos; |
| 6331 | IT_CHARPOS (*it) = it->bidi_it.charpos; | 6316 | IT_CHARPOS (*it) = it->bidi_it.charpos; |
| 6332 | #endif | 6317 | |
| 6333 | if (it->cmp_it.to < it->cmp_it.nglyphs) | 6318 | if (it->cmp_it.to < it->cmp_it.nglyphs) |
| 6334 | { | 6319 | { |
| 6335 | /* Proceed to the next grapheme cluster. */ | 6320 | /* Proceed to the next grapheme cluster. */ |
| @@ -6337,7 +6322,7 @@ set_iterator_to_next (it, reseat_p) | |||
| 6337 | } | 6322 | } |
| 6338 | else | 6323 | else |
| 6339 | { | 6324 | { |
| 6340 | /* No more grapheme cluster in this composition. | 6325 | /* No more grapheme clusters in this composition. |
| 6341 | Find the next stop position. */ | 6326 | Find the next stop position. */ |
| 6342 | EMACS_INT stop = it->stop_charpos; | 6327 | EMACS_INT stop = it->stop_charpos; |
| 6343 | if (it->bidi_it.scan_dir < 0) | 6328 | if (it->bidi_it.scan_dir < 0) |
| @@ -6351,10 +6336,10 @@ set_iterator_to_next (it, reseat_p) | |||
| 6351 | else | 6336 | else |
| 6352 | { | 6337 | { |
| 6353 | /* Composition created while scanning backward. */ | 6338 | /* Composition created while scanning backward. */ |
| 6354 | /* Update IT's char/byte positions to point the last | 6339 | /* Update IT's char/byte positions to point to the last |
| 6355 | character of the previous grapheme cluster, or the | 6340 | character of the previous grapheme cluster, or the |
| 6356 | character visually after the current composition. */ | 6341 | character visually after the current composition. */ |
| 6357 | bidi_get_next_char_visually (&it->bidi_it); | 6342 | bidi_move_to_visually_next (&it->bidi_it); |
| 6358 | IT_BYTEPOS (*it) = it->bidi_it.bytepos; | 6343 | IT_BYTEPOS (*it) = it->bidi_it.bytepos; |
| 6359 | IT_CHARPOS (*it) = it->bidi_it.charpos; | 6344 | IT_CHARPOS (*it) = it->bidi_it.charpos; |
| 6360 | 6345 | ||
| @@ -6365,7 +6350,7 @@ set_iterator_to_next (it, reseat_p) | |||
| 6365 | } | 6350 | } |
| 6366 | else | 6351 | else |
| 6367 | { | 6352 | { |
| 6368 | /* No more grapheme cluster in this composition. | 6353 | /* No more grapheme clusters in this composition. |
| 6369 | Find the next stop position. */ | 6354 | Find the next stop position. */ |
| 6370 | EMACS_INT stop = it->stop_charpos; | 6355 | EMACS_INT stop = it->stop_charpos; |
| 6371 | if (it->bidi_it.scan_dir < 0) | 6356 | if (it->bidi_it.scan_dir < 0) |
| @@ -6393,13 +6378,13 @@ set_iterator_to_next (it, reseat_p) | |||
| 6393 | direction (a.k.a. its base embedding level). */ | 6378 | direction (a.k.a. its base embedding level). */ |
| 6394 | if (it->bidi_it.new_paragraph) | 6379 | if (it->bidi_it.new_paragraph) |
| 6395 | bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it); | 6380 | bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it); |
| 6396 | bidi_get_next_char_visually (&it->bidi_it); | 6381 | bidi_move_to_visually_next (&it->bidi_it); |
| 6397 | IT_BYTEPOS (*it) = it->bidi_it.bytepos; | 6382 | IT_BYTEPOS (*it) = it->bidi_it.bytepos; |
| 6398 | IT_CHARPOS (*it) = it->bidi_it.charpos; | 6383 | IT_CHARPOS (*it) = it->bidi_it.charpos; |
| 6399 | if (prev_scan_dir != it->bidi_it.scan_dir) | 6384 | if (prev_scan_dir != it->bidi_it.scan_dir) |
| 6400 | { | 6385 | { |
| 6401 | /* As scan direction was changed, we must re-compute | 6386 | /* As the scan direction was changed, we must |
| 6402 | the stop position for composition. */ | 6387 | re-compute the stop position for composition. */ |
| 6403 | EMACS_INT stop = it->stop_charpos; | 6388 | EMACS_INT stop = it->stop_charpos; |
| 6404 | if (it->bidi_it.scan_dir < 0) | 6389 | if (it->bidi_it.scan_dir < 0) |
| 6405 | stop = -1; | 6390 | stop = -1; |
| @@ -6873,7 +6858,7 @@ next_element_from_buffer (it) | |||
| 6873 | /* If we are at the beginning of a line, we can produce the | 6858 | /* If we are at the beginning of a line, we can produce the |
| 6874 | next element right away. */ | 6859 | next element right away. */ |
| 6875 | bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it); | 6860 | bidi_paragraph_init (it->paragraph_embedding, &it->bidi_it); |
| 6876 | bidi_get_next_char_visually (&it->bidi_it); | 6861 | bidi_move_to_visually_next (&it->bidi_it); |
| 6877 | } | 6862 | } |
| 6878 | else | 6863 | else |
| 6879 | { | 6864 | { |
| @@ -6891,7 +6876,7 @@ next_element_from_buffer (it) | |||
| 6891 | { | 6876 | { |
| 6892 | /* Now return to buffer position where we were asked to | 6877 | /* Now return to buffer position where we were asked to |
| 6893 | get the next display element, and produce that. */ | 6878 | get the next display element, and produce that. */ |
| 6894 | bidi_get_next_char_visually (&it->bidi_it); | 6879 | bidi_move_to_visually_next (&it->bidi_it); |
| 6895 | } | 6880 | } |
| 6896 | while (it->bidi_it.bytepos != orig_bytepos | 6881 | while (it->bidi_it.bytepos != orig_bytepos |
| 6897 | && it->bidi_it.bytepos < ZV_BYTE); | 6882 | && it->bidi_it.bytepos < ZV_BYTE); |
| @@ -7115,7 +7100,7 @@ next_element_from_composition (it) | |||
| 7115 | /* Resync the bidi iterator with IT's new position. | 7100 | /* Resync the bidi iterator with IT's new position. |
| 7116 | FIXME: this doesn't support bidirectional text. */ | 7101 | FIXME: this doesn't support bidirectional text. */ |
| 7117 | while (it->bidi_it.charpos < IT_CHARPOS (*it)) | 7102 | while (it->bidi_it.charpos < IT_CHARPOS (*it)) |
| 7118 | bidi_get_next_char_visually (&it->bidi_it); | 7103 | bidi_move_to_visually_next (&it->bidi_it); |
| 7119 | } | 7104 | } |
| 7120 | return 0; | 7105 | return 0; |
| 7121 | } | 7106 | } |
| @@ -7131,7 +7116,7 @@ next_element_from_composition (it) | |||
| 7131 | correct (struct glyph)->charpos. */ | 7116 | correct (struct glyph)->charpos. */ |
| 7132 | int i; | 7117 | int i; |
| 7133 | for (i = 0; i < it->cmp_it.nchars - 1; i++) | 7118 | for (i = 0; i < it->cmp_it.nchars - 1; i++) |
| 7134 | bidi_get_next_char_visually (&it->bidi_it); | 7119 | bidi_move_to_visually_next (&it->bidi_it); |
| 7135 | IT_CHARPOS (*it) = it->bidi_it.charpos; | 7120 | IT_CHARPOS (*it) = it->bidi_it.charpos; |
| 7136 | IT_BYTEPOS (*it) = it->bidi_it.bytepos; | 7121 | IT_BYTEPOS (*it) = it->bidi_it.bytepos; |
| 7137 | it->position = it->current.pos; | 7122 | it->position = it->current.pos; |
| @@ -18256,6 +18241,84 @@ display_line (it) | |||
| 18256 | return row->displays_text_p; | 18241 | return row->displays_text_p; |
| 18257 | } | 18242 | } |
| 18258 | 18243 | ||
| 18244 | DEFUN ("current-bidi-paragraph-direction", Fcurrent_bidi_paragraph_direction, | ||
| 18245 | Scurrent_bidi_paragraph_direction, 0, 1, 0, | ||
| 18246 | doc: /* Return paragraph direction at point in BUFFER. | ||
| 18247 | Value is either `left-to-right' or `right-to-left'. | ||
| 18248 | If BUFFER is omitted or nil, it defaults to the current buffer. | ||
| 18249 | |||
| 18250 | Paragraph direction determines how the text in the paragraph is displayed. | ||
| 18251 | In left-to-right paragraphs, text begins at the left margin of the window | ||
| 18252 | and the reading direction is generally left to right. In right-to-left | ||
| 18253 | paragraphs, text begins at the right margin and is read from right to left. | ||
| 18254 | |||
| 18255 | See also `bidi-paragraph-direction'. */) | ||
| 18256 | (buffer) | ||
| 18257 | Lisp_Object buffer; | ||
| 18258 | { | ||
| 18259 | struct buffer *buf; | ||
| 18260 | struct buffer *old; | ||
| 18261 | |||
| 18262 | if (NILP (buffer)) | ||
| 18263 | buf = current_buffer; | ||
| 18264 | else | ||
| 18265 | { | ||
| 18266 | CHECK_BUFFER (buffer); | ||
| 18267 | buf = XBUFFER (buffer); | ||
| 18268 | old = current_buffer; | ||
| 18269 | } | ||
| 18270 | |||
| 18271 | if (NILP (buf->bidi_display_reordering)) | ||
| 18272 | return Qleft_to_right; | ||
| 18273 | else if (!NILP (buf->bidi_paragraph_direction)) | ||
| 18274 | return buf->bidi_paragraph_direction; | ||
| 18275 | else | ||
| 18276 | { | ||
| 18277 | /* Determine the direction from buffer text. We could try to | ||
| 18278 | use current_matrix if it is up to date, but this seems fast | ||
| 18279 | enough as it is. */ | ||
| 18280 | struct bidi_it itb; | ||
| 18281 | EMACS_INT pos = BUF_PT (buf); | ||
| 18282 | EMACS_INT bytepos = BUF_PT_BYTE (buf); | ||
| 18283 | |||
| 18284 | if (buf != current_buffer) | ||
| 18285 | set_buffer_temp (buf); | ||
| 18286 | /* Find previous non-empty line. */ | ||
| 18287 | if (pos >= ZV && pos > BEGV) | ||
| 18288 | { | ||
| 18289 | pos--; | ||
| 18290 | bytepos = CHAR_TO_BYTE (pos); | ||
| 18291 | } | ||
| 18292 | while (FETCH_BYTE (bytepos) == '\n') | ||
| 18293 | { | ||
| 18294 | if (bytepos <= BEGV_BYTE) | ||
| 18295 | break; | ||
| 18296 | bytepos--; | ||
| 18297 | pos--; | ||
| 18298 | } | ||
| 18299 | while (!CHAR_HEAD_P (FETCH_BYTE (bytepos))) | ||
| 18300 | bytepos--; | ||
| 18301 | itb.charpos = pos; | ||
| 18302 | itb.bytepos = bytepos; | ||
| 18303 | itb.first_elt = 1; | ||
| 18304 | |||
| 18305 | bidi_paragraph_init (NEUTRAL_DIR, &itb); | ||
| 18306 | if (buf != current_buffer) | ||
| 18307 | set_buffer_temp (old); | ||
| 18308 | switch (itb.paragraph_dir) | ||
| 18309 | { | ||
| 18310 | case L2R: | ||
| 18311 | return Qleft_to_right; | ||
| 18312 | break; | ||
| 18313 | case R2L: | ||
| 18314 | return Qright_to_left; | ||
| 18315 | break; | ||
| 18316 | default: | ||
| 18317 | abort (); | ||
| 18318 | } | ||
| 18319 | } | ||
| 18320 | } | ||
| 18321 | |||
| 18259 | 18322 | ||
| 18260 | 18323 | ||
| 18261 | /*********************************************************************** | 18324 | /*********************************************************************** |
| @@ -25955,6 +26018,7 @@ syms_of_xdisp () | |||
| 25955 | #endif | 26018 | #endif |
| 25956 | defsubr (&Sformat_mode_line); | 26019 | defsubr (&Sformat_mode_line); |
| 25957 | defsubr (&Sinvisible_p); | 26020 | defsubr (&Sinvisible_p); |
| 26021 | defsubr (&Scurrent_bidi_paragraph_direction); | ||
| 25958 | 26022 | ||
| 25959 | staticpro (&Qmenu_bar_update_hook); | 26023 | staticpro (&Qmenu_bar_update_hook); |
| 25960 | Qmenu_bar_update_hook = intern_c_string ("menu-bar-update-hook"); | 26024 | Qmenu_bar_update_hook = intern_c_string ("menu-bar-update-hook"); |