Mercurial > hg > xemacs-beta
comparison src/buffer.c @ 2:ac2d302a0011 r19-15b2
Import from CVS: tag r19-15b2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:46:35 +0200 |
parents | 376386a54a3c |
children | 9ee227acff29 |
comparison
equal
deleted
inserted
replaced
1:c0c6a60d29db | 2:ac2d302a0011 |
---|---|
1430 return Qt; | 1430 return Qt; |
1431 } | 1431 } |
1432 | 1432 |
1433 DEFUN ("record-buffer", Frecord_buffer, | 1433 DEFUN ("record-buffer", Frecord_buffer, |
1434 Srecord_buffer, 1, 1, 0 /* | 1434 Srecord_buffer, 1, 1, 0 /* |
1435 Put the element for buffer BUF at the front of buffer-alist. | 1435 Place buffer BUF first in the buffer order. |
1436 This is done when a buffer is selected \"visibly\". | 1436 Call this function when a buffer is selected \"visibly\". |
1437 It keeps buffer-alist in the order of recency of selection | 1437 |
1438 so that other-buffer will return something nice. | 1438 This function changes the global buffer order and the per-frame buffer |
1439 order for the selected frame. The buffer order keeps track of recency | |
1440 of selection so that `other-buffer' will return a recently selected | |
1441 buffer. See `other-buffer' for more information. | |
1439 */ ) | 1442 */ ) |
1440 (buf) | 1443 (buf) |
1441 Lisp_Object buf; | 1444 Lisp_Object buf; |
1442 { | 1445 { |
1443 REGISTER Lisp_Object lynk, prev; | 1446 REGISTER Lisp_Object lynk, prev; |
1964 Vbuffer_alist = Qnil; | 1967 Vbuffer_alist = Qnil; |
1965 current_buffer = 0; | 1968 current_buffer = 0; |
1966 | 1969 |
1967 DEFVAR_LISP ("change-major-mode-hook", &Vchange_major_mode_hook /* | 1970 DEFVAR_LISP ("change-major-mode-hook", &Vchange_major_mode_hook /* |
1968 List of hooks to be run before killing local variables in a buffer. | 1971 List of hooks to be run before killing local variables in a buffer. |
1969 This should be used by by any mode that temporarily alters the contents or | 1972 This should be used by any mode that temporarily alters the contents or |
1970 the read-only state of the buffer. See also `kill-all-local-variables'. | 1973 the read-only state of the buffer. See also `kill-all-local-variables'. |
1971 */ ); | 1974 */ ); |
1972 Vchange_major_mode_hook = Qnil; | 1975 Vchange_major_mode_hook = Qnil; |
1973 | 1976 |
1974 DEFVAR_BOOL ("find-file-compare-truenames", &find_file_compare_truenames /* | 1977 DEFVAR_BOOL ("find-file-compare-truenames", &find_file_compare_truenames /* |
2463 Automatically becomes buffer-local when set in any fashion. | 2466 Automatically becomes buffer-local when set in any fashion. |
2464 | 2467 |
2465 Note that this is overridden by the variable | 2468 Note that this is overridden by the variable |
2466 `truncate-partial-width-windows' if that variable is non-nil | 2469 `truncate-partial-width-windows' if that variable is non-nil |
2467 and this buffer is not full-frame width. | 2470 and this buffer is not full-frame width. |
2468 */ , | 2471 */ , redisplay_variable_changed); |
2469 redisplay_variable_changed); | |
2470 | 2472 |
2471 DEFVAR_BUFFER_LOCAL ("default-directory", directory /* | 2473 DEFVAR_BUFFER_LOCAL ("default-directory", directory /* |
2472 Name of default directory of current buffer. Should end with slash. | 2474 Name of default directory of current buffer. Should end with slash. |
2473 Each buffer has its own value of this variable. | 2475 Each buffer has its own value of this variable. |
2474 */ ); | 2476 */ ); |
2758 && dotstat.st_ino == pwdstat.st_ino | 2760 && dotstat.st_ino == pwdstat.st_ino |
2759 && dotstat.st_dev == pwdstat.st_dev | 2761 && dotstat.st_dev == pwdstat.st_dev |
2760 && (int) strlen (pwd) < MAXPATHLEN) | 2762 && (int) strlen (pwd) < MAXPATHLEN) |
2761 strcpy (buf, pwd); | 2763 strcpy (buf, pwd); |
2762 else if (getwd (buf) == 0) | 2764 else if (getwd (buf) == 0) |
2763 fatal ("`getwd' failed: %s\n", buf); | 2765 fatal ("`getwd' failed: errno %d\n", errno); |
2764 | 2766 |
2765 #ifndef VMS | 2767 #ifndef VMS |
2766 /* Maybe this should really use some standard subroutine | 2768 /* Maybe this should really use some standard subroutine |
2767 whose definition is filename syntax dependent. */ | 2769 whose definition is filename syntax dependent. */ |
2768 rc = strlen (buf); | 2770 rc = strlen (buf); |