• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/gnus/

Lines Matching +defs:buffer +defs:auto +defs:save +defs:file +defs:name

8 ;; This file is part of GNU Emacs.
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
47 (set-buffer-file-coding-system . ignore)
57 (mapcar (lambda (e) (list (symbol-name (car e))))
165 prompt (mapcar (lambda (s) (list (symbol-name (car s))))
411 (defvar mm-auto-save-coding-system
425 "Coding system of auto save file.")
427 (defvar mm-universal-coding-system mm-auto-save-coding-system
480 (cons 'utf-8 (delq 'ascii (mapcar 'charset-name
677 ;; have the right mime-charset in case the canonical name isn't
701 (fboundp 'set-buffer-multibyte))
706 "Set the multibyte flag of the current buffer.
709 (set-buffer-multibyte 'to))
714 "Unset the multibyte flag of in the current buffer.
716 (set-buffer-multibyte nil))
746 "Return charset of a character in current buffer at position POS.
804 "Non-nil if multibyte is enabled in the current buffer."
819 (save-restriction
851 (autoload 'latin-unity-massage-name "latin-unity")
869 characters that exist in the buffer.
874 buffer and it can otherwise be encoded as Latin 1, won't be ideal.
893 (setq curset (latin-unity-massage-name 'buffer-default curset))
957 (not (string-match "^[Xx]-" (symbol-name cs)))
961 ;; and versions of Emacs. (The name
964 (not (string-match "utf-16" (symbol-name cs))))
982 (save-excursion (mm-iso-8859-x-to-15-region b e)))
1001 (defmacro mm-with-unibyte-buffer (&rest forms)
1002 "Create a temporary buffer, and evaluate FORMS there like `progn'.
1005 (with-temp-buffer ,@forms)))
1006 (put 'mm-with-unibyte-buffer 'lisp-indent-function 0)
1007 (put 'mm-with-unibyte-buffer 'edebug-form-spec '(body))
1009 (defmacro mm-with-multibyte-buffer (&rest forms)
1010 "Create a temporary buffer, and evaluate FORMS there like `progn'.
1013 (with-temp-buffer ,@forms)))
1014 (put 'mm-with-multibyte-buffer 'lisp-indent-function 0)
1015 (put 'mm-with-multibyte-buffer 'edebug-form-spec '(body))
1017 (defmacro mm-with-unibyte-current-buffer (&rest forms)
1018 "Evaluate FORMS with current buffer temporarily made unibyte.
1024 `(set-buffer-multibyte t)', which is run finally, is generally
1025 harmful since it is likely to modify existing data in the buffer.
1029 (buffer (make-symbol "buffer")))
1032 (,buffer (current-buffer)))
1035 (set-buffer-multibyte nil)
1037 (set-buffer ,buffer)
1038 (set-buffer-multibyte ,multibyte)))
1041 (put 'mm-with-unibyte-current-buffer 'lisp-indent-function 0)
1042 (put 'mm-with-unibyte-current-buffer 'edebug-form-spec '(body))
1071 ;; We are in a unibyte buffer or XEmacs non-mule, so we futz around a bit.
1072 (save-excursion
1073 (save-restriction
1107 (defun mm-auto-mode-alist ()
1108 "Return an `auto-mode-alist' with only the .gz (etc) thingies."
1109 (let ((alist auto-mode-alist)
1117 (defvar mm-inhibit-file-name-handlers
1118 '(jka-compr-handler image-file-handler)
1121 (defun mm-insert-file-contents (filename &optional visit beg end replace
1123 "Like `insert-file-contents', but only reads in the file.
1124 A buffer may be modified in several ways after reading into the buffer due
1125 to advanced Emacs features, such as file-name-handlers, format decoding,
1126 `find-file-hooks', etc.
1127 If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'.
1130 (auto-mode-alist (if inhibit nil (mm-auto-mode-alist)))
1133 (after-insert-file-functions nil)
1135 (inhibit-file-name-operation (if inhibit
1136 'insert-file-contents
1137 inhibit-file-name-operation))
1138 (inhibit-file-name-handlers
1140 (append mm-inhibit-file-name-handlers
1141 inhibit-file-name-handlers)
1142 inhibit-file-name-handlers))
1143 (ffh (if (boundp 'find-file-hook)
1144 'find-file-hook
1145 'find-file-hooks))
1149 (insert-file-contents filename visit beg end replace)
1152 (defun mm-append-to-file (start end filename &optional codesys inhibit)
1153 "Append the contents of the region to the end of file FILENAME.
1155 START, END and FILENAME. START and END are buffer positions
1158 encoding the file.
1159 If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'."
1163 (inhibit-file-name-operation (if inhibit
1164 'append-to-file
1165 inhibit-file-name-operation))
1166 (inhibit-file-name-handlers
1168 (append mm-inhibit-file-name-handlers
1169 inhibit-file-name-handlers)
1170 inhibit-file-name-handlers)))
1178 If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'."
1182 (inhibit-file-name-operation (if inhibit
1184 inhibit-file-name-operation))
1185 (inhibit-file-name-handlers
1187 (append mm-inhibit-file-name-handlers
1188 inhibit-file-name-handlers)
1189 inhibit-file-name-handlers)))
1193 (if (and (fboundp 'make-temp-file)
1195 (let ((def (symbol-function 'make-temp-file)))
1203 (defalias 'mm-make-temp-file 'make-temp-file)
1205 (defun mm-make-temp-file (prefix &optional dir-flag suffix)
1206 "Create a temporary file.
1207 The returned file name (created by appending some random characters at the end
1208 of PREFIX, and expanding against `temporary-file-directory' if necessary),
1209 is guaranteed to point to a newly created empty file.
1210 You can then use `write-region' to write new data into the file.
1212 If DIR-FLAG is non-nil, create a new empty directory instead of a file.
1214 If SUFFIX is non-nil, add that at the end of the file name."
1215 (let ((umask (default-file-modes))
1216 file)
1222 (set-default-file-modes 448)
1225 (setq file
1226 (make-temp-name
1227 (expand-file-name
1232 temporary-file-directory))))
1234 (setq file (concat file suffix)))
1236 (make-directory file)
1240 (gmm-write-region "" nil file nil 'silent
1243 (file-already-exists t)
1245 ;; `make-directory' issue `file-error'.
1246 (file-error (or (and (or (featurep 'xemacs)
1248 (file-exists-p file))
1250 ;; the file was somehow created by someone else between
1251 ;; `make-temp-name' and `write-region', let's try again.
1253 file)
1255 (set-default-file-modes umask)))))
1261 (file-directory-p
1262 (setq dir (concat (file-name-directory
1263 (directory-file-name path))