aboutsummaryrefslogtreecommitdiffstats
path: root/src/editfns.c
diff options
context:
space:
mode:
authorStefan Monnier2010-08-11 07:42:48 +0200
committerStefan Monnier2010-08-11 07:42:48 +0200
commitc566235d981eba73c88bbff00b6a1d88360b6e9f (patch)
treef8d653add3570fe750a83d1123ed35022e0bf4ef /src/editfns.c
parent0bfdb86f425a88fe43ebc88851c6f9a6418e1862 (diff)
parent490b89acab3e759426ede25c31c94268df55e925 (diff)
downloademacs-c566235d981eba73c88bbff00b6a1d88360b6e9f.tar.gz
emacs-c566235d981eba73c88bbff00b6a1d88360b6e9f.zip
Merge from trunk
Diffstat (limited to 'src/editfns.c')
-rw-r--r--src/editfns.c28
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
93extern Lisp_Object w32_get_internal_run_time (); 93extern Lisp_Object w32_get_internal_run_time (void);
94#endif 94#endif
95 95
96static int tm_diff (struct tm *, struct tm *); 96static int tm_diff (struct tm *, struct tm *);
97static void find_field (Lisp_Object, Lisp_Object, Lisp_Object, int *, Lisp_Object, int *); 97static void find_field (Lisp_Object, Lisp_Object, Lisp_Object, int *, Lisp_Object, int *);
98static void update_buffer_properties (int, int); 98static void update_buffer_properties (int, int);
99static Lisp_Object region_limit (int); 99static Lisp_Object region_limit (int);
100int lisp_time_argument (Lisp_Object, time_t *, int *);
101static size_t emacs_memftimeu (char *, size_t, const char *, 100static size_t emacs_memftimeu (char *, size_t, const char *,
102 size_t, const struct tm *, int); 101 size_t, const struct tm *, int);
103static void general_insert_function (void (*) (const unsigned char *, EMACS_INT), 102static void general_insert_function (void (*) (const unsigned char *, EMACS_INT),
@@ -320,7 +319,6 @@ The return value is POSITION. */)
320static Lisp_Object 319static Lisp_Object
321region_limit (int beginningp) 320region_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
340DEFUN ("region-beginning", Fregion_beginning, Sregion_beginning, 0, 0, 0, 338DEFUN ("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
347DEFUN ("region-end", Fregion_end, Sregion_end, 0, 0, 0, 345DEFUN ("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",
807With argument N not nil or 1, move forward N - 1 lines first. 805With argument N not nil or 1, move forward N - 1 lines first.
808If scan reaches end of buffer, return that position. 806If scan reaches end of buffer, return that position.
809 807
808The returned position is of the first character in the logical order,
809i.e. the one that has the smallest character position.
810
810This function constrains the returned position to the current field 811This function constrains the returned position to the current field
811unless that would be on a different line than the original, 812unless that would be on a different line than the original,
812unconstrained result. If N is nil or 1, and a front-sticky field 813unconstrained 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,
845With argument N not nil or 1, move forward N - 1 lines first. 846With argument N not nil or 1, move forward N - 1 lines first.
846If scan reaches end of buffer, return that position. 847If scan reaches end of buffer, return that position.
847 848
849The returned position is of the last character in the logical order,
850i.e. the character whose buffer position is the largest one.
851
848This function constrains the returned position to the current field 852This function constrains the returned position to the current field
849unless that would be on a different line than the original, 853unless that would be on a different line than the original,
850unconstrained result. If N is nil or 1, and a rear-sticky field ends 854unconstrained 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
1403char * 1407const char *
1404get_system_name (void) 1408get_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
1412char * 1416const char *
1413get_operating_system_release (void) 1417get_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.
1997If TZ is t, use Universal Time. */) 2001If 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
3386extern Lisp_Object last_nonmenu_event;
3387#endif
3388 3389
3389DEFUN ("message-or-box", Fmessage_or_box, Smessage_or_box, 1, MANY, 0, 3390DEFUN ("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);