Mercurial > hg > xemacs-beta
comparison lisp/w3/w3-sysdp.el @ 80:1ce6082ce73f r20-0b90
Import from CVS: tag r20-0b90
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:06:37 +0200 |
parents | 131b0175ea99 |
children | 6a378aca36af |
comparison
equal
deleted
inserted
replaced
79:5b0a5bbffab6 | 80:1ce6082ce73f |
---|---|
1 ;;; sysdep.el --- consolidate Emacs-version dependencies in one file. | 1 ;;; sysdep.el --- consolidate Emacs-version dependencies in one file. |
2 | 2 |
3 ;; Copyright (C) 1995 Ben Wing. | 3 ;; Copyright (C) 1995 Ben Wing. |
4 | 4 |
5 ;; Author: Ben Wing <wing@666.com> | 5 ;; Author: Ben Wing <wing@666.com>, William Perry <wmperry@aventail.com> |
6 ;; Keywords: lisp, tools | 6 ;; Keywords: lisp, tools |
7 ;; Version: 0.001 | 7 ;; Version: 0.003 |
8 | 8 |
9 ;; The purpose of this file is to eliminate the cruftiness that | 9 ;; The purpose of this file is to eliminate the cruftiness that |
10 ;; would otherwise be required of packages that want to run on multiple | 10 ;; would otherwise be required of packages that want to run on multiple |
11 ;; versions of Emacs. The idea is that we make it look like we're running | 11 ;; versions of Emacs. The idea is that we make it look like we're running |
12 ;; the latest version of XEmacs (currently 19.12) by emulating all the | 12 ;; the latest version of XEmacs (currently 19.12) by emulating all the |
48 ;; You may well discover deficiencies in this file as you use it. | 48 ;; You may well discover deficiencies in this file as you use it. |
49 ;; The preferable way of dealing with this is to send me a patch | 49 ;; The preferable way of dealing with this is to send me a patch |
50 ;; to sysdep.el; that way, the collective body of knowledge gets | 50 ;; to sysdep.el; that way, the collective body of knowledge gets |
51 ;; increased. | 51 ;; increased. |
52 | 52 |
53 ;; DO NOT load this file with `require'. | |
54 ;; DO NOT put a `provide' statement in this file. | |
55 | |
56 ;; IMPORTANT: leave the version string in the format X.XXX (e.g. 1.001) | 53 ;; IMPORTANT: leave the version string in the format X.XXX (e.g. 1.001) |
57 ;; so that string comparisons to other versions work properly. | 54 ;; so that string comparisons to other versions work properly. |
58 | 55 |
59 (defconst sysdep-potential-version "0.002") | 56 (defconst sysdep-potential-version "0.003") |
60 | |
61 (if (and (boundp 'sysdep-version) | |
62 (not (string-lessp sysdep-version sysdep-potential-version))) | |
63 ;; if a more recent version of sysdep was already loaded, | |
64 ;; or if the same package is loaded again, don't load. | |
65 nil | |
66 | |
67 (defconst sysdep-version sysdep-potential-version) | |
68 | 57 |
69 ;; this macro means: define the function, but only if either it | 58 ;; this macro means: define the function, but only if either it |
70 ;; wasn't bound before, or the supplied binding comes from an older | 59 ;; wasn't bound before, or the supplied binding comes from an older |
71 ;; version of sysdep.el. That way, user-supplied bindings don't | 60 ;; version of sysdep.el. That way, user-supplied bindings don't |
72 ;; get overridden. | 61 ;; get overridden. |
75 ;; esp. since you can do load-time conditionalizing and can | 64 ;; esp. since you can do load-time conditionalizing and can |
76 ;; optionally leave the function undefined. (e.g. frame functions | 65 ;; optionally leave the function undefined. (e.g. frame functions |
77 ;; in v18.) | 66 ;; in v18.) |
78 | 67 |
79 (defmacro sysdep-defun (function &rest everything-else) | 68 (defmacro sysdep-defun (function &rest everything-else) |
80 (` (cond ((or (not (fboundp (quote (, function)))) | 69 (` (cond ((and (not (fboundp (quote (, function)))) |
81 (get (quote (, function)) 'sysdep-defined-this)) | 70 (or |
82 (put (quote (, function)) 'sysdep-defined-this t) | 71 (not |
72 (stringp (get (quote (, function)) 'sysdep-defined-this))) | |
73 (and (get (quote (, function)) 'sysdep-defined-this) | |
74 (string-lessp | |
75 (get (quote (, function)) 'sysdep-defined-this) | |
76 sysdep-potential-version)))) | |
77 (put (quote (, function)) 'sysdep-defined-this | |
78 sysdep-potential-version) | |
83 (defun (, function) (,@ everything-else)))))) | 79 (defun (, function) (,@ everything-else)))))) |
84 | 80 |
85 (defmacro sysdep-defvar (function &rest everything-else) | 81 (defmacro sysdep-defvar (function &rest everything-else) |
86 (` (cond ((or (not (boundp (quote (, function)))) | 82 (` (cond ((and (not (boundp (quote (, function)))) |
87 (get (quote (, function)) 'sysdep-defined-this)) | 83 (or |
84 (not | |
85 (stringp (get (quote (, function)) 'sysdep-defined-this))) | |
86 (and (get (quote (, function)) 'sysdep-defined-this) | |
87 (string-lessp | |
88 (get (quote (, function)) 'sysdep-defined-this) | |
89 sysdep-potential-version)))) | |
88 (put (quote (, function)) 'sysdep-defined-this t) | 90 (put (quote (, function)) 'sysdep-defined-this t) |
89 (defvar (, function) (,@ everything-else)))))) | 91 (defvar (, function) (,@ everything-else)))))) |
90 | 92 |
91 (defmacro sysdep-defconst (function &rest everything-else) | 93 (defmacro sysdep-defconst (function &rest everything-else) |
92 (` (cond ((or (not (boundp (quote (, function)))) | 94 (` (cond ((and (not (boundp (quote (, function)))) |
93 (get (quote (, function)) 'sysdep-defined-this)) | 95 (or |
96 (not | |
97 (stringp (get (quote (, function)) 'sysdep-defined-this))) | |
98 (and (get (quote (, function)) 'sysdep-defined-this) | |
99 (string-lessp | |
100 (get (quote (, function)) 'sysdep-defined-this) | |
101 sysdep-potential-version)))) | |
94 (put (quote (, function)) 'sysdep-defined-this t) | 102 (put (quote (, function)) 'sysdep-defined-this t) |
95 (defconst (, function) (,@ everything-else)))))) | 103 (defconst (, function) (,@ everything-else)))))) |
96 | 104 |
97 ;; similar for fset and defalias. No need to quote as the argument | 105 ;; similar for fset and defalias. No need to quote as the argument |
98 ;; is already quoted. | 106 ;; is already quoted. |
99 | 107 |
100 (defmacro sysdep-fset (function def) | 108 (defmacro sysdep-fset (function def) |
101 (` (cond ((and (or (not (fboundp (, function))) | 109 (` (cond ((and (not (fboundp (, function))) |
102 (get (, function) 'sysdep-defined-this)) | 110 (or (not (stringp |
111 (get (, function) 'sysdep-defined-this))) | |
112 (and (get (, function) 'sysdep-defined-this) | |
113 (string-lessp | |
114 (get (, function) 'sysdep-defined-this) | |
115 sysdep-potential-version))) | |
103 (, def)) | 116 (, def)) |
104 (put (, function) 'sysdep-defined-this t) | 117 (put (, function) 'sysdep-defined-this t) |
105 (fset (, function) (, def)))))) | 118 (fset (, function) (, def)))))) |
106 | 119 |
107 (defmacro sysdep-defalias (function def) | 120 (defmacro sysdep-defalias (function def) |
108 (` (cond ((and (or (not (fboundp (, function))) | 121 (` (cond ((and (not (fboundp (, function))) |
109 (get (, function) 'sysdep-defined-this)) | 122 (or (not (stringp |
123 (get (, function) 'sysdep-defined-this))) | |
124 (and (get (, function) 'sysdep-defined-this) | |
125 (string-lessp | |
126 (get (, function) 'sysdep-defined-this) | |
127 sysdep-potential-version))) | |
110 (, def) | 128 (, def) |
111 (or (listp (, def)) | 129 (or (listp (, def)) |
112 (and (symbolp (, def)) | 130 (and (symbolp (, def)) |
113 (fboundp (, def))))) | 131 (fboundp (, def))))) |
114 (put (, function) 'sysdep-defined-this t) | 132 (put (, function) 'sysdep-defined-this t) |
260 (sysdep-defalias 'x-set-frame-pointer 'x-set-screen-pointer) | 278 (sysdep-defalias 'x-set-frame-pointer 'x-set-screen-pointer) |
261 (sysdep-defalias 'x-display-color-p 'x-color-display-p) | 279 (sysdep-defalias 'x-display-color-p 'x-color-display-p) |
262 (sysdep-defalias 'x-display-grayscale-p 'x-grayscale-display-p) | 280 (sysdep-defalias 'x-display-grayscale-p 'x-grayscale-display-p) |
263 (sysdep-defalias 'menu-event-p 'misc-user-event-p) | 281 (sysdep-defalias 'menu-event-p 'misc-user-event-p) |
264 | 282 |
265 (sysdep-defun add-submenu (menu-path submenu &optional before) | 283 ;; WMP - commention these out so that Emacs 19 doesn't get screwed by them. |
266 "Add a menu to the menubar or one of its submenus. | 284 ;; In particular, this makes the 'custom' package blow up quite well. |
267 If the named menu exists already, it is changed. | 285 ;;(sysdep-defun add-submenu (menu-path submenu &optional before) |
268 MENU-PATH identifies the menu under which the new menu should be inserted. | 286 ;; "Add a menu to the menubar or one of its submenus. |
269 It is a list of strings; for example, (\"File\") names the top-level \"File\" | 287 ;;If the named menu exists already, it is changed. |
270 menu. (\"File\" \"Foo\") names a hypothetical submenu of \"File\". | 288 ;;MENU-PATH identifies the menu under which the new menu should be inserted. |
271 If MENU-PATH is nil, then the menu will be added to the menubar itself. | 289 ;; It is a list of strings; for example, (\"File\") names the top-level \"File\" |
272 SUBMENU is the new menu to add. | 290 ;; menu. (\"File\" \"Foo\") names a hypothetical submenu of \"File\". |
273 See the documentation of `current-menubar' for the syntax. | 291 ;; If MENU-PATH is nil, then the menu will be added to the menubar itself. |
274 BEFORE, if provided, is the name of a menu before which this menu should | 292 ;;SUBMENU is the new menu to add. |
275 be added, if this menu is not on its parent already. If the menu is already | 293 ;; See the documentation of `current-menubar' for the syntax. |
276 present, it will not be moved." | 294 ;;BEFORE, if provided, is the name of a menu before which this menu should |
277 (add-menu menu-path (car submenu) (cdr submenu) before)) | 295 ;; be added, if this menu is not on its parent already. If the menu is already |
278 | 296 ;; present, it will not be moved." |
279 (sysdep-defun add-menu-button (menu-path menu-leaf &optional before) | 297 ;; (add-menu menu-path (car submenu) (cdr submenu) before)) |
280 "Add a menu item to some menu, creating the menu first if necessary. | 298 |
281 If the named item exists already, it is changed. | 299 ;;(sysdep-defun add-menu-button (menu-path menu-leaf &optional before) |
282 MENU-PATH identifies the menu under which the new menu item should be inserted. | 300 ;; "Add a menu item to some menu, creating the menu first if necessary. |
283 It is a list of strings; for example, (\"File\") names the top-level \"File\" | 301 ;;If the named item exists already, it is changed. |
284 menu. (\"File\" \"Foo\") names a hypothetical submenu of \"File\". | 302 ;;MENU-PATH identifies the menu under which the new menu item should be inserted. |
285 MENU-LEAF is a menubar leaf node. See the documentation of `current-menubar'. | 303 ;; It is a list of strings; for example, (\"File\") names the top-level \"File\" |
286 BEFORE, if provided, is the name of a menu item before which this item should | 304 ;; menu. (\"File\" \"Foo\") names a hypothetical submenu of \"File\". |
287 be added, if this item is not on the menu already. If the item is already | 305 ;;MENU-LEAF is a menubar leaf node. See the documentation of `current-menubar'. |
288 present, it will not be moved." | 306 ;;BEFORE, if provided, is the name of a menu item before which this item should |
289 (add-menu-item menu-path (aref menu-leaf 0) (aref menu-leaf 1) | 307 ;; be added, if this item is not on the menu already. If the item is already |
290 (aref menu-leaf 2) before)) | 308 ;; present, it will not be moved." |
309 ;; (add-menu-item menu-path (aref menu-leaf 0) (aref menu-leaf 1) | |
310 ;; (aref menu-leaf 2) before)) | |
291 | 311 |
292 (sysdep-defun make-glyph (&optional spec-list) | 312 (sysdep-defun make-glyph (&optional spec-list) |
293 (if (and spec-list (cdr-safe (assq 'x spec-list))) | 313 (if (and spec-list (cdr-safe (assq 'x spec-list))) |
294 (make-pixmap (cdr-safe (assq 'x spec-list))))) | 314 (make-pixmap (cdr-safe (assq 'x spec-list))))) |
295 | 315 |
296 (sysdep-defalias 'face-list 'list-faces) | 316 (sysdep-defalias 'face-list 'list-faces) |
317 | |
318 (sysdep-defun set-keymap-parent (keymap new-parent) | |
319 (let ((tail keymap)) | |
320 (while (and tail (cdr tail) (not (eq (car (cdr tail)) 'keymap))) | |
321 (setq tail (cdr tail))) | |
322 (if tail | |
323 (setcdr tail new-parent)))) | |
297 | 324 |
298 (sysdep-defun facep (face) | 325 (sysdep-defun facep (face) |
299 "Return t if X is a face name or an internal face vector." | 326 "Return t if X is a face name or an internal face vector." |
300 ;; CAUTION!!! This is Emacs 19.x, for x <= 28, specific | 327 ;; CAUTION!!! This is Emacs 19.x, for x <= 28, specific |
301 ;; I know of no version of Lucid Emacs or XEmacs that did not have | 328 ;; I know of no version of Lucid Emacs or XEmacs that did not have |
302 ;; facep. Even if they did, they are unsupported, so big deal. | 329 ;; facep. Even if they did, they are unsupported, so big deal. |
303 (and (or (internal-facep face) | 330 (if (not window-system) |
304 (and (symbolp face) (assq face global-face-data))) | 331 nil ; FIXME if FSF ever does TTY faces |
305 t)) | 332 (and (or (internal-facep face) |
333 (and (symbolp face) (assq face global-face-data))) | |
334 t))) | |
306 | 335 |
307 (sysdep-defun set-face-property (face property value &optional locale | 336 (sysdep-defun set-face-property (face property value &optional locale |
308 tag-set how-to-add) | 337 tag-set how-to-add) |
309 "Change a property of FACE." | 338 "Change a property of FACE." |
310 (and (symbolp face) | 339 (and (symbolp face) |
311 (put face property value))) | 340 (put face property value))) |
312 | 341 |
313 (sysdep-defun face-property (face property &optional locale tag-set exact-p) | 342 (sysdep-defun face-property (face property &optional locale tag-set exact-p) |
314 "Return FACE's value of the given PROPERTY." | 343 "Return FACE's value of the given PROPERTY." |
315 (and (symbolp face) (get face property))) | 344 (and (symbolp face) (get face property))) |
345 | |
346 ;;; Additional text property functions. | |
347 | |
348 ;; The following three text property functions are not generally available (and | |
349 ;; it's not certain that they should be) so they are inlined for speed. | |
350 ;; The case for `fillin-text-property' is simple; it may or not be generally | |
351 ;; useful. (Since it is used here, it is useful in at least one place.;-) | |
352 ;; However, the case for `append-text-property' and `prepend-text-property' is | |
353 ;; more complicated. Should they remove duplicate property values or not? If | |
354 ;; so, should the first or last duplicate item remain? Or the one that was | |
355 ;; added? In our implementation, the first duplicate remains. | |
356 | |
357 (sysdep-defun fillin-text-property (start end setprop markprop value &optional object) | |
358 "Fill in one property of the text from START to END. | |
359 Arguments PROP and VALUE specify the property and value to put where none are | |
360 already in place. Therefore existing property values are not overwritten. | |
361 Optional argument OBJECT is the string or buffer containing the text." | |
362 (let ((start (text-property-any start end markprop nil object)) next) | |
363 (while start | |
364 (setq next (next-single-property-change start markprop object end)) | |
365 (put-text-property start next setprop value object) | |
366 (put-text-property start next markprop value object) | |
367 (setq start (text-property-any next end markprop nil object))))) | |
368 | |
369 ;; This function (from simon's unique.el) is rewritten and inlined for speed. | |
370 ;(defun unique (list function) | |
371 ; "Uniquify LIST, deleting elements using FUNCTION. | |
372 ;Return the list with subsequent duplicate items removed by side effects. | |
373 ;FUNCTION is called with an element of LIST and a list of elements from LIST, | |
374 ;and should return the list of elements with occurrences of the element removed, | |
375 ;i.e., a function such as `delete' or `delq'. | |
376 ;This function will work even if LIST is unsorted. See also `uniq'." | |
377 ; (let ((list list)) | |
378 ; (while list | |
379 ; (setq list (setcdr list (funcall function (car list) (cdr list)))))) | |
380 ; list) | |
381 | |
382 (sysdep-defun unique (list) | |
383 "Uniquify LIST, deleting elements using `delq'. | |
384 Return the list with subsequent duplicate items removed by side effects." | |
385 (let ((list list)) | |
386 (while list | |
387 (setq list (setcdr list (delq (car list) (cdr list)))))) | |
388 list) | |
389 | |
390 ;; A generalisation of `facemenu-add-face' for any property, but without the | |
391 ;; removal of inactive faces via `facemenu-discard-redundant-faces' and special | |
392 ;; treatment of `default'. Uses `unique' to remove duplicate property values. | |
393 (sysdep-defun prepend-text-property (start end prop value &optional object) | |
394 "Prepend to one property of the text from START to END. | |
395 Arguments PROP and VALUE specify the property and value to prepend to the value | |
396 already in place. The resulting property values are always lists, and unique. | |
397 Optional argument OBJECT is the string or buffer containing the text." | |
398 (let ((val (if (listp value) value (list value))) next prev) | |
399 (while (/= start end) | |
400 (setq next (next-single-property-change start prop object end) | |
401 prev (get-text-property start prop object)) | |
402 (put-text-property | |
403 start next prop | |
404 (unique (append val (if (listp prev) prev (list prev)))) | |
405 object) | |
406 (setq start next)))) | |
407 | |
408 (sysdep-defun append-text-property (start end prop value &optional object) | |
409 "Append to one property of the text from START to END. | |
410 Arguments PROP and VALUE specify the property and value to append to the value | |
411 already in place. The resulting property values are always lists, and unique. | |
412 Optional argument OBJECT is the string or buffer containing the text." | |
413 (let ((val (if (listp value) value (list value))) next prev) | |
414 (while (/= start end) | |
415 (setq next (next-single-property-change start prop object end) | |
416 prev (get-text-property start prop object)) | |
417 (put-text-property | |
418 start next prop | |
419 (unique (append (if (listp prev) prev (list prev)) val)) | |
420 object) | |
421 (setq start next)))) | |
316 | 422 |
317 ;; Property list functions | 423 ;; Property list functions |
318 ;; | 424 ;; |
319 (sysdep-defun plist-put (plist prop val) | 425 (sysdep-defun plist-put (plist prop val) |
320 "Change value in PLIST of PROP to VAL. | 426 "Change value in PLIST of PROP to VAL. |
334 "Extract a value from a property list. | 440 "Extract a value from a property list. |
335 PLIST is a property list, which is a list of the form | 441 PLIST is a property list, which is a list of the form |
336 (PROP1 VALUE1 PROP2 VALUE2...). This function returns the value | 442 (PROP1 VALUE1 PROP2 VALUE2...). This function returns the value |
337 corresponding to the given PROP, or nil if PROP is not | 443 corresponding to the given PROP, or nil if PROP is not |
338 one of the properties on the list." | 444 one of the properties on the list." |
339 (car-safe (cdr-safe (memq prop plist)))) | 445 (while (and plist (not (eq (car plist) prop))) |
446 (setq plist (cdr (cdr plist)))) | |
447 (and plist (car (cdr plist)))) | |
340 | 448 |
341 ;; Device functions | 449 ;; Device functions |
342 ;; By wmperry@cs.indiana.edu | 450 ;; By wmperry@cs.indiana.edu |
343 ;; This is a complete implementation of all the device-* functions found in | 451 ;; This is a complete implementation of all the device-* functions found in |
344 ;; XEmacs 19.14. A 'device' for Emacs 19 is just a frame, from which we can | 452 ;; XEmacs 19.14. A 'device' for Emacs 19 is just a frame, from which we can |
372 If CONNECTION specifies an already-existing device connection, that | 480 If CONNECTION specifies an already-existing device connection, that |
373 device is simply returned; no new device is created, and PROPS | 481 device is simply returned; no new device is created, and PROPS |
374 have no effect." | 482 have no effect." |
375 (cond | 483 (cond |
376 ((and (eq type 'x) connection) | 484 ((and (eq type 'x) connection) |
377 (make-frame-on-display display props)) | 485 (make-frame-on-display connection props)) |
378 ((eq type 'x) | 486 ((eq type 'x) |
379 (make-frame props)) | 487 (make-frame props)) |
380 ((eq type 'tty) | 488 ((eq type 'tty) |
381 nil) | 489 nil) |
382 (t | 490 (t |
399 system. Not currently implemented. | 507 system. Not currently implemented. |
400 win32 A connection to a machine running Microsoft Windows NT or | 508 win32 A connection to a machine running Microsoft Windows NT or |
401 Windows 95. Not currently implemented. | 509 Windows 95. Not currently implemented. |
402 pc A direct-write MS-DOS frame. Not currently implemented. | 510 pc A direct-write MS-DOS frame. Not currently implemented. |
403 | 511 |
404 PROPS should be a plist of properties, as in the call to `make-frame'. | 512 PROPS should be an plist of properties, as in the call to `make-frame'. |
405 | 513 |
406 If a connection to CONNECTION already exists, it is reused; otherwise, | 514 If a connection to CONNECTION already exists, it is reused; otherwise, |
407 a new connection is opened." | 515 a new connection is opened." |
408 (make-device type connection props)) | 516 (make-device type connection props)) |
409 | 517 |
545 ((fboundp 'x-display-color-cells) 'x-display-color-cells) | 653 ((fboundp 'x-display-color-cells) 'x-display-color-cells) |
546 ((fboundp 'ns-display-color-cells) 'ns-display-color-celles) | 654 ((fboundp 'ns-display-color-cells) 'ns-display-color-celles) |
547 (t 'ignore))) | 655 (t 'ignore))) |
548 | 656 |
549 (sysdep-defun try-font-name (fontname &rest args) | 657 (sysdep-defun try-font-name (fontname &rest args) |
550 (car-safe (x-list-fonts fontname))) | 658 (cond |
659 ((eq window-system 'x) (car-safe (x-list-fonts fontname))) | |
660 ((eq window-system 'ns) (car-safe (ns-list-fonts fontname))) | |
661 (t nil))) | |
551 | 662 |
552 (sysdep-defalias 'device-pixel-width | 663 (sysdep-defalias 'device-pixel-width |
553 (cond | 664 (cond |
554 ((and (eq window-system 'x) (fboundp 'x-display-pixel-width)) | 665 ((and (eq window-system 'x) (fboundp 'x-display-pixel-width)) |
555 'x-display-pixel-width) | 666 'x-display-pixel-width) |
941 (lambda (error-object stream) | 1052 (lambda (error-object stream) |
942 (princ "Peculiar error " stream) | 1053 (princ "Peculiar error " stream) |
943 (prin1 error-object stream)))) | 1054 (prin1 error-object stream)))) |
944 error-object stream)) | 1055 error-object stream)) |
945 | 1056 |
1057 (sysdep-defun decode-time (&optional specified-time) | |
1058 (let* ((date (current-time-string specified-time)) | |
1059 (dateinfo (and date (timezone-parse-date date))) | |
1060 (timeinfo (and dateinfo (timezone-parse-time (aref dateinfo 3))))) | |
1061 (list (aref timeinfo 2) (aref timeinfo 1) | |
1062 (aref timeinfo 0) (aref dateinfo 2) | |
1063 (aref dateinfo 1) (aref dateinfo 0) | |
1064 "unknown" nil 0))) | |
1065 | |
946 (sysdep-defun find-face (face) | 1066 (sysdep-defun find-face (face) |
947 (car-safe (memq face (face-list)))) | 1067 (car-safe (memq face (face-list)))) |
948 | 1068 |
949 (sysdep-defun set-marker-insertion-type (marker type) | 1069 (sysdep-defun set-marker-insertion-type (marker type) |
950 "Set the insertion-type of MARKER to TYPE. | 1070 "Set the insertion-type of MARKER to TYPE. |
954 | 1074 |
955 ;; window functions | 1075 ;; window functions |
956 | 1076 |
957 ;; not defined in v18 | 1077 ;; not defined in v18 |
958 (sysdep-defun eval-buffer (bufname &optional printflag) | 1078 (sysdep-defun eval-buffer (bufname &optional printflag) |
1079 (interactive) | |
959 (save-excursion | 1080 (save-excursion |
960 (set-buffer bufname) | 1081 (set-buffer bufname) |
961 (eval-current-buffer))) | 1082 (eval-current-buffer))) |
962 | 1083 |
963 (sysdep-defun window-minibuffer-p (window) | 1084 (sysdep-defun window-minibuffer-p (window) |
967 (sysdep-defun window-live-p (window) | 1088 (sysdep-defun window-live-p (window) |
968 "Returns t if OBJ is a window which is currently visible." | 1089 "Returns t if OBJ is a window which is currently visible." |
969 (and (windowp window) | 1090 (and (windowp window) |
970 (window-point window))) | 1091 (window-point window))) |
971 | 1092 |
972 ;; this parenthesis closes the if statement at the top of the file. | 1093 (provide 'w3-sysdp) |
973 | |
974 ) | |
975 | |
976 ;; DO NOT put a provide statement here. This file should never be | |
977 ;; loaded with `require'. Use `load-library' instead. | |
978 | |
979 ;;; sysdep.el ends here | 1094 ;;; sysdep.el ends here |
980 | 1095 |
981 ;;;(sysdep.el) Local Variables: | 1096 ;;;(sysdep.el) Local Variables: |
982 ;;;(sysdep.el) eval: (put 'sysdep-defun 'lisp-indent-function 'defun) | 1097 ;;;(sysdep.el) eval: (put 'sysdep-defun 'lisp-indent-function 'defun) |
983 ;;;(sysdep.el) eval: (put 'sysdep-defalias 'lisp-indent-function 'defun) | 1098 ;;;(sysdep.el) eval: (put 'sysdep-defalias 'lisp-indent-function 'defun) |