aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/gnus/gmm-utils.el41
-rw-r--r--lisp/gnus/gnus-art.el2
-rw-r--r--lisp/gnus/gnus-bookmark.el2
-rw-r--r--lisp/gnus/gnus-registry.el2
-rw-r--r--lisp/gnus/gnus-topic.el2
-rw-r--r--lisp/gnus/message.el2
-rw-r--r--lisp/gnus/mm-util.el8
-rw-r--r--lisp/gnus/nnmaildir.el12
8 files changed, 13 insertions, 58 deletions
diff --git a/lisp/gnus/gmm-utils.el b/lisp/gnus/gmm-utils.el
index 6049f480461..a18b4c77539 100644
--- a/lisp/gnus/gmm-utils.el
+++ b/lisp/gnus/gmm-utils.el
@@ -193,21 +193,6 @@ This is a copy of the `lazy' widget in Emacs 22.1 provided for compatibility."
193 :tag "Other" 193 :tag "Other"
194 (symbol :tag "Icon item"))))) 194 (symbol :tag "Icon item")))))
195 195
196;; (defun gmm-color-cells (&optional display)
197;; "Return the number of color cells supported by DISPLAY.
198;; Compatibility function."
199;; ;; `display-color-cells' doesn't return more than 256 even if color depth is
200;; ;; > 8 in Emacs 21.
201;; ;;
202;; ;; Feel free to add proper XEmacs support.
203;; (let* ((cells (and (fboundp 'display-color-cells)
204;; (display-color-cells display)))
205;; (plane (and (fboundp 'x-display-planes)
206;; (ash 1 (x-display-planes))))
207;; (none -1))
208;; (max (if (integerp cells) cells none)
209;; (if (integerp plane) plane none))))
210
211(defcustom gmm-tool-bar-style 196(defcustom gmm-tool-bar-style
212 (if (and (boundp 'tool-bar-mode) 197 (if (and (boundp 'tool-bar-mode)
213 tool-bar-mode 198 tool-bar-mode
@@ -338,7 +323,7 @@ compatibility with versions of Emacs that lack the variable
338 (let ((img image) 323 (let ((img image)
339 (dir (or 324 (dir (or
340 ;; Images in image-load-path. 325 ;; Images in image-load-path.
341 (gmm-image-search-load-path image) ;; "gmm-" prefix! 326 (image-search-load-path image)
342 ;; Images in load-path. 327 ;; Images in load-path.
343 (locate-library image))) 328 (locate-library image)))
344 parent) 329 parent)
@@ -405,30 +390,6 @@ If mode is nil, use `major-mode' of the current buffer."
405 (string-match "^\\(.+\\)-mode$" mode) 390 (string-match "^\\(.+\\)-mode$" mode)
406 (match-string 1 mode)))))) 391 (match-string 1 mode))))))
407 392
408(defun gmm-write-region (start end filename &optional append visit
409 lockname mustbenew)
410 "Compatibility function for `write-region'.
411
412In XEmacs, the seventh argument of `write-region' specifies the
413coding-system."
414 (if (and mustbenew (featurep 'xemacs))
415 (if (file-exists-p filename)
416 (signal 'file-already-exists (list "File exists" filename))
417 (write-region start end filename append visit lockname))
418 (write-region start end filename append visit lockname mustbenew)))
419
420;; `interactive-p' is obsolete since Emacs 23.2.
421(defmacro gmm-called-interactively-p (kind)
422 (condition-case nil
423 (progn
424 (eval '(called-interactively-p 'any))
425 ;; Emacs >=23.2
426 `(called-interactively-p ,kind))
427 ;; Emacs <23.2
428 (wrong-number-of-arguments '(called-interactively-p))
429 ;; XEmacs
430 (void-function '(interactive-p))))
431
432;; `labels' is obsolete since Emacs 24.3. 393;; `labels' is obsolete since Emacs 24.3.
433(defmacro gmm-labels (bindings &rest body) 394(defmacro gmm-labels (bindings &rest body)
434 "Make temporary function bindings. 395 "Make temporary function bindings.
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index ac967d25c40..ce26b00a51c 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -2718,7 +2718,7 @@ If READ-CHARSET, ask for a coding system."
2718 (while (re-search-forward 2718 (while (re-search-forward
2719 "\\(\\(https?\\|ftp\\)://\\S-+\\) *\n\\(\\S-+\\)" nil t) 2719 "\\(\\(https?\\|ftp\\)://\\S-+\\) *\n\\(\\S-+\\)" nil t)
2720 (replace-match "\\1\\3" t))) 2720 (replace-match "\\1\\3" t)))
2721 (when (gmm-called-interactively-p 'any) 2721 (when (called-interactively-p 'any)
2722 (gnus-treat-article nil)))) 2722 (gnus-treat-article nil))))
2723 2723
2724(defun article-wash-html () 2724(defun article-wash-html ()
diff --git a/lisp/gnus/gnus-bookmark.el b/lisp/gnus/gnus-bookmark.el
index 0cdbff09937..66ee7c6daac 100644
--- a/lisp/gnus/gnus-bookmark.el
+++ b/lisp/gnus/gnus-bookmark.el
@@ -367,7 +367,7 @@ The leftmost column displays a D if the bookmark is flagged for
367deletion, or > if it is flagged for displaying." 367deletion, or > if it is flagged for displaying."
368 (interactive) 368 (interactive)
369 (gnus-bookmark-maybe-load-default-file) 369 (gnus-bookmark-maybe-load-default-file)
370 (if (gmm-called-interactively-p 'any) 370 (if (called-interactively-p 'any)
371 (switch-to-buffer (get-buffer-create "*Gnus Bookmark List*")) 371 (switch-to-buffer (get-buffer-create "*Gnus Bookmark List*"))
372 (set-buffer (get-buffer-create "*Gnus Bookmark List*"))) 372 (set-buffer (get-buffer-create "*Gnus Bookmark List*")))
373 (let ((inhibit-read-only t) 373 (let ((inhibit-read-only t)
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index 74e2b827c60..f49eb0d85eb 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -1036,7 +1036,7 @@ only the last one's marks are returned."
1036 (let* ((article (last articles)) 1036 (let* ((article (last articles))
1037 (id (gnus-registry-fetch-message-id-fast article)) 1037 (id (gnus-registry-fetch-message-id-fast article))
1038 (marks (when id (gnus-registry-get-id-key id 'mark)))) 1038 (marks (when id (gnus-registry-get-id-key id 'mark))))
1039 (when (gmm-called-interactively-p 'any) 1039 (when (called-interactively-p 'any)
1040 (gnus-message 1 "Marks are %S" marks)) 1040 (gnus-message 1 "Marks are %S" marks))
1041 marks)) 1041 marks))
1042 1042
diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el
index f1b3bd4c331..3255aa9a8a4 100644
--- a/lisp/gnus/gnus-topic.el
+++ b/lisp/gnus/gnus-topic.el
@@ -1167,7 +1167,7 @@ articles in the topic and its subtopics."
1167 (remove-hook 'gnus-check-bogus-groups-hook 'gnus-topic-clean-alist) 1167 (remove-hook 'gnus-check-bogus-groups-hook 'gnus-topic-clean-alist)
1168 (setq gnus-group-prepare-function 'gnus-group-prepare-flat) 1168 (setq gnus-group-prepare-function 'gnus-group-prepare-flat)
1169 (setq gnus-group-sort-alist-function 'gnus-group-sort-flat)) 1169 (setq gnus-group-sort-alist-function 'gnus-group-sort-flat))
1170 (when (gmm-called-interactively-p 'any) 1170 (when (called-interactively-p 'any)
1171 (gnus-group-list-groups)))) 1171 (gnus-group-list-groups))))
1172 1172
1173(defun gnus-topic-select-group (&optional all) 1173(defun gnus-topic-select-group (&optional all)
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 6ee5264a4e7..3c3105649ed 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -3201,7 +3201,7 @@ M-RET `message-newline-and-reformat' (break the line and reformat)."
3201(defun message-goto-body () 3201(defun message-goto-body ()
3202 "Move point to the beginning of the message body." 3202 "Move point to the beginning of the message body."
3203 (interactive) 3203 (interactive)
3204 (when (and (gmm-called-interactively-p 'any) 3204 (when (and (called-interactively-p 'any)
3205 (looking-at "[ \t]*\n")) 3205 (looking-at "[ \t]*\n"))
3206 (expand-abbrev)) 3206 (expand-abbrev))
3207 (push-mark) 3207 (push-mark)
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index 106d010a3dc..b8da19d9413 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -1371,8 +1371,6 @@ If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'."
1371 inhibit-file-name-handlers))) 1371 inhibit-file-name-handlers)))
1372 (write-region start end filename append visit lockname))) 1372 (write-region start end filename append visit lockname)))
1373 1373
1374(autoload 'gmm-write-region "gmm-utils")
1375
1376;; It is not a MIME function, but some MIME functions use it. 1374;; It is not a MIME function, but some MIME functions use it.
1377(if (and (fboundp 'make-temp-file) 1375(if (and (fboundp 'make-temp-file)
1378 (ignore-errors 1376 (ignore-errors
@@ -1417,11 +1415,7 @@ If SUFFIX is non-nil, add that at the end of the file name."
1417 (setq file (concat file suffix))) 1415 (setq file (concat file suffix)))
1418 (if dir-flag 1416 (if dir-flag
1419 (make-directory file) 1417 (make-directory file)
1420 ;; NOTE: This is unsafe if Emacs 20 1418 (write-region "" nil file nil 'silent nil 'excl))
1421 ;; users and XEmacs users don't use
1422 ;; a secure temp directory.
1423 (gmm-write-region "" nil file nil 'silent
1424 nil 'excl))
1425 nil) 1419 nil)
1426 (file-already-exists t) 1420 (file-already-exists t)
1427 ;; The XEmacs version of `make-directory' issues 1421 ;; The XEmacs version of `make-directory' issues
diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el
index 3d8926b6925..70a3dd99be7 100644
--- a/lisp/gnus/nnmaildir.el
+++ b/lisp/gnus/nnmaildir.el
@@ -537,8 +537,8 @@ by nnmaildir-request-article.")
537 (prin1 (vector storage-version num msgid nov) (current-buffer)) 537 (prin1 (vector storage-version num msgid nov) (current-buffer))
538 (setq file (concat novfile ":")) 538 (setq file (concat novfile ":"))
539 (nnmaildir--unlink file) 539 (nnmaildir--unlink file)
540 (gmm-write-region (point-min) (point-max) file nil 'no-message nil 540 (write-region (point-min) (point-max) file nil 'no-message nil
541 'excl)) 541 'excl))
542 (rename-file file novfile 'replace) 542 (rename-file file novfile 'replace)
543 (setf (nnmaildir--art-msgid article) msgid) 543 (setf (nnmaildir--art-msgid article) msgid)
544 nov))) 544 nov)))
@@ -1396,8 +1396,8 @@ by nnmaildir-request-article.")
1396 (concat "File exists: " tmpfile)) 1396 (concat "File exists: " tmpfile))
1397 (throw 'return nil)) 1397 (throw 'return nil))
1398 (with-current-buffer buffer 1398 (with-current-buffer buffer
1399 (gmm-write-region (point-min) (point-max) tmpfile nil 'no-message nil 1399 (write-region (point-min) (point-max) tmpfile nil 'no-message nil
1400 'excl)) 1400 'excl))
1401 (unix-sync) ;; no fsync :( 1401 (unix-sync) ;; no fsync :(
1402 (rename-file tmpfile (concat (nnmaildir--cur dir) file suffix) 'replace) 1402 (rename-file tmpfile (concat (nnmaildir--cur dir) file suffix) 'replace)
1403 t))) 1403 t)))
@@ -1490,8 +1490,8 @@ by nnmaildir-request-article.")
1490 (throw 'return nil)))) 1490 (throw 'return nil))))
1491 (condition-case nil (add-name-to-file nnmaildir--file tmpfile) 1491 (condition-case nil (add-name-to-file nnmaildir--file tmpfile)
1492 (error 1492 (error
1493 (gmm-write-region (point-min) (point-max) tmpfile nil 'no-message nil 1493 (write-region (point-min) (point-max) tmpfile nil 'no-message nil
1494 'excl) 1494 'excl)
1495 (when (fboundp 'unix-sync) 1495 (when (fboundp 'unix-sync)
1496 (unix-sync)))) ;; no fsync :( 1496 (unix-sync)))) ;; no fsync :(
1497 (nnheader-cancel-timer 24h) 1497 (nnheader-cancel-timer 24h)