emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/dos-w32.el


From: Francesco Potortì
Subject: [Emacs-diffs] Changes to emacs/lisp/dos-w32.el
Date: Fri, 05 Jul 2002 19:15:07 -0400

Index: emacs/lisp/dos-w32.el
diff -c emacs/lisp/dos-w32.el:1.32 emacs/lisp/dos-w32.el:1.33
*** emacs/lisp/dos-w32.el:1.32  Fri Jun  8 06:52:37 2001
--- emacs/lisp/dos-w32.el       Fri Jul  5 19:15:06 2002
***************
*** 1,4 ****
! ;;; dos-w32.el --- Functions shared among MS-DOS and W32 (NT/95) platforms
  
  ;; Copyright (C) 1996 Free Software Foundation, Inc.
  
--- 1,4 ----
! ;; dos-w32.el --- Functions shared among MS-DOS and W32 (NT/95) platforms
  
  ;; Copyright (C) 1996 Free Software Foundation, Inc.
  
***************
*** 52,61 ****
                                        ; Packers
      ("\\.\\(a\\|o\\|tar\\|z\\|gz\\|taz\\|jar\\)$" . t)
                                        ; Unix stuff
!     ("\\.tp[ulpw]$" . t)
!                                       ; Borland Pascal stuff
!     ("[:/]tags$" . nil)
!                                       ; Emacs TAGS file
      )
    "*Alist for distinguishing text files from binary files.
  Each element has the form (REGEXP . TYPE), where REGEXP is matched
--- 52,60 ----
                                        ; Packers
      ("\\.\\(a\\|o\\|tar\\|z\\|gz\\|taz\\|jar\\)$" . t)
                                        ; Unix stuff
!     ("\\.sx[dmicw]$" . t)             ; Open office
!     ("\\.tp[ulpw]$" . t)              ; borland Pascal stuff
!     ("[:/]tags$" . nil)                       ; emacs TAGS file
      )
    "*Alist for distinguishing text files from binary files.
  Each element has the form (REGEXP . TYPE), where REGEXP is matched
***************
*** 124,130 ****
        (target)
        (binary nil) (text nil)
        (undecided nil) (undecided-unix nil))
!     (cond ((eq op 'insert-file-contents) 
           (setq target (nth 1 command))
           ;; First check for a file name that indicates
           ;; it is truly binary.
--- 123,129 ----
        (target)
        (binary nil) (text nil)
        (undecided nil) (undecided-unix nil))
!     (cond ((eq op 'insert-file-contents)
           (setq target (nth 1 command))
           ;; First check for a file name that indicates
           ;; it is truly binary.
***************
*** 158,170 ****
  
  (modify-coding-system-alist 'file "" 'find-buffer-file-type-coding-system)
  
! (defun find-file-binary (filename) 
    "Visit file FILENAME and treat it as binary."
    (interactive "FFind file binary: ")
    (let ((file-name-buffer-file-type-alist '(("" . t))))
      (find-file filename)))
  
! (defun find-file-text (filename) 
    "Visit file FILENAME and treat it as a text file."
    (interactive "FFind file text: ")
    (let ((file-name-buffer-file-type-alist '(("" . nil))))
--- 157,169 ----
  
  (modify-coding-system-alist 'file "" 'find-buffer-file-type-coding-system)
  
! (defun find-file-binary (filename)
    "Visit file FILENAME and treat it as binary."
    (interactive "FFind file binary: ")
    (let ((file-name-buffer-file-type-alist '(("" . t))))
      (find-file filename)))
  
! (defun find-file-text (filename)
    "Visit file FILENAME and treat it as a text file."
    (interactive "FFind file text: ")
    (let ((file-name-buffer-file-type-alist '(("" . nil))))
***************
*** 186,197 ****
        (setq buffer-file-type (eq buffer-file-coding-system 'no-conversion)))))
  
  ;;; To set the default coding system on new files.
! (add-hook 'find-file-not-found-hooks 
          'find-file-not-found-set-buffer-file-coding-system)
  
  ;;; To accomodate filesystems that do not require CR/LF translation.
  (defvar untranslated-filesystem-list nil
!   "List of filesystems that require no CR/LF translation when reading 
  and writing files.  Each filesystem in the list is a string naming
  the directory prefix corresponding to the filesystem.")
  
--- 185,196 ----
        (setq buffer-file-type (eq buffer-file-coding-system 'no-conversion)))))
  
  ;;; To set the default coding system on new files.
! (add-hook 'find-file-not-found-hooks
          'find-file-not-found-set-buffer-file-coding-system)
  
  ;;; To accomodate filesystems that do not require CR/LF translation.
  (defvar untranslated-filesystem-list nil
!   "List of filesystems that require no CR/LF translation when reading
  and writing files.  Each filesystem in the list is a string naming
  the directory prefix corresponding to the filesystem.")
  
***************
*** 202,209 ****
        ;; The canonical form for DOS/W32 is with A-Z downcased and all
        ;; directory separators changed to directory-sep-char.
        (let ((name nil))
!       (setq name (mapconcat 
!                   '(lambda (char) 
                       (if (and (<= ?A char) (<= char ?Z))
                           (char-to-string (+ (- char ?A) ?a))
                         (char-to-string char)))
--- 201,208 ----
        ;; The canonical form for DOS/W32 is with A-Z downcased and all
        ;; directory separators changed to directory-sep-char.
        (let ((name nil))
!       (setq name (mapconcat
!                   '(lambda (char)
                       (if (and (<= ?A char) (<= char ?Z))
                           (char-to-string (+ (- char ?A) ?a))
                         (char-to-string char)))
***************
*** 219,225 ****
      filename))
  
  (defun untranslated-file-p (filename)
!   "Return t if FILENAME is on a filesystem that does not require 
  CR/LF translation, and nil otherwise."
    (let ((fs (untranslated-canonical-name filename))
        (ufs-list untranslated-filesystem-list)
--- 218,224 ----
      filename))
  
  (defun untranslated-file-p (filename)
!   "Return t if FILENAME is on a filesystem that does not require
  CR/LF translation, and nil otherwise."
    (let ((fs (untranslated-canonical-name filename))
        (ufs-list untranslated-filesystem-list)
***************
*** 233,239 ****
  (defun add-untranslated-filesystem (filesystem)
    "Add FILESYSTEM to the list of filesystems that do not require
  CR/LF translation.  FILESYSTEM is a string containing the directory
! prefix corresponding to the filesystem.  For example, for a Unix 
  filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"."
    ;; We use "D", not "f", to avoid confusing the user: "f" prompts
    ;; with a directory, but RET returns the current buffer's file, not
--- 232,238 ----
  (defun add-untranslated-filesystem (filesystem)
    "Add FILESYSTEM to the list of filesystems that do not require
  CR/LF translation.  FILESYSTEM is a string containing the directory
! prefix corresponding to the filesystem.  For example, for a Unix
  filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"."
    ;; We use "D", not "f", to avoid confusing the user: "f" prompts
    ;; with a directory, but RET returns the current buffer's file, not
***************
*** 246,257 ****
            (cons fs untranslated-filesystem-list)))))
  
  (defun remove-untranslated-filesystem (filesystem)
!   "Remove FILESYSTEM from the list of filesystems that do not require 
  CR/LF translation.  FILESYSTEM is a string containing the directory
! prefix corresponding to the filesystem.  For example, for a Unix 
  filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"."
    (interactive "fUntranslated file system: ")
!   (setq untranslated-filesystem-list 
        (delete (untranslated-canonical-name filesystem)
                untranslated-filesystem-list)))
  
--- 245,256 ----
            (cons fs untranslated-filesystem-list)))))
  
  (defun remove-untranslated-filesystem (filesystem)
!   "Remove FILESYSTEM from the list of filesystems that do not require
  CR/LF translation.  FILESYSTEM is a string containing the directory
! prefix corresponding to the filesystem.  For example, for a Unix
  filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"."
    (interactive "fUntranslated file system: ")
!   (setq untranslated-filesystem-list
        (delete (untranslated-canonical-name filesystem)
                untranslated-filesystem-list)))
  



reply via email to

[Prev in Thread] Current Thread [Next in Thread]