diff options
| author | Stefan Monnier | 2010-08-11 07:42:48 +0200 |
|---|---|---|
| committer | Stefan Monnier | 2010-08-11 07:42:48 +0200 |
| commit | c566235d981eba73c88bbff00b6a1d88360b6e9f (patch) | |
| tree | f8d653add3570fe750a83d1123ed35022e0bf4ef /src/editfns.c | |
| parent | 0bfdb86f425a88fe43ebc88851c6f9a6418e1862 (diff) | |
| parent | 490b89acab3e759426ede25c31c94268df55e925 (diff) | |
| download | emacs-c566235d981eba73c88bbff00b6a1d88360b6e9f.tar.gz emacs-c566235d981eba73c88bbff00b6a1d88360b6e9f.zip | |
Merge from trunk
Diffstat (limited to 'src/editfns.c')
| -rw-r--r-- | src/editfns.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/editfns.c b/src/editfns.c index 805dba60446..1bd6682c3b6 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -90,14 +90,13 @@ extern size_t emacs_strftimeu (char *, size_t, const char *, | |||
| 90 | const struct tm *, int); | 90 | const struct tm *, int); |
| 91 | 91 | ||
| 92 | #ifdef WINDOWSNT | 92 | #ifdef WINDOWSNT |
| 93 | extern Lisp_Object w32_get_internal_run_time (); | 93 | extern Lisp_Object w32_get_internal_run_time (void); |
| 94 | #endif | 94 | #endif |
| 95 | 95 | ||
| 96 | static int tm_diff (struct tm *, struct tm *); | 96 | static int tm_diff (struct tm *, struct tm *); |
| 97 | static void find_field (Lisp_Object, Lisp_Object, Lisp_Object, int *, Lisp_Object, int *); | 97 | static void find_field (Lisp_Object, Lisp_Object, Lisp_Object, int *, Lisp_Object, int *); |
| 98 | static void update_buffer_properties (int, int); | 98 | static void update_buffer_properties (int, int); |
| 99 | static Lisp_Object region_limit (int); | 99 | static Lisp_Object region_limit (int); |
| 100 | int lisp_time_argument (Lisp_Object, time_t *, int *); | ||
| 101 | static size_t emacs_memftimeu (char *, size_t, const char *, | 100 | static size_t emacs_memftimeu (char *, size_t, const char *, |
| 102 | size_t, const struct tm *, int); | 101 | size_t, const struct tm *, int); |
| 103 | static void general_insert_function (void (*) (const unsigned char *, EMACS_INT), | 102 | static void general_insert_function (void (*) (const unsigned char *, EMACS_INT), |
| @@ -320,7 +319,6 @@ The return value is POSITION. */) | |||
| 320 | static Lisp_Object | 319 | static Lisp_Object |
| 321 | region_limit (int beginningp) | 320 | region_limit (int beginningp) |
| 322 | { | 321 | { |
| 323 | extern Lisp_Object Vmark_even_if_inactive; /* Defined in callint.c. */ | ||
| 324 | Lisp_Object m; | 322 | Lisp_Object m; |
| 325 | 323 | ||
| 326 | if (!NILP (Vtransient_mark_mode) | 324 | if (!NILP (Vtransient_mark_mode) |
| @@ -338,14 +336,14 @@ region_limit (int beginningp) | |||
| 338 | } | 336 | } |
| 339 | 337 | ||
| 340 | DEFUN ("region-beginning", Fregion_beginning, Sregion_beginning, 0, 0, 0, | 338 | DEFUN ("region-beginning", Fregion_beginning, Sregion_beginning, 0, 0, 0, |
| 341 | doc: /* Return position of beginning of region, as an integer. */) | 339 | doc: /* Return the integer value of point or mark, whichever is smaller. */) |
| 342 | (void) | 340 | (void) |
| 343 | { | 341 | { |
| 344 | return region_limit (1); | 342 | return region_limit (1); |
| 345 | } | 343 | } |
| 346 | 344 | ||
| 347 | DEFUN ("region-end", Fregion_end, Sregion_end, 0, 0, 0, | 345 | DEFUN ("region-end", Fregion_end, Sregion_end, 0, 0, 0, |
| 348 | doc: /* Return position of end of region, as an integer. */) | 346 | doc: /* Return the integer value of point or mark, whichever is larger. */) |
| 349 | (void) | 347 | (void) |
| 350 | { | 348 | { |
| 351 | return region_limit (0); | 349 | return region_limit (0); |
| @@ -807,6 +805,9 @@ DEFUN ("line-beginning-position", | |||
| 807 | With argument N not nil or 1, move forward N - 1 lines first. | 805 | With argument N not nil or 1, move forward N - 1 lines first. |
| 808 | If scan reaches end of buffer, return that position. | 806 | If scan reaches end of buffer, return that position. |
| 809 | 807 | ||
| 808 | The returned position is of the first character in the logical order, | ||
| 809 | i.e. the one that has the smallest character position. | ||
| 810 | |||
| 810 | This function constrains the returned position to the current field | 811 | This function constrains the returned position to the current field |
| 811 | unless that would be on a different line than the original, | 812 | unless that would be on a different line than the original, |
| 812 | unconstrained result. If N is nil or 1, and a front-sticky field | 813 | unconstrained result. If N is nil or 1, and a front-sticky field |
| @@ -845,6 +846,9 @@ DEFUN ("line-end-position", Fline_end_position, Sline_end_position, 0, 1, 0, | |||
| 845 | With argument N not nil or 1, move forward N - 1 lines first. | 846 | With argument N not nil or 1, move forward N - 1 lines first. |
| 846 | If scan reaches end of buffer, return that position. | 847 | If scan reaches end of buffer, return that position. |
| 847 | 848 | ||
| 849 | The returned position is of the last character in the logical order, | ||
| 850 | i.e. the character whose buffer position is the largest one. | ||
| 851 | |||
| 848 | This function constrains the returned position to the current field | 852 | This function constrains the returned position to the current field |
| 849 | unless that would be on a different line than the original, | 853 | unless that would be on a different line than the original, |
| 850 | unconstrained result. If N is nil or 1, and a rear-sticky field ends | 854 | unconstrained result. If N is nil or 1, and a rear-sticky field ends |
| @@ -1400,16 +1404,16 @@ DEFUN ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0, | |||
| 1400 | 1404 | ||
| 1401 | /* For the benefit of callers who don't want to include lisp.h */ | 1405 | /* For the benefit of callers who don't want to include lisp.h */ |
| 1402 | 1406 | ||
| 1403 | char * | 1407 | const char * |
| 1404 | get_system_name (void) | 1408 | get_system_name (void) |
| 1405 | { | 1409 | { |
| 1406 | if (STRINGP (Vsystem_name)) | 1410 | if (STRINGP (Vsystem_name)) |
| 1407 | return (char *) SDATA (Vsystem_name); | 1411 | return (const char *) SDATA (Vsystem_name); |
| 1408 | else | 1412 | else |
| 1409 | return ""; | 1413 | return ""; |
| 1410 | } | 1414 | } |
| 1411 | 1415 | ||
| 1412 | char * | 1416 | const char * |
| 1413 | get_operating_system_release (void) | 1417 | get_operating_system_release (void) |
| 1414 | { | 1418 | { |
| 1415 | if (STRINGP (Voperating_system_release)) | 1419 | if (STRINGP (Voperating_system_release)) |
| @@ -1815,7 +1819,7 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */) | |||
| 1815 | else | 1819 | else |
| 1816 | { | 1820 | { |
| 1817 | char tzbuf[100]; | 1821 | char tzbuf[100]; |
| 1818 | char *tzstring; | 1822 | const char *tzstring; |
| 1819 | char **oldenv = environ, **newenv; | 1823 | char **oldenv = environ, **newenv; |
| 1820 | 1824 | ||
| 1821 | if (EQ (zone, Qt)) | 1825 | if (EQ (zone, Qt)) |
| @@ -1997,7 +2001,7 @@ If TZ is nil, use implementation-defined default time zone information. | |||
| 1997 | If TZ is t, use Universal Time. */) | 2001 | If TZ is t, use Universal Time. */) |
| 1998 | (Lisp_Object tz) | 2002 | (Lisp_Object tz) |
| 1999 | { | 2003 | { |
| 2000 | char *tzstring; | 2004 | const char *tzstring; |
| 2001 | 2005 | ||
| 2002 | /* When called for the first time, save the original TZ. */ | 2006 | /* When called for the first time, save the original TZ. */ |
| 2003 | if (!environbuf) | 2007 | if (!environbuf) |
| @@ -3382,9 +3386,6 @@ usage: (message-box FORMAT-STRING &rest ARGS) */) | |||
| 3382 | return val; | 3386 | return val; |
| 3383 | } | 3387 | } |
| 3384 | } | 3388 | } |
| 3385 | #ifdef HAVE_MENUS | ||
| 3386 | extern Lisp_Object last_nonmenu_event; | ||
| 3387 | #endif | ||
| 3388 | 3389 | ||
| 3389 | DEFUN ("message-or-box", Fmessage_or_box, Smessage_or_box, 1, MANY, 0, | 3390 | DEFUN ("message-or-box", Fmessage_or_box, Smessage_or_box, 1, MANY, 0, |
| 3390 | doc: /* Display a message in a dialog box or in the echo area. | 3391 | doc: /* Display a message in a dialog box or in the echo area. |
| @@ -4554,7 +4555,6 @@ of the buffer being accessed. */); | |||
| 4554 | 4555 | ||
| 4555 | { | 4556 | { |
| 4556 | Lisp_Object obuf; | 4557 | Lisp_Object obuf; |
| 4557 | extern Lisp_Object Vprin1_to_string_buffer; | ||
| 4558 | obuf = Fcurrent_buffer (); | 4558 | obuf = Fcurrent_buffer (); |
| 4559 | /* Do this here, because init_buffer_once is too early--it won't work. */ | 4559 | /* Do this here, because init_buffer_once is too early--it won't work. */ |
| 4560 | Fset_buffer (Vprin1_to_string_buffer); | 4560 | Fset_buffer (Vprin1_to_string_buffer); |