comparison lisp/vm/vm-misc.el @ 102:a145efe76779 r20-1b3

Import from CVS: tag r20-1b3
author cvs
date Mon, 13 Aug 2007 09:15:49 +0200
parents 4be1180a9e89
children 360340f9fd5f
comparison
equal deleted inserted replaced
101:a0ec055d74dd 102:a145efe76779
106 (insert string) 106 (insert string)
107 ;; correct for VM's uses of this function--- 107 ;; correct for VM's uses of this function---
108 ;; writing out message separators 108 ;; writing out message separators
109 (setq buffer-file-type nil) 109 (setq buffer-file-type nil)
110 ;; Tell XEmacs/MULE to pick the correct newline conversion. 110 ;; Tell XEmacs/MULE to pick the correct newline conversion.
111 (and (fboundp 'set-file-coding-system) 111 (and (vm-xemacs-mule-p)
112 (set-file-coding-system 'no-conversion nil)) 112 (set-file-coding-system 'no-conversion nil))
113 (write-region (point-min) (point-max) where t 'quiet)) 113 (write-region (point-min) (point-max) where t 'quiet))
114 (and temp-buffer (kill-buffer temp-buffer)))))) 114 (and temp-buffer (kill-buffer temp-buffer))))))
115 115
116 (defmacro vm-marker (pos &optional buffer) 116 (defmacro vm-marker (pos &optional buffer)
347 (let ((case-fold-search nil)) 347 (let ((case-fold-search nil))
348 (string-match "XEmacs" emacs-version))) 348 (string-match "XEmacs" emacs-version)))
349 349
350 (defun vm-xemacs-mule-p () 350 (defun vm-xemacs-mule-p ()
351 (and (vm-xemacs-p) 351 (and (vm-xemacs-p)
352 (featurep 'mule)
352 (fboundp 'set-file-coding-system) 353 (fboundp 'set-file-coding-system)
353 (fboundp 'decode-coding-region))) 354 (fboundp 'get-coding-system)))
354 355
355 (defun vm-fsfemacs-19-p () 356 (defun vm-fsfemacs-19-p ()
356 (and (string-match "^19" emacs-version) 357 (and (string-match "^19" emacs-version)
357 (not (string-match "XEmacs\\|Lucid" emacs-version)))) 358 (not (string-match "XEmacs\\|Lucid" emacs-version))))
358 359
500 (overlay-put o 'face face))) 501 (overlay-put o 'face face)))
501 ((fboundp 'make-extent) 502 ((fboundp 'make-extent)
502 (let ((o (make-extent start end))) 503 (let ((o (make-extent start end)))
503 (set-extent-property o 'face face))))) 504 (set-extent-property o 'face face)))))
504 505
505 (defun vm-unsaved-message (&rest args)
506 (let ((message-log-max nil))
507 (apply (function message) args)))
508
509 (defun vm-default-buffer-substring-no-properties (beg end &optional buffer) 506 (defun vm-default-buffer-substring-no-properties (beg end &optional buffer)
510 (let ((s (if buffer 507 (let ((s (if buffer
511 (save-excursion 508 (save-excursion
512 (set-buffer buffer) 509 (set-buffer buffer)
513 (buffer-substring beg end)) 510 (buffer-substring beg end))