diff options
| author | Joakim Verona | 2012-01-12 07:50:16 +0100 |
|---|---|---|
| committer | Joakim Verona | 2012-01-12 07:50:16 +0100 |
| commit | 16e9a80c0c3ca5f72f802b92ff5ca1f595a07eca (patch) | |
| tree | 33fb6b970b7bcb0cb813d305da2c43f3d212bbf2 /src | |
| parent | e4f761f1e3df7fbc7793c73c5d808b8da0b3a700 (diff) | |
| parent | 403993a8a646887193dd7b8a01cf16137cd89a1e (diff) | |
| download | emacs-16e9a80c0c3ca5f72f802b92ff5ca1f595a07eca.tar.gz emacs-16e9a80c0c3ca5f72f802b92ff5ca1f595a07eca.zip | |
upstream
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 35 | ||||
| -rw-r--r-- | src/ChangeLog.11 | 5 | ||||
| -rw-r--r-- | src/bidi.c | 2 | ||||
| -rw-r--r-- | src/dispnew.c | 2 | ||||
| -rw-r--r-- | src/emacs.c | 8 | ||||
| -rw-r--r-- | src/epaths.in | 29 | ||||
| -rw-r--r-- | src/keyboard.c | 6 | ||||
| -rw-r--r-- | src/lread.c | 205 | ||||
| -rw-r--r-- | src/xdisp.c | 63 |
9 files changed, 243 insertions, 112 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6ef11faea19..4fbfa52df3a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,30 @@ | |||
| 1 | 2012-01-11 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (rows_from_pos_range): Handle the case where the | ||
| 4 | highlight ends on a newline. (Bug#10464) | ||
| 5 | (mouse_face_from_buffer_pos): Fix off-by-one error in calculating | ||
| 6 | he end column for display of highlight that ends on a newline | ||
| 7 | before a R2L line. | ||
| 8 | |||
| 9 | 2012-01-11 Glenn Morris <rgm@gnu.org> | ||
| 10 | |||
| 11 | * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs | ||
| 12 | from load-path also when installation-directory is nil. (Bug#10208) | ||
| 13 | |||
| 14 | 2012-01-10 Glenn Morris <rgm@gnu.org> | ||
| 15 | |||
| 16 | * emacs.c (syms_of_emacs) <installation-directory>: Doc fix. | ||
| 17 | |||
| 18 | * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC): | ||
| 19 | Update template values to be closer to their typical values these days. | ||
| 20 | |||
| 21 | 2012-01-09 Eli Zaretskii <eliz@gnu.org> | ||
| 22 | |||
| 23 | * xdisp.c (rows_from_pos_range): Accept additional argument | ||
| 24 | DISP_STRING, and accept any glyph in a row whose object is that | ||
| 25 | string as eligible for mouse highlight. Fixes mouse highlight of | ||
| 26 | display strings from overlays. (Bug#10464) | ||
| 27 | |||
| 1 | 2012-01-07 Paul Eggert <eggert@cs.ucla.edu> | 28 | 2012-01-07 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 29 | ||
| 3 | emacs: fix an auto-save permissions race condition (Bug#10400) | 30 | emacs: fix an auto-save permissions race condition (Bug#10400) |
| @@ -106,7 +133,7 @@ | |||
| 106 | (trackingNotification): Surround with ifdef NS_IMPL_COCOA. | 133 | (trackingNotification): Surround with ifdef NS_IMPL_COCOA. |
| 107 | (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA. | 134 | (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA. |
| 108 | 135 | ||
| 109 | 2011-12-18 David Reitter <reitter@cmu.edu> | 136 | 2011-12-18 David Reitter <reitter@cmu.edu> |
| 110 | 137 | ||
| 111 | * nsterm.m (ns_term_init): Subscribe for notifications | 138 | * nsterm.m (ns_term_init): Subscribe for notifications |
| 112 | NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification | 139 | NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification |
| @@ -5755,7 +5782,7 @@ | |||
| 5755 | where the include path doesn't have X11/X.h by default. See | 5782 | where the include path doesn't have X11/X.h by default. See |
| 5756 | <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>. | 5783 | <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>. |
| 5757 | 5784 | ||
| 5758 | 2011-05-20 Kenichi Handa <handa@m17n.org> | 5785 | 2011-05-20 Kenichi Handa <handa@m17n.org> |
| 5759 | 5786 | ||
| 5760 | * composite.c (find_automatic_composition): Fix previous change. | 5787 | * composite.c (find_automatic_composition): Fix previous change. |
| 5761 | 5788 | ||
| @@ -6097,7 +6124,7 @@ | |||
| 6097 | * lread.c (lisp_file_lexically_bound_p): Stop scanning at end | 6124 | * lread.c (lisp_file_lexically_bound_p): Stop scanning at end |
| 6098 | marker. (Bug#8610) | 6125 | marker. (Bug#8610) |
| 6099 | 6126 | ||
| 6100 | 2011-05-05 Eli Zaretskii <eliz@gnu.org> | 6127 | 2011-05-05 Eli Zaretskii <eliz@gnu.org> |
| 6101 | 6128 | ||
| 6102 | * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]: | 6129 | * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]: |
| 6103 | New version that can reserve upto 2GB of heap space. | 6130 | New version that can reserve upto 2GB of heap space. |
| @@ -8301,7 +8328,7 @@ | |||
| 8301 | are now in src/globals.h. | 8328 | are now in src/globals.h. |
| 8302 | (syms_of_minibuf): Remove spurious & from previous change. | 8329 | (syms_of_minibuf): Remove spurious & from previous change. |
| 8303 | 8330 | ||
| 8304 | 2011-03-20 Leo <sdl.web@gmail.com> | 8331 | 2011-03-20 Leo Liu <sdl.web@gmail.com> |
| 8305 | 8332 | ||
| 8306 | * minibuf.c (completing-read-function): New variable. | 8333 | * minibuf.c (completing-read-function): New variable. |
| 8307 | (completing-read-default): Rename from completing-read. | 8334 | (completing-read-default): Rename from completing-read. |
diff --git a/src/ChangeLog.11 b/src/ChangeLog.11 index 6c361399535..e8bfd964312 100644 --- a/src/ChangeLog.11 +++ b/src/ChangeLog.11 | |||
| @@ -3538,7 +3538,6 @@ | |||
| 3538 | * nsmenu.m (syms_of_nsmenu): | 3538 | * nsmenu.m (syms_of_nsmenu): |
| 3539 | * nsfns.m (syms_of_nsfns): | 3539 | * nsfns.m (syms_of_nsfns): |
| 3540 | * msdos.c (syms_of_msdos): | 3540 | * msdos.c (syms_of_msdos): |
| 3541 | |||
| 3542 | * image.c (syms_of_image): | 3541 | * image.c (syms_of_image): |
| 3543 | * charset.c (syms_of_charset): Use intern_c_string instead of intern. | 3542 | * charset.c (syms_of_charset): Use intern_c_string instead of intern. |
| 3544 | 3543 | ||
| @@ -4388,7 +4387,7 @@ | |||
| 4388 | * xml.c (Fxml_parse_string, Fxml_parse_string): Revert last change. | 4387 | * xml.c (Fxml_parse_string, Fxml_parse_string): Revert last change. |
| 4389 | Don't make first argument optional. Doc fix. | 4388 | Don't make first argument optional. Doc fix. |
| 4390 | 4389 | ||
| 4391 | 2010-09-14 Leo <sdl.web@gmail.com> (tiny change) | 4390 | 2010-09-14 Leo Liu <sdl.web@gmail.com> (tiny change) |
| 4392 | 4391 | ||
| 4393 | * xml.c (Fxml_parse_string, Fhtml_parse_string): Fix up the | 4392 | * xml.c (Fxml_parse_string, Fhtml_parse_string): Fix up the |
| 4394 | parameters for the doc string. | 4393 | parameters for the doc string. |
| @@ -29523,7 +29522,7 @@ | |||
| 29523 | (Fdisplay_buffer): Use it. | 29522 | (Fdisplay_buffer): Use it. |
| 29524 | (syms_of_window): Export, and initialize it. | 29523 | (syms_of_window): Export, and initialize it. |
| 29525 | 29524 | ||
| 29526 | 2007-09-06 Pixel <pixel@mandriva.com> (tiny change) | 29525 | 2007-09-06 Pascal Rigaux <pixel@mandriva.com> (tiny change) |
| 29527 | 29526 | ||
| 29528 | * image.c (gif_load): Fix bug: Handle nonexistent colormap. | 29527 | * image.c (gif_load): Fix bug: Handle nonexistent colormap. |
| 29529 | 29528 | ||
diff --git a/src/bidi.c b/src/bidi.c index b59b838d671..107c817abba 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -572,7 +572,7 @@ bidi_cache_find (EMACS_INT charpos, int level, struct bidi_it *bidi_it) | |||
| 572 | 572 | ||
| 573 | bidi_copy_it (bidi_it, &bidi_cache[i]); | 573 | bidi_copy_it (bidi_it, &bidi_cache[i]); |
| 574 | bidi_cache_last_idx = i; | 574 | bidi_cache_last_idx = i; |
| 575 | /* Don't let scan direction from from the cached state override | 575 | /* Don't let scan direction from the cached state override |
| 576 | the current scan direction. */ | 576 | the current scan direction. */ |
| 577 | bidi_it->scan_dir = current_scan_dir; | 577 | bidi_it->scan_dir = current_scan_dir; |
| 578 | return bidi_it->type; | 578 | return bidi_it->type; |
diff --git a/src/dispnew.c b/src/dispnew.c index 1e33fa60557..88de7361735 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -67,7 +67,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 67 | #include <errno.h> | 67 | #include <errno.h> |
| 68 | 68 | ||
| 69 | /* Get number of chars of output now in the buffer of a stdio stream. | 69 | /* Get number of chars of output now in the buffer of a stdio stream. |
| 70 | This ought to be built in in stdio, but it isn't. Some s- files | 70 | This ought to be built in stdio, but it isn't. Some s- files |
| 71 | override this because their stdio internals differ. */ | 71 | override this because their stdio internals differ. */ |
| 72 | 72 | ||
| 73 | #ifdef __GNU_LIBRARY__ | 73 | #ifdef __GNU_LIBRARY__ |
diff --git a/src/emacs.c b/src/emacs.c index 9b5640b6975..3a6620a3777 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -2486,9 +2486,11 @@ The value is nil if that directory's name is not known. */); | |||
| 2486 | 2486 | ||
| 2487 | DEFVAR_LISP ("installation-directory", Vinstallation_directory, | 2487 | DEFVAR_LISP ("installation-directory", Vinstallation_directory, |
| 2488 | doc: /* A directory within which to look for the `lib-src' and `etc' directories. | 2488 | doc: /* A directory within which to look for the `lib-src' and `etc' directories. |
| 2489 | This is non-nil when we can't find those directories in their standard | 2489 | In an installed Emacs, this is normally nil. It is non-nil if |
| 2490 | installed locations, but we can find them near where the Emacs executable | 2490 | both `lib-src' (on MS-DOS, `info') and `etc' directories are found |
| 2491 | was found. */); | 2491 | within the variable `invocation-directory' or its parent. For example, |
| 2492 | this is the case when running an uninstalled Emacs executable from its | ||
| 2493 | build directory. */); | ||
| 2492 | Vinstallation_directory = Qnil; | 2494 | Vinstallation_directory = Qnil; |
| 2493 | 2495 | ||
| 2494 | DEFVAR_LISP ("system-messages-locale", Vsystem_messages_locale, | 2496 | DEFVAR_LISP ("system-messages-locale", Vsystem_messages_locale, |
diff --git a/src/epaths.in b/src/epaths.in index 9ce1cefd211..17cb65a3234 100644 --- a/src/epaths.in +++ b/src/epaths.in | |||
| @@ -19,14 +19,21 @@ You should have received a copy of the GNU General Public License | |||
| 19 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 19 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | /* The default search path for Lisp function "load". | 22 | /* The default value of load-path, which is the search path for |
| 23 | This sets load-path. */ | 23 | the Lisp function "load". Configure (using "make epaths-force") |
| 24 | #define PATH_LOADSEARCH "/usr/local/lib/emacs/lisp" | 24 | sets this to $lisppath, which typically has a value like: |
| 25 | 25 | <datadir>/emacs/VERSION/site-lisp:<datadir>/emacs/site-lisp: | |
| 26 | /* Like PATH_LOADSEARCH, but used only when Emacs is dumping. This | 26 | <datadir>/emacs/VERSION/lisp:<datadir>/emacs/VERSION/leim |
| 27 | path is usually identical to PATH_LOADSEARCH except that the entry | 27 | where datadir is eg /usr/local/share. |
| 28 | for the directory containing the installed lisp files has been | 28 | Configure prepends any $locallisppath, as set by the |
| 29 | replaced with ../lisp. */ | 29 | --enable-locallisppath argument. |
| 30 | */ | ||
| 31 | #define PATH_LOADSEARCH "/usr/local/share/emacs/lisp" | ||
| 32 | |||
| 33 | /* Like PATH_LOADSEARCH, but used only during the build process | ||
| 34 | when Emacs is dumping. Configure (using "make epaths-force") sets | ||
| 35 | this to $buildlisppath, which normally has the value: <srcdir>/lisp. | ||
| 36 | */ | ||
| 30 | #define PATH_DUMPLOADSEARCH "../lisp" | 37 | #define PATH_DUMPLOADSEARCH "../lisp" |
| 31 | 38 | ||
| 32 | /* The extra search path for programs to invoke. This is appended to | 39 | /* The extra search path for programs to invoke. This is appended to |
| @@ -34,12 +41,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 34 | variable exec-path and the first file name in it sets the Lisp | 41 | variable exec-path and the first file name in it sets the Lisp |
| 35 | variable exec-directory. exec-directory is used for finding | 42 | variable exec-directory. exec-directory is used for finding |
| 36 | executables and other architecture-dependent files. */ | 43 | executables and other architecture-dependent files. */ |
| 37 | #define PATH_EXEC "/usr/local/lib/emacs/etc" | 44 | #define PATH_EXEC "/usr/local/libexec/emacs" |
| 38 | 45 | ||
| 39 | /* Where Emacs should look for its architecture-independent data | 46 | /* Where Emacs should look for its architecture-independent data |
| 40 | files, like the NEWS file. The lisp variable data-directory | 47 | files, like the NEWS file. The lisp variable data-directory |
| 41 | is set to this value. */ | 48 | is set to this value. */ |
| 42 | #define PATH_DATA "/usr/local/lib/emacs/data" | 49 | #define PATH_DATA "/usr/local/share/emacs/etc" |
| 43 | 50 | ||
| 44 | /* Where Emacs should look for X bitmap files. | 51 | /* Where Emacs should look for X bitmap files. |
| 45 | The lisp variable x-bitmap-file-path is set based on this value. */ | 52 | The lisp variable x-bitmap-file-path is set based on this value. */ |
| @@ -47,7 +54,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 47 | 54 | ||
| 48 | /* Where Emacs should look for its docstring file. The lisp variable | 55 | /* Where Emacs should look for its docstring file. The lisp variable |
| 49 | doc-directory is set to this value. */ | 56 | doc-directory is set to this value. */ |
| 50 | #define PATH_DOC "/usr/local/lib/emacs/data" | 57 | #define PATH_DOC "/usr/local/share/emacs/etc" |
| 51 | 58 | ||
| 52 | /* Where the configuration process believes the info tree lives. The | 59 | /* Where the configuration process believes the info tree lives. The |
| 53 | lisp variable configure-info-directory gets its value from this | 60 | lisp variable configure-info-directory gets its value from this |
diff --git a/src/keyboard.c b/src/keyboard.c index 394f95bd07c..12eb162df9a 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -2242,8 +2242,8 @@ do { if (polling_stopped_here) start_polling (); \ | |||
| 2242 | polling_stopped_here = 0; } while (0) | 2242 | polling_stopped_here = 0; } while (0) |
| 2243 | 2243 | ||
| 2244 | /* read a character from the keyboard; call the redisplay if needed */ | 2244 | /* read a character from the keyboard; call the redisplay if needed */ |
| 2245 | /* commandflag 0 means do not do auto-saving, but do do redisplay. | 2245 | /* commandflag 0 means do not autosave, but do redisplay. |
| 2246 | -1 means do not do redisplay, but do do autosaving. | 2246 | -1 means do not redisplay, but do autosave. |
| 2247 | 1 means do both. */ | 2247 | 1 means do both. */ |
| 2248 | 2248 | ||
| 2249 | /* The arguments MAPS and NMAPS are for menu prompting. | 2249 | /* The arguments MAPS and NMAPS are for menu prompting. |
| @@ -5143,7 +5143,7 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y, | |||
| 5143 | 5143 | ||
| 5144 | if (WINDOWP (window)) | 5144 | if (WINDOWP (window)) |
| 5145 | { | 5145 | { |
| 5146 | /* It's a click in window window at frame coordinates (x,y) */ | 5146 | /* It's a click in window WINDOW at frame coordinates (X,Y) */ |
| 5147 | struct window *w = XWINDOW (window); | 5147 | struct window *w = XWINDOW (window); |
| 5148 | Lisp_Object string_info = Qnil; | 5148 | Lisp_Object string_info = Qnil; |
| 5149 | EMACS_INT textpos = -1; | 5149 | EMACS_INT textpos = -1; |
diff --git a/src/lread.c b/src/lread.c index 7b5fc91e991..23cda8eed6d 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -4109,7 +4109,46 @@ init_lread (void) | |||
| 4109 | const char *normal; | 4109 | const char *normal; |
| 4110 | int turn_off_warning = 0; | 4110 | int turn_off_warning = 0; |
| 4111 | 4111 | ||
| 4112 | /* Compute the default load-path. */ | 4112 | /* Compute the default Vload-path, with the following logic: |
| 4113 | If CANNOT_DUMP just use PATH_LOADSEARCH. | ||
| 4114 | Else if purify-flag (ie dumping) start from PATH_DUMPLOADSEARCH; | ||
| 4115 | otherwise start from PATH_LOADSEARCH. | ||
| 4116 | If !initialized, then just set both Vload_path and dump_path. | ||
| 4117 | If initialized, then if Vload_path != dump_path, do nothing. | ||
| 4118 | (Presumably the load-path has already been changed by something.) | ||
| 4119 | Also do nothing if Vinstallation_directory is nil. | ||
| 4120 | Otherwise: | ||
| 4121 | Remove site-lisp directories from the front of load-path. | ||
| 4122 | Add installation-dir/lisp (if exists and not already a member), | ||
| 4123 | at the front, and turn off warnings about missing directories | ||
| 4124 | (because we are presumably running uninstalled). | ||
| 4125 | If it does not exist, add dump_path at the end instead. | ||
| 4126 | Add installation-dir/leim (if exists and not already a member) | ||
| 4127 | at the front. | ||
| 4128 | Add installation-dir/site-lisp (if !no_site_lisp, and exists | ||
| 4129 | and not already a member) at the front. | ||
| 4130 | If installation-dir != source-dir (ie running an uninstalled, | ||
| 4131 | out-of-tree build) AND install-dir/src/Makefile exists BUT | ||
| 4132 | install-dir/src/Makefile.in does NOT exist (this is a sanity | ||
| 4133 | check), then repeat the above steps for source-dir/lisp, | ||
| 4134 | leim and site-lisp. | ||
| 4135 | Finally, add the previously removed site-lisp directories back | ||
| 4136 | at the front (if !no_site_lisp). | ||
| 4137 | |||
| 4138 | We then warn about any of the load-path elements that do not | ||
| 4139 | exist. The only ones that might not exist are those from | ||
| 4140 | PATH_LOADSEARCH, and perhaps dump_path. | ||
| 4141 | |||
| 4142 | Having done all this, we then throw it all away if purify-flag is | ||
| 4143 | nil (ie, not dumping) and EMACSLOADPATH is set, and just | ||
| 4144 | unconditionally use the latter value instead. | ||
| 4145 | So AFAICS the only net results of all the previous steps will be | ||
| 4146 | possibly to issue some irrelevant warnings. | ||
| 4147 | |||
| 4148 | FIXME? There's a case for saying that if we are running | ||
| 4149 | uninstalled, the eventual installation directories should not yet | ||
| 4150 | be included in load-path. | ||
| 4151 | */ | ||
| 4113 | #ifdef CANNOT_DUMP | 4152 | #ifdef CANNOT_DUMP |
| 4114 | normal = PATH_LOADSEARCH; | 4153 | normal = PATH_LOADSEARCH; |
| 4115 | Vload_path = decode_env_path (0, normal); | 4154 | Vload_path = decode_env_path (0, normal); |
| @@ -4119,23 +4158,28 @@ init_lread (void) | |||
| 4119 | else | 4158 | else |
| 4120 | normal = PATH_DUMPLOADSEARCH; | 4159 | normal = PATH_DUMPLOADSEARCH; |
| 4121 | 4160 | ||
| 4122 | /* In a dumped Emacs, we normally have to reset the value of | 4161 | /* In a dumped Emacs, we normally reset the value of Vload_path using |
| 4123 | Vload_path from PATH_LOADSEARCH, since the value that was dumped | 4162 | PATH_LOADSEARCH, since the value that was dumped uses lisp/ in |
| 4124 | uses ../lisp, instead of the path of the installed elisp | 4163 | the source directory, instead of the path of the installed elisp |
| 4125 | libraries. However, if it appears that Vload_path was changed | 4164 | libraries. However, if it appears that Vload_path has already been |
| 4126 | from the default before dumping, don't override that value. */ | 4165 | changed from the default that was saved before dumping, don't |
| 4166 | change it further. */ | ||
| 4127 | if (initialized) | 4167 | if (initialized) |
| 4128 | { | 4168 | { |
| 4129 | if (! NILP (Fequal (dump_path, Vload_path))) | 4169 | if (! NILP (Fequal (dump_path, Vload_path))) |
| 4130 | { | 4170 | { |
| 4131 | Vload_path = decode_env_path (0, normal); | 4171 | Vload_path = decode_env_path (0, normal); |
| 4132 | if (!NILP (Vinstallation_directory)) | 4172 | if (no_site_lisp || !NILP (Vinstallation_directory)) |
| 4133 | { | 4173 | { |
| 4134 | Lisp_Object tem, tem1, sitelisp; | 4174 | Lisp_Object tem, tem1, sitelisp; |
| 4135 | 4175 | ||
| 4136 | /* Remove site-lisp dirs from path temporarily and store | 4176 | /* Remove "site-lisp" dirs from front of path temporarily |
| 4137 | them in sitelisp, then conc them on at the end so | 4177 | and store them in sitelisp, then conc them on at the |
| 4138 | they're always first in path. */ | 4178 | end so they're always first in path. |
| 4179 | Note that this won't work if you used a | ||
| 4180 | --enable-locallisppath element that does not happen | ||
| 4181 | to contain "site-lisp" in its name. | ||
| 4182 | */ | ||
| 4139 | sitelisp = Qnil; | 4183 | sitelisp = Qnil; |
| 4140 | while (1) | 4184 | while (1) |
| 4141 | { | 4185 | { |
| @@ -4151,96 +4195,99 @@ init_lread (void) | |||
| 4151 | break; | 4195 | break; |
| 4152 | } | 4196 | } |
| 4153 | 4197 | ||
| 4154 | /* Add to the path the lisp subdir of the | 4198 | if (!NILP (Vinstallation_directory)) |
| 4155 | installation dir, if it exists. */ | ||
| 4156 | tem = Fexpand_file_name (build_string ("lisp"), | ||
| 4157 | Vinstallation_directory); | ||
| 4158 | tem1 = Ffile_exists_p (tem); | ||
| 4159 | if (!NILP (tem1)) | ||
| 4160 | { | ||
| 4161 | if (NILP (Fmember (tem, Vload_path))) | ||
| 4162 | { | ||
| 4163 | turn_off_warning = 1; | ||
| 4164 | Vload_path = Fcons (tem, Vload_path); | ||
| 4165 | } | ||
| 4166 | } | ||
| 4167 | else | ||
| 4168 | /* That dir doesn't exist, so add the build-time | ||
| 4169 | Lisp dirs instead. */ | ||
| 4170 | Vload_path = nconc2 (Vload_path, dump_path); | ||
| 4171 | |||
| 4172 | /* Add leim under the installation dir, if it exists. */ | ||
| 4173 | tem = Fexpand_file_name (build_string ("leim"), | ||
| 4174 | Vinstallation_directory); | ||
| 4175 | tem1 = Ffile_exists_p (tem); | ||
| 4176 | if (!NILP (tem1)) | ||
| 4177 | { | ||
| 4178 | if (NILP (Fmember (tem, Vload_path))) | ||
| 4179 | Vload_path = Fcons (tem, Vload_path); | ||
| 4180 | } | ||
| 4181 | |||
| 4182 | /* Add site-lisp under the installation dir, if it exists. */ | ||
| 4183 | if (!no_site_lisp) | ||
| 4184 | { | 4199 | { |
| 4185 | tem = Fexpand_file_name (build_string ("site-lisp"), | 4200 | /* Add to the path the lisp subdir of the |
| 4201 | installation dir, if it exists. */ | ||
| 4202 | tem = Fexpand_file_name (build_string ("lisp"), | ||
| 4186 | Vinstallation_directory); | 4203 | Vinstallation_directory); |
| 4187 | tem1 = Ffile_exists_p (tem); | 4204 | tem1 = Ffile_exists_p (tem); |
| 4188 | if (!NILP (tem1)) | 4205 | if (!NILP (tem1)) |
| 4189 | { | 4206 | { |
| 4190 | if (NILP (Fmember (tem, Vload_path))) | 4207 | if (NILP (Fmember (tem, Vload_path))) |
| 4191 | Vload_path = Fcons (tem, Vload_path); | 4208 | { |
| 4209 | turn_off_warning = 1; | ||
| 4210 | Vload_path = Fcons (tem, Vload_path); | ||
| 4211 | } | ||
| 4192 | } | 4212 | } |
| 4193 | } | 4213 | else |
| 4194 | 4214 | /* That dir doesn't exist, so add the build-time | |
| 4195 | /* If Emacs was not built in the source directory, | 4215 | Lisp dirs instead. */ |
| 4196 | and it is run from where it was built, add to load-path | 4216 | Vload_path = nconc2 (Vload_path, dump_path); |
| 4197 | the lisp, leim and site-lisp dirs under that directory. */ | ||
| 4198 | |||
| 4199 | if (NILP (Fequal (Vinstallation_directory, Vsource_directory))) | ||
| 4200 | { | ||
| 4201 | Lisp_Object tem2; | ||
| 4202 | 4217 | ||
| 4203 | tem = Fexpand_file_name (build_string ("src/Makefile"), | 4218 | /* Add leim under the installation dir, if it exists. */ |
| 4219 | tem = Fexpand_file_name (build_string ("leim"), | ||
| 4204 | Vinstallation_directory); | 4220 | Vinstallation_directory); |
| 4205 | tem1 = Ffile_exists_p (tem); | 4221 | tem1 = Ffile_exists_p (tem); |
| 4206 | 4222 | if (!NILP (tem1)) | |
| 4207 | /* Don't be fooled if they moved the entire source tree | ||
| 4208 | AFTER dumping Emacs. If the build directory is indeed | ||
| 4209 | different from the source dir, src/Makefile.in and | ||
| 4210 | src/Makefile will not be found together. */ | ||
| 4211 | tem = Fexpand_file_name (build_string ("src/Makefile.in"), | ||
| 4212 | Vinstallation_directory); | ||
| 4213 | tem2 = Ffile_exists_p (tem); | ||
| 4214 | if (!NILP (tem1) && NILP (tem2)) | ||
| 4215 | { | 4223 | { |
| 4216 | tem = Fexpand_file_name (build_string ("lisp"), | ||
| 4217 | Vsource_directory); | ||
| 4218 | |||
| 4219 | if (NILP (Fmember (tem, Vload_path))) | 4224 | if (NILP (Fmember (tem, Vload_path))) |
| 4220 | Vload_path = Fcons (tem, Vload_path); | 4225 | Vload_path = Fcons (tem, Vload_path); |
| 4226 | } | ||
| 4221 | 4227 | ||
| 4222 | tem = Fexpand_file_name (build_string ("leim"), | 4228 | /* Add site-lisp under the installation dir, if it exists. */ |
| 4223 | Vsource_directory); | 4229 | if (!no_site_lisp) |
| 4230 | { | ||
| 4231 | tem = Fexpand_file_name (build_string ("site-lisp"), | ||
| 4232 | Vinstallation_directory); | ||
| 4233 | tem1 = Ffile_exists_p (tem); | ||
| 4234 | if (!NILP (tem1)) | ||
| 4235 | { | ||
| 4236 | if (NILP (Fmember (tem, Vload_path))) | ||
| 4237 | Vload_path = Fcons (tem, Vload_path); | ||
| 4238 | } | ||
| 4239 | } | ||
| 4224 | 4240 | ||
| 4225 | if (NILP (Fmember (tem, Vload_path))) | 4241 | /* If Emacs was not built in the source directory, |
| 4226 | Vload_path = Fcons (tem, Vload_path); | 4242 | and it is run from where it was built, add to load-path |
| 4243 | the lisp, leim and site-lisp dirs under that directory. */ | ||
| 4227 | 4244 | ||
| 4228 | if (!no_site_lisp) | 4245 | if (NILP (Fequal (Vinstallation_directory, Vsource_directory))) |
| 4246 | { | ||
| 4247 | Lisp_Object tem2; | ||
| 4248 | |||
| 4249 | tem = Fexpand_file_name (build_string ("src/Makefile"), | ||
| 4250 | Vinstallation_directory); | ||
| 4251 | tem1 = Ffile_exists_p (tem); | ||
| 4252 | |||
| 4253 | /* Don't be fooled if they moved the entire source tree | ||
| 4254 | AFTER dumping Emacs. If the build directory is indeed | ||
| 4255 | different from the source dir, src/Makefile.in and | ||
| 4256 | src/Makefile will not be found together. */ | ||
| 4257 | tem = Fexpand_file_name (build_string ("src/Makefile.in"), | ||
| 4258 | Vinstallation_directory); | ||
| 4259 | tem2 = Ffile_exists_p (tem); | ||
| 4260 | if (!NILP (tem1) && NILP (tem2)) | ||
| 4229 | { | 4261 | { |
| 4230 | tem = Fexpand_file_name (build_string ("site-lisp"), | 4262 | tem = Fexpand_file_name (build_string ("lisp"), |
| 4263 | Vsource_directory); | ||
| 4264 | |||
| 4265 | if (NILP (Fmember (tem, Vload_path))) | ||
| 4266 | Vload_path = Fcons (tem, Vload_path); | ||
| 4267 | |||
| 4268 | tem = Fexpand_file_name (build_string ("leim"), | ||
| 4231 | Vsource_directory); | 4269 | Vsource_directory); |
| 4232 | 4270 | ||
| 4233 | if (NILP (Fmember (tem, Vload_path))) | 4271 | if (NILP (Fmember (tem, Vload_path))) |
| 4234 | Vload_path = Fcons (tem, Vload_path); | 4272 | Vload_path = Fcons (tem, Vload_path); |
| 4273 | |||
| 4274 | if (!no_site_lisp) | ||
| 4275 | { | ||
| 4276 | tem = Fexpand_file_name (build_string ("site-lisp"), | ||
| 4277 | Vsource_directory); | ||
| 4278 | |||
| 4279 | if (NILP (Fmember (tem, Vload_path))) | ||
| 4280 | Vload_path = Fcons (tem, Vload_path); | ||
| 4281 | } | ||
| 4235 | } | 4282 | } |
| 4236 | } | 4283 | } /* Vinstallation_directory != Vsource_directory */ |
| 4237 | } | 4284 | } /* if Vinstallation_directory */ |
| 4238 | if (!NILP (sitelisp) && !no_site_lisp) | 4285 | if (!NILP (sitelisp) && !no_site_lisp) |
| 4239 | Vload_path = nconc2 (Fnreverse (sitelisp), Vload_path); | 4286 | Vload_path = nconc2 (Fnreverse (sitelisp), Vload_path); |
| 4240 | } | 4287 | } /* if Vinstallation_directory || no_site_lisp */ |
| 4241 | } | 4288 | } /* if dump_path == Vload_path */ |
| 4242 | } | 4289 | } |
| 4243 | else | 4290 | else /* !initialized */ |
| 4244 | { | 4291 | { |
| 4245 | /* NORMAL refers to the lisp dir in the source directory. */ | 4292 | /* NORMAL refers to the lisp dir in the source directory. */ |
| 4246 | /* We used to add ../lisp at the front here, but | 4293 | /* We used to add ../lisp at the front here, but |
| @@ -4250,7 +4297,7 @@ init_lread (void) | |||
| 4250 | Vload_path = decode_env_path (0, normal); | 4297 | Vload_path = decode_env_path (0, normal); |
| 4251 | dump_path = Vload_path; | 4298 | dump_path = Vload_path; |
| 4252 | } | 4299 | } |
| 4253 | #endif | 4300 | #endif /* CANNOT_DUMP */ |
| 4254 | 4301 | ||
| 4255 | #if (!(defined (WINDOWSNT) || (defined (HAVE_NS)))) | 4302 | #if (!(defined (WINDOWSNT) || (defined (HAVE_NS)))) |
| 4256 | /* When Emacs is invoked over network shares on NT, PATH_LOADSEARCH is | 4303 | /* When Emacs is invoked over network shares on NT, PATH_LOADSEARCH is |
| @@ -4258,6 +4305,8 @@ init_lread (void) | |||
| 4258 | confuses users. Since PATH_LOADSEARCH is always overridden by the | 4305 | confuses users. Since PATH_LOADSEARCH is always overridden by the |
| 4259 | EMACSLOADPATH environment variable below, disable the warning on NT. */ | 4306 | EMACSLOADPATH environment variable below, disable the warning on NT. */ |
| 4260 | 4307 | ||
| 4308 | /* HAVE_NS also uses EMACSLOADPATH. */ | ||
| 4309 | |||
| 4261 | /* Warn if dirs in the *standard* path don't exist. */ | 4310 | /* Warn if dirs in the *standard* path don't exist. */ |
| 4262 | if (!turn_off_warning) | 4311 | if (!turn_off_warning) |
| 4263 | { | 4312 | { |
| @@ -4272,6 +4321,10 @@ init_lread (void) | |||
| 4272 | if (STRINGP (dirfile)) | 4321 | if (STRINGP (dirfile)) |
| 4273 | { | 4322 | { |
| 4274 | dirfile = Fdirectory_file_name (dirfile); | 4323 | dirfile = Fdirectory_file_name (dirfile); |
| 4324 | /* Do we really need to warn about missing site-lisp dirs? | ||
| 4325 | It's true that the installation should have created | ||
| 4326 | them and added subdirs.el, but it's harmless if they | ||
| 4327 | are not there. */ | ||
| 4275 | if (access (SSDATA (dirfile), 0) < 0) | 4328 | if (access (SSDATA (dirfile), 0) < 0) |
| 4276 | dir_warning ("Warning: Lisp directory `%s' does not exist.\n", | 4329 | dir_warning ("Warning: Lisp directory `%s' does not exist.\n", |
| 4277 | XCAR (path_tail)); | 4330 | XCAR (path_tail)); |
diff --git a/src/xdisp.c b/src/xdisp.c index 214cf4c7120..e4a043c4c7b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -26055,12 +26055,14 @@ cursor_in_mouse_face_p (struct window *w) | |||
| 26055 | 26055 | ||
| 26056 | /* Find the glyph rows START_ROW and END_ROW of window W that display | 26056 | /* Find the glyph rows START_ROW and END_ROW of window W that display |
| 26057 | characters between buffer positions START_CHARPOS and END_CHARPOS | 26057 | characters between buffer positions START_CHARPOS and END_CHARPOS |
| 26058 | (excluding END_CHARPOS). This is similar to row_containing_pos, | 26058 | (excluding END_CHARPOS). DISP_STRING is a display string that |
| 26059 | but is more accurate when bidi reordering makes buffer positions | 26059 | covers these buffer positions. This is similar to |
| 26060 | change non-linearly with glyph rows. */ | 26060 | row_containing_pos, but is more accurate when bidi reordering makes |
| 26061 | buffer positions change non-linearly with glyph rows. */ | ||
| 26061 | static void | 26062 | static void |
| 26062 | rows_from_pos_range (struct window *w, | 26063 | rows_from_pos_range (struct window *w, |
| 26063 | EMACS_INT start_charpos, EMACS_INT end_charpos, | 26064 | EMACS_INT start_charpos, EMACS_INT end_charpos, |
| 26065 | Lisp_Object disp_string, | ||
| 26064 | struct glyph_row **start, struct glyph_row **end) | 26066 | struct glyph_row **start, struct glyph_row **end) |
| 26065 | { | 26067 | { |
| 26066 | struct glyph_row *first = MATRIX_FIRST_TEXT_ROW (w->current_matrix); | 26068 | struct glyph_row *first = MATRIX_FIRST_TEXT_ROW (w->current_matrix); |
| @@ -26112,8 +26114,11 @@ rows_from_pos_range (struct window *w, | |||
| 26112 | 26114 | ||
| 26113 | while (g < e) | 26115 | while (g < e) |
| 26114 | { | 26116 | { |
| 26115 | if ((BUFFERP (g->object) || INTEGERP (g->object)) | 26117 | if (((BUFFERP (g->object) || INTEGERP (g->object)) |
| 26116 | && start_charpos <= g->charpos && g->charpos < end_charpos) | 26118 | && start_charpos <= g->charpos && g->charpos < end_charpos) |
| 26119 | /* A glyph that comes from DISP_STRING is by | ||
| 26120 | definition to be highlighted. */ | ||
| 26121 | || EQ (g->object, disp_string)) | ||
| 26117 | *start = row; | 26122 | *start = row; |
| 26118 | g++; | 26123 | g++; |
| 26119 | } | 26124 | } |
| @@ -26132,14 +26137,15 @@ rows_from_pos_range (struct window *w, | |||
| 26132 | for ( ; row->enabled_p && MATRIX_ROW_BOTTOM_Y (row) <= last_y; row++) | 26137 | for ( ; row->enabled_p && MATRIX_ROW_BOTTOM_Y (row) <= last_y; row++) |
| 26133 | { | 26138 | { |
| 26134 | struct glyph_row *next = row + 1; | 26139 | struct glyph_row *next = row + 1; |
| 26140 | EMACS_INT next_start = MATRIX_ROW_START_CHARPOS (next); | ||
| 26135 | 26141 | ||
| 26136 | if (!next->enabled_p | 26142 | if (!next->enabled_p |
| 26137 | || next >= MATRIX_BOTTOM_TEXT_ROW (w->current_matrix, w) | 26143 | || next >= MATRIX_BOTTOM_TEXT_ROW (w->current_matrix, w) |
| 26138 | /* The first row >= START whose range of displayed characters | 26144 | /* The first row >= START whose range of displayed characters |
| 26139 | does NOT intersect the range [START_CHARPOS..END_CHARPOS] | 26145 | does NOT intersect the range [START_CHARPOS..END_CHARPOS] |
| 26140 | is the row END + 1. */ | 26146 | is the row END + 1. */ |
| 26141 | || (start_charpos < MATRIX_ROW_START_CHARPOS (next) | 26147 | || (start_charpos < next_start |
| 26142 | && end_charpos < MATRIX_ROW_START_CHARPOS (next)) | 26148 | && end_charpos < next_start) |
| 26143 | || ((start_charpos > MATRIX_ROW_END_CHARPOS (next) | 26149 | || ((start_charpos > MATRIX_ROW_END_CHARPOS (next) |
| 26144 | || (start_charpos == MATRIX_ROW_END_CHARPOS (next) | 26150 | || (start_charpos == MATRIX_ROW_END_CHARPOS (next) |
| 26145 | && !next->ends_at_zv_p | 26151 | && !next->ends_at_zv_p |
| @@ -26158,12 +26164,29 @@ rows_from_pos_range (struct window *w, | |||
| 26158 | but none of the characters it displays are in the range, it is | 26164 | but none of the characters it displays are in the range, it is |
| 26159 | also END + 1. */ | 26165 | also END + 1. */ |
| 26160 | struct glyph *g = next->glyphs[TEXT_AREA]; | 26166 | struct glyph *g = next->glyphs[TEXT_AREA]; |
| 26167 | struct glyph *s = g; | ||
| 26161 | struct glyph *e = g + next->used[TEXT_AREA]; | 26168 | struct glyph *e = g + next->used[TEXT_AREA]; |
| 26162 | 26169 | ||
| 26163 | while (g < e) | 26170 | while (g < e) |
| 26164 | { | 26171 | { |
| 26165 | if ((BUFFERP (g->object) || INTEGERP (g->object)) | 26172 | if (((BUFFERP (g->object) || INTEGERP (g->object)) |
| 26166 | && start_charpos <= g->charpos && g->charpos < end_charpos) | 26173 | && (start_charpos <= g->charpos && g->charpos < end_charpos |
| 26174 | /* If the buffer position of the first glyph in | ||
| 26175 | the row is equal to END_CHARPOS, it means | ||
| 26176 | the last character to be highlighted is the | ||
| 26177 | newline of ROW, and we must consider NEXT as | ||
| 26178 | END, not END+1. */ | ||
| 26179 | || ((!next->reversed_p && g == s | ||
| 26180 | || next->reversed_p && g == e - 1) | ||
| 26181 | && (g->charpos == end_charpos | ||
| 26182 | /* Special case for when NEXT is an | ||
| 26183 | empty line at ZV. */ | ||
| 26184 | || (g->charpos == -1 | ||
| 26185 | && !row->ends_at_zv_p | ||
| 26186 | && next_start == end_charpos))))) | ||
| 26187 | /* A glyph that comes from DISP_STRING is by | ||
| 26188 | definition to be highlighted. */ | ||
| 26189 | || EQ (g->object, disp_string)) | ||
| 26167 | break; | 26190 | break; |
| 26168 | g++; | 26191 | g++; |
| 26169 | } | 26192 | } |
| @@ -26172,6 +26195,13 @@ rows_from_pos_range (struct window *w, | |||
| 26172 | *end = row; | 26195 | *end = row; |
| 26173 | break; | 26196 | break; |
| 26174 | } | 26197 | } |
| 26198 | /* The first row that ends at ZV must be the last to be | ||
| 26199 | highlighted. */ | ||
| 26200 | else if (next->ends_at_zv_p) | ||
| 26201 | { | ||
| 26202 | *end = next; | ||
| 26203 | break; | ||
| 26204 | } | ||
| 26175 | } | 26205 | } |
| 26176 | } | 26206 | } |
| 26177 | } | 26207 | } |
| @@ -26207,7 +26237,7 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 26207 | xassert (NILP (after_string) || STRINGP (after_string)); | 26237 | xassert (NILP (after_string) || STRINGP (after_string)); |
| 26208 | 26238 | ||
| 26209 | /* Find the rows corresponding to START_CHARPOS and END_CHARPOS. */ | 26239 | /* Find the rows corresponding to START_CHARPOS and END_CHARPOS. */ |
| 26210 | rows_from_pos_range (w, start_charpos, end_charpos, &r1, &r2); | 26240 | rows_from_pos_range (w, start_charpos, end_charpos, disp_string, &r1, &r2); |
| 26211 | if (r1 == NULL) | 26241 | if (r1 == NULL) |
| 26212 | r1 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); | 26242 | r1 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); |
| 26213 | /* If the before-string or display-string contains newlines, | 26243 | /* If the before-string or display-string contains newlines, |
| @@ -26485,6 +26515,19 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 26485 | } | 26515 | } |
| 26486 | x += end->pixel_width; | 26516 | x += end->pixel_width; |
| 26487 | } | 26517 | } |
| 26518 | /* If we exited the above loop because we arrived at the last | ||
| 26519 | glyph of the row, and its buffer position is still not in | ||
| 26520 | range, it means the last character in range is the preceding | ||
| 26521 | newline. Bump the end column and x values to get past the | ||
| 26522 | last glyph. */ | ||
| 26523 | if (end == glyph | ||
| 26524 | && BUFFERP (end->object) | ||
| 26525 | && (end->charpos < start_charpos | ||
| 26526 | || end->charpos >= end_charpos)) | ||
| 26527 | { | ||
| 26528 | x += end->pixel_width; | ||
| 26529 | ++end; | ||
| 26530 | } | ||
| 26488 | hlinfo->mouse_face_end_x = x; | 26531 | hlinfo->mouse_face_end_x = x; |
| 26489 | hlinfo->mouse_face_end_col = end - r2->glyphs[TEXT_AREA]; | 26532 | hlinfo->mouse_face_end_col = end - r2->glyphs[TEXT_AREA]; |
| 26490 | } | 26533 | } |