diff options
| author | Jim Blandy | 1992-01-31 20:02:34 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-01-31 20:02:34 +0000 |
| commit | f8026fd8345805bd465abea83b0aa1b982c4a18c (patch) | |
| tree | 0dd85b65421572d5550e5b5fac808b06fdc24eed | |
| parent | 4915b8d61b4ecc41c444cc200e7ff2bd437dc791 (diff) | |
| download | emacs-f8026fd8345805bd465abea83b0aa1b982c4a18c.tar.gz emacs-f8026fd8345805bd465abea83b0aa1b982c4a18c.zip | |
*** empty log message ***
| -rw-r--r-- | Makefile.in | 13 | ||||
| -rwxr-xr-x | build-ins.in | 41 | ||||
| -rw-r--r-- | src/window.c | 49 |
3 files changed, 52 insertions, 51 deletions
diff --git a/Makefile.in b/Makefile.in index bc5415614ad..ec62fa31aa3 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -23,7 +23,7 @@ SHELL = /bin/sh | |||
| 23 | # already, the `install' targets will move or copy it there. The | 23 | # already, the `install' targets will move or copy it there. The |
| 24 | # default definitions for the variables below are expressed in terms | 24 | # default definitions for the variables below are expressed in terms |
| 25 | # of this one, so you may not need to change them. | 25 | # of this one, so you may not need to change them. |
| 26 | LIBROOT=/u/emacs | 26 | LIBROOT=/u/src/emacs/19.0 |
| 27 | 27 | ||
| 28 | # This is where the `install' make target should place the binaries | 28 | # This is where the `install' make target should place the binaries |
| 29 | # people will want to run directly (like etags and Emacs itself). | 29 | # people will want to run directly (like etags and Emacs itself). |
| @@ -34,19 +34,19 @@ INSTALLBIN=/usr/local/bin | |||
| 34 | # elisp files should go under DATADIR (below), since both elisp source | 34 | # elisp files should go under DATADIR (below), since both elisp source |
| 35 | # and compiled elisp are completely portable, but it's traditional to | 35 | # and compiled elisp are completely portable, but it's traditional to |
| 36 | # give the lisp files their own subdirectory. | 36 | # give the lisp files their own subdirectory. |
| 37 | LISPPATH=/u/emacs/lisp | 37 | LISPPATH=/u/src/emacs/19.0/lisp |
| 38 | 38 | ||
| 39 | # Emacs will look here for its architecture-independent files (like | 39 | # Emacs will look here for its architecture-independent files (like |
| 40 | # the tutorial and the zippy database). | 40 | # the tutorial and the zippy database). |
| 41 | DATADIR=/u/emacs/share-lib | 41 | DATADIR=/u/src/emacs/19.0/share-lib |
| 42 | 42 | ||
| 43 | # Emacs will look here for its architecture-dependent files, like | 43 | # Emacs will look here for its architecture-dependent files, like |
| 44 | # executables for its utilities. | 44 | # executables for its utilities. |
| 45 | LIBDIR=/u/emacs/arch-lib | 45 | LIBDIR=/u/src/emacs/19.0/arch-lib |
| 46 | 46 | ||
| 47 | # The locking directory, where the Emacs locking code keeps track of | 47 | # The locking directory, where the Emacs locking code keeps track of |
| 48 | # which files are currently being edited. | 48 | # which files are currently being edited. |
| 49 | LOCKDIR=/u/emacs/lock | 49 | LOCKDIR=/u/src/emacs/19.0/lock |
| 50 | 50 | ||
| 51 | # This is where the `install' make target should place the man pages | 51 | # This is where the `install' make target should place the man pages |
| 52 | # for the binaries it installs. | 52 | # for the binaries it installs. |
| @@ -72,7 +72,6 @@ all: src/paths.h ${SUBDIR} | |||
| 72 | 72 | ||
| 73 | src/paths.h: Makefile src/paths.h-dist | 73 | src/paths.h: Makefile src/paths.h-dist |
| 74 | /bin/sed < src/paths.h-dist > src/paths.h \ | 74 | /bin/sed < src/paths.h-dist > src/paths.h \ |
| 75 | -e 's;/usr/local/lib/emacs;${LIBROOT};g' \ | ||
| 76 | -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "$(LISPPATH)";' \ | 75 | -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "$(LISPPATH)";' \ |
| 77 | -e 's;\(#.*PATH_EXEC\).*$$;\1 "$(LIBDIR)";' \ | 76 | -e 's;\(#.*PATH_EXEC\).*$$;\1 "$(LIBDIR)";' \ |
| 78 | -e 's;\(#.*PATH_DATA\).*$$;\1 "$(DATADIR)";' \ | 77 | -e 's;\(#.*PATH_DATA\).*$$;\1 "$(DATADIR)";' \ |
| @@ -87,7 +86,7 @@ ${SUBDIR}: FRC | |||
| 87 | 86 | ||
| 88 | install: all mkdir lockdir | 87 | install: all mkdir lockdir |
| 89 | -if [ `/bin/pwd` != `(cd ${LIBROOT}; /bin/pwd)` ] ; then \ | 88 | -if [ `/bin/pwd` != `(cd ${LIBROOT}; /bin/pwd)` ] ; then \ |
| 90 | tar cf - ${COPYDIR} | (cd ${LIBROOT}; umask 0; tar xBf - ) ;\ | 89 | tar cf - ${COPYDIR} | (cd ${LIBROOT}; umask 0; tar xf - ) ;\ |
| 91 | for i in ${CLEANDIR}; do \ | 90 | for i in ${CLEANDIR}; do \ |
| 92 | (rm -rf ${LIBROOT}/$$i/RCS; \ | 91 | (rm -rf ${LIBROOT}/$$i/RCS; \ |
| 93 | rm -f ${LIBROOT}/$$i/\#*; \ | 92 | rm -f ${LIBROOT}/$$i/\#*; \ |
diff --git a/build-ins.in b/build-ins.in index fe09dabd0be..f2a952b6a0b 100755 --- a/build-ins.in +++ b/build-ins.in | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/bin/csh -fx | 1 | #!/bin/sh -x |
| 2 | # | 2 | # |
| 3 | #Shell script for building and installing Emacs. | 3 | #Shell script for building and installing Emacs. |
| 4 | 4 | ||
| @@ -7,58 +7,55 @@ | |||
| 7 | # libaries. The default definitions for the variables below are | 7 | # libaries. The default definitions for the variables below are |
| 8 | # expressed in terms of this one, so you may not need to change them. | 8 | # expressed in terms of this one, so you may not need to change them. |
| 9 | # set LIBROOT=/usr/local/lib/emacs-19.0 | 9 | # set LIBROOT=/usr/local/lib/emacs-19.0 |
| 10 | set LIBROOT=/u/emacs | 10 | LIBROOT=/u/src/emacs/19.0 |
| 11 | 11 | ||
| 12 | # Emacs will search this path to find its elisp files. This should be | 12 | # Emacs will search this path to find its elisp files. This should be |
| 13 | # a colon-separated list of directories. Strictly speaking, all the | 13 | # a colon-separated list of directories. Strictly speaking, all the |
| 14 | # elisp files should go under DATADIR (below), since both elisp source | 14 | # elisp files should go under DATADIR (below), since both elisp source |
| 15 | # and compiled elisp are completely portable, but it's traditional to | 15 | # and compiled elisp are completely portable, but it's traditional to |
| 16 | # give the lisp files their own subdirectory. | 16 | # give the lisp files their own subdirectory. |
| 17 | set LISPPATH=/u/emacs/lisp | 17 | LISPPATH=/u/src/emacs/19.0/lisp |
| 18 | 18 | ||
| 19 | # Emacs will look here for its architecture-independent files (like | 19 | # Emacs will look here for its architecture-independent files (like |
| 20 | # the tutorial and the zippy database). | 20 | # the tutorial and the zippy database). |
| 21 | set DATADIR=/u/emacs/share-lib | 21 | DATADIR=/u/src/emacs/19.0/share-lib |
| 22 | 22 | ||
| 23 | # Emacs will look here for its architecture-dependent files, like | 23 | # Emacs will look here for its architecture-dependent files, like |
| 24 | # executables for its utilities. | 24 | # executables for its utilities. |
| 25 | set LIBDIR=/u/emacs/arch-lib | 25 | LIBDIR=/u/src/emacs/19.0/arch-lib |
| 26 | 26 | ||
| 27 | # The locking directory, where the Emacs locking code keeps track of | 27 | # The locking directory, where the Emacs locking code keeps track of |
| 28 | # which files are currently being edited. | 28 | # which files are currently being edited. |
| 29 | # set LOCKDIR=${LIBROOT}/lock | 29 | # set LOCKDIR=${LIBROOT}/lock |
| 30 | set LOCKDIR=/u/emacs/lock | 30 | LOCKDIR=/u/src/emacs/19.0/lock |
| 31 | 31 | ||
| 32 | # This is where build-install should place the binaries people will | 32 | # This is where build-install should place the binaries people will |
| 33 | # want to run directly (like etags and Emacs itself). | 33 | # want to run directly (like etags and Emacs itself). |
| 34 | set BINDIR=/usr/local/bin | 34 | BINDIR=/usr/local/bin |
| 35 | 35 | ||
| 36 | /bin/sed < src/paths.h-dist > src/paths.h \ | 36 | /bin/sed < src/paths.h-dist > src/paths.h \ |
| 37 | -e 's;/usr/local/emacs;'${LIBDIR}';g' \ | 37 | -e 's;\(#.*PATH_LOADSEARCH\).*$;\1 "'${LISPPATH}'";' \ |
| 38 | -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'${LISPPATH}'";' \ | 38 | -e 's;\(#.*PATH_EXEC\).*$;\1 "'${LIBDIR}'";' \ |
| 39 | -e 's;\(#.*PATH_EXEC\).*$$;\1 "'${LIBDIR}'";' \ | 39 | -e 's;\(#.*PATH_DATA\).*$;\1 "'${DATADIR}'";' \ |
| 40 | -e 's;\(#.*PATH_DATA\).*$$;\1 "'${DATADIR}'";' \ | 40 | -e 's;\(#.*LOCK\).*$;\1 "'${LOCKDIR}'/";' |
| 41 | -e 's;\(#.*LOCK\).*$$;\1 "'${LOCKDIR}'/";' | ||
| 42 | |||
| 43 | exit 1 | ||
| 44 | 41 | ||
| 45 | (cd lib-src; make) || exit 1 | 42 | (cd lib-src; make) || exit 1 |
| 46 | (cd src; make) || exit 1 | 43 | (cd src; make) || exit 1 |
| 47 | 44 | ||
| 48 | if (`pwd` != `(cd ${LIBROOT}; pwd)`) then | 45 | if [ `pwd` != `(cd ${LIBROOT}; pwd)` ]; then |
| 49 | mv `pwd` ${LIBROOT} | 46 | mv `pwd` ${LIBROOT} |
| 50 | if ($status) then | 47 | if [ $? != '0' ]; then |
| 51 | mkdir ${LIBROOT} | 48 | mkdir ${LIBROOT} |
| 52 | echo mv `pwd` to ${LIBROOT} failed--using tar to copy. | 49 | echo mv `pwd` to ${LIBROOT} failed--using tar to copy. |
| 53 | tar cf - . | (cd ${LIBROOT}; umask 0; tar xf -) | 50 | tar cf - . | (cd ${LIBROOT}; umask 0; tar xf -) |
| 54 | if ($status) then | 51 | if [ $? != '0' ]; then |
| 55 | echo tar-copying `pwd` to ${LIBROOT} failed. | 52 | echo tar-copying `pwd` to ${LIBROOT} failed. |
| 56 | exit 1 | 53 | exit 1 |
| 57 | endif | 54 | fi |
| 58 | endif | 55 | fi |
| 59 | endif | 56 | fi |
| 60 | 57 | ||
| 61 | cp ${LIBROOT}/etc/{ctags,etags} ${BINDIR} | 58 | cp ${LIBROOT}/etc/[ce]tags ${BINDIR} |
| 62 | mv ${LIBROOT}/src/xemacs ${BINDIR}/emacs | 59 | mv ${LIBROOT}/src/xemacs ${BINDIR}/emacs |
| 63 | rm ${LIBROOT}/src/temacs | 60 | rm ${LIBROOT}/src/temacs |
| 64 | chmod 777 ${BINDIR}/{ctags,etags,emacs} | 61 | chmod 777 ${BINDIR}/[ce]tags ${BINDIR}/emacs |
diff --git a/src/window.c b/src/window.c index 738227726f2..43a4a95b744 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -27,6 +27,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 27 | #include "indent.h" | 27 | #include "indent.h" |
| 28 | #include "termchar.h" | 28 | #include "termchar.h" |
| 29 | #include "disptab.h" | 29 | #include "disptab.h" |
| 30 | #include "keyboard.h" | ||
| 30 | 31 | ||
| 31 | Lisp_Object Qwindowp; | 32 | Lisp_Object Qwindowp; |
| 32 | 33 | ||
| @@ -1930,9 +1931,10 @@ window_internal_height (w) | |||
| 1930 | /* Scroll contents of window WINDOW up N lines. */ | 1931 | /* Scroll contents of window WINDOW up N lines. */ |
| 1931 | 1932 | ||
| 1932 | void | 1933 | void |
| 1933 | window_scroll (window, n) | 1934 | window_scroll (window, n, noerror) |
| 1934 | Lisp_Object window; | 1935 | Lisp_Object window; |
| 1935 | int n; | 1936 | int n; |
| 1937 | int noerror; | ||
| 1936 | { | 1938 | { |
| 1937 | register struct window *w = XWINDOW (window); | 1939 | register struct window *w = XWINDOW (window); |
| 1938 | register int opoint = point; | 1940 | register int opoint = point; |
| @@ -1961,14 +1963,14 @@ window_scroll (window, n) | |||
| 1961 | SET_PT (opoint); | 1963 | SET_PT (opoint); |
| 1962 | 1964 | ||
| 1963 | if (lose) | 1965 | if (lose) |
| 1964 | Fsignal (Qbeginning_of_buffer, Qnil); | 1966 | { |
| 1967 | if (noerror) | ||
| 1968 | return; | ||
| 1969 | else | ||
| 1970 | Fsignal (Qbeginning_of_buffer, Qnil); | ||
| 1971 | } | ||
| 1965 | 1972 | ||
| 1966 | if (pos < ZV) | 1973 | if (pos < ZV) |
| 1967 | #if 0 | ||
| 1968 | /* Allow scrolling to an empty screen (end of buffer) | ||
| 1969 | if that is exactly how far we wanted to go. */ | ||
| 1970 | || XINT (nmoved) == n) | ||
| 1971 | #endif | ||
| 1972 | { | 1974 | { |
| 1973 | set_marker_restricted (w->start, make_number (pos), w->buffer); | 1975 | set_marker_restricted (w->start, make_number (pos), w->buffer); |
| 1974 | w->start_at_line_beg = bolp; | 1976 | w->start_at_line_beg = bolp; |
| @@ -1987,7 +1989,12 @@ window_scroll (window, n) | |||
| 1987 | } | 1989 | } |
| 1988 | } | 1990 | } |
| 1989 | else | 1991 | else |
| 1990 | Fsignal (Qend_of_buffer, Qnil); | 1992 | { |
| 1993 | if (noerror) | ||
| 1994 | return; | ||
| 1995 | else | ||
| 1996 | Fsignal (Qend_of_buffer, Qnil); | ||
| 1997 | } | ||
| 1991 | } | 1998 | } |
| 1992 | 1999 | ||
| 1993 | /* This is the guts of Fscroll_up and Fscroll_down. */ | 2000 | /* This is the guts of Fscroll_up and Fscroll_down. */ |
| @@ -2000,29 +2007,27 @@ scroll_command (n, direction) | |||
| 2000 | register int defalt; | 2007 | register int defalt; |
| 2001 | int count = specpdl_ptr - specpdl; | 2008 | int count = specpdl_ptr - specpdl; |
| 2002 | 2009 | ||
| 2003 | /* If selected window's buffer isn't current, make it current for the moment. | 2010 | /* Code here used to set the current buffer to the selected window's |
| 2004 | But don't screw up if window_scroll gets an error. */ | 2011 | buffer, but since this command always operates on the selected |
| 2012 | window, the current buffer should always be the selected window's | ||
| 2013 | buffer already. Verify this assumption, so we won't be screwed | ||
| 2014 | if we're guessing wrong. */ | ||
| 2005 | if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) | 2015 | if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) |
| 2006 | { | 2016 | abort (); |
| 2007 | record_unwind_protect (save_excursion_restore, save_excursion_save ()); | ||
| 2008 | Fset_buffer (XWINDOW (selected_window)->buffer); | ||
| 2009 | } | ||
| 2010 | 2017 | ||
| 2011 | defalt = (window_internal_height (XWINDOW (selected_window)) | 2018 | defalt = (window_internal_height (XWINDOW (selected_window)) |
| 2012 | - next_screen_context_lines); | 2019 | - next_screen_context_lines); |
| 2013 | defalt = direction * (defalt < 1 ? 1 : defalt); | 2020 | defalt = direction * (defalt < 1 ? 1 : defalt); |
| 2014 | 2021 | ||
| 2015 | if (NILP (n)) | 2022 | if (NILP (n)) |
| 2016 | window_scroll (selected_window, defalt); | 2023 | window_scroll (selected_window, defalt, 0); |
| 2017 | else if (EQ (n, Qminus)) | 2024 | else if (EQ (n, Qminus)) |
| 2018 | window_scroll (selected_window, - defalt); | 2025 | window_scroll (selected_window, - defalt, 0); |
| 2019 | else | 2026 | else |
| 2020 | { | 2027 | { |
| 2021 | n = Fprefix_numeric_value (n); | 2028 | n = Fprefix_numeric_value (n); |
| 2022 | window_scroll (selected_window, XINT (n) * direction); | 2029 | window_scroll (selected_window, XINT (n) * direction, 0); |
| 2023 | } | 2030 | } |
| 2024 | |||
| 2025 | unbind_to (count, Qnil); | ||
| 2026 | } | 2031 | } |
| 2027 | 2032 | ||
| 2028 | DEFUN ("scroll-up", Fscroll_up, Sscroll_up, 0, 1, "P", | 2033 | DEFUN ("scroll-up", Fscroll_up, Sscroll_up, 0, 1, "P", |
| @@ -2093,15 +2098,15 @@ showing that buffer, popping the buffer up if necessary.") | |||
| 2093 | SET_PT (marker_position (w->pointm)); | 2098 | SET_PT (marker_position (w->pointm)); |
| 2094 | 2099 | ||
| 2095 | if (NILP (n)) | 2100 | if (NILP (n)) |
| 2096 | window_scroll (window, ht - next_screen_context_lines); | 2101 | window_scroll (window, ht - next_screen_context_lines, 1); |
| 2097 | else if (EQ (n, Qminus)) | 2102 | else if (EQ (n, Qminus)) |
| 2098 | window_scroll (window, next_screen_context_lines - ht); | 2103 | window_scroll (window, next_screen_context_lines - ht, 1); |
| 2099 | else | 2104 | else |
| 2100 | { | 2105 | { |
| 2101 | if (XTYPE (n) == Lisp_Cons) | 2106 | if (XTYPE (n) == Lisp_Cons) |
| 2102 | n = Fcar (n); | 2107 | n = Fcar (n); |
| 2103 | CHECK_NUMBER (n, 0); | 2108 | CHECK_NUMBER (n, 0); |
| 2104 | window_scroll (window, XINT (n)); | 2109 | window_scroll (window, XINT (n), 1); |
| 2105 | } | 2110 | } |
| 2106 | 2111 | ||
| 2107 | Fset_marker (w->pointm, make_number (point), Qnil); | 2112 | Fset_marker (w->pointm, make_number (point), Qnil); |