Commit c90c4cf1 authored by Bill Wohler's avatar Bill Wohler
Browse files

* mh-acros.el (mh-defun-compat): Rename to defun-mh in order that

variables and functions with the same name are found correctly by
find-func (invoked by clicking on the filename link in the *Help*
buffer.
(mh-defmacro-compat): Rename to defmacro-mh. Ditto. *
mh-e.el: (mh-defgroup): Rename to defgroup-mh. Ditto.
(mh-defcustom): Rename to defcustom-mh. Ditto.
(mh-defface): Rename to defface-mh. Ditto.
(mh-font-lock-add-keywords): Make changes according to these
renamings.

* mh-e.el, mh-compat.el, mh-gnus.el: Use the new names (closes SF
#1472029).
parent b2853b3c
2006-04-17 Bill Wohler <wohler@newt.com>
* mh-acros.el (mh-defun-compat): Rename to defun-mh in order that
variables and functions with the same name are found correctly by
find-func (invoked by clicking on the filename link in the *Help*
buffer).
(mh-defmacro-compat): Rename to defmacro-mh. Ditto.
* mh-e.el: (mh-defgroup): Rename to defgroup-mh. Ditto.
(mh-defcustom): Rename to defcustom-mh. Ditto.
(mh-defface): Rename to defface-mh. Ditto.
(mh-font-lock-add-keywords): Make changes according to these
renamings.
* mh-e.el, mh-compat.el, mh-gnus.el: Use the new names (closes SF
#1472029).
* mh-utils.el (mh-sub-folders-actual): Mention that folder must
have been processed by mh-normalize-folder-name.
(mh-folder-completion-function): Handle completion of folders with
......
......@@ -82,7 +82,7 @@ loads \"cl\" appropriately."
(funcall ',function ,@args))))
;;;###mh-autoload
(defmacro mh-defun-compat (name function arg-list &rest body)
(defmacro defun-mh (name function arg-list &rest body)
"Create function NAME.
If FUNCTION exists, then NAME becomes an alias for FUNCTION.
Otherwise, create function NAME with ARG-LIST and BODY."
......@@ -90,10 +90,10 @@ Otherwise, create function NAME with ARG-LIST and BODY."
(if defined-p
`(defalias ',name ',function)
`(defun ,name ,arg-list ,@body))))
(put 'mh-defun-compat 'lisp-indent-function 'defun)
(put 'defun-mh 'lisp-indent-function 'defun)
;;;###mh-autoload
(defmacro mh-defmacro-compat (name macro arg-list &rest body)
(defmacro defmacro-mh (name macro arg-list &rest body)
"Create macro NAME.
If MACRO exists, then NAME becomes an alias for MACRO.
Otherwise, create macro NAME with ARG-LIST and BODY."
......@@ -101,7 +101,7 @@ Otherwise, create macro NAME with ARG-LIST and BODY."
(if defined-p
`(defalias ',name ',macro)
`(defmacro ,name ,arg-list ,@body))))
(put 'mh-defmacro-compat 'lisp-indent-function 'defun)
(put 'defmacro-mh 'lisp-indent-function 'defun)
......
......@@ -62,7 +62,7 @@ Simulate NOERROR argument in XEmacs which lacks it."
(load filename noerror t)
(load (format "%s" feature) noerror t)))))
(mh-defun-compat mh-assoc-string assoc-string (key list case-fold)
(defun-mh mh-assoc-string assoc-string (key list case-fold)
"Like `assoc' but specifically for strings.
Case is ignored if CASE-FOLD is non-nil.
This function is used by Emacs versions that lack `assoc-string',
......@@ -77,7 +77,7 @@ introduced in Emacs 22."
'cancel-timer
'delete-itimer))
(mh-defun-compat mh-display-color-cells display-color-cells (&optional display)
(defun-mh mh-display-color-cells display-color-cells (&optional display)
"Return the number of color cells supported by DISPLAY.
This function is used by XEmacs to return 2 when
`device-color-cells' returns nil. This happens when compiling or
......@@ -115,12 +115,12 @@ introduced in Emacs 22."
`(face-background ,face ,frame)
`(face-background ,face ,frame ,inherit)))
(mh-defun-compat mh-font-lock-add-keywords font-lock-add-keywords
(defun-mh mh-font-lock-add-keywords font-lock-add-keywords
(mode keywords &optional how)
"XEmacs does not have `font-lock-add-keywords'.
This function returns nil on that system.")
(mh-defun-compat mh-image-load-path-for-library
(defun-mh mh-image-load-path-for-library
image-load-path-for-library (library image &optional path no-error)
"Return a suitable search path for images used by LIBRARY.
......@@ -215,7 +215,7 @@ compatibility with versions of Emacs that lack the variable
(nconc (list image-directory)
(delete image-directory (copy-sequence (or path load-path))))))
(mh-defun-compat mh-image-search-load-path
(defun-mh mh-image-search-load-path
image-search-load-path (file &optional path)
"Emacs 21 and XEmacs don't have `image-search-load-path'.
This function returns nil on those systems."
......@@ -234,13 +234,13 @@ This function returns nil on those systems."
'point-at-eol))
(mh-require 'mailabbrev nil t)
(mh-defun-compat mh-mail-abbrev-make-syntax-table
(defun-mh mh-mail-abbrev-make-syntax-table
mail-abbrev-make-syntax-table ()
"Emacs 21 and XEmacs don't have `mail-abbrev-make-syntax-table'.
This function returns nil on those systems."
nil)
(mh-defun-compat mh-match-string-no-properties
(defun-mh mh-match-string-no-properties
match-string-no-properties (num &optional string)
"Return string of text matched by last search, without text properties.
This function is used by XEmacs that lacks `match-string-no-properties'.
......@@ -249,7 +249,7 @@ The argument STRING is ignored."
(buffer-substring-no-properties
(match-beginning num) (match-end num)))
(mh-defun-compat mh-replace-regexp-in-string replace-regexp-in-string
(defun-mh mh-replace-regexp-in-string replace-regexp-in-string
(regexp rep string &optional fixedcase literal subexp start)
"Replace REGEXP with REP everywhere in STRING and return result.
This function is used by XEmacs that lacks `replace-regexp-in-string'.
......@@ -269,7 +269,7 @@ The arguments FIXEDCASE, SUBEXP, and START, used by
"A list of characters that are _NOT_ reserved in the URL spec.
This is taken from RFC 2396."))
(mh-defun-compat mh-url-hexify-string url-hexify-string (str)
(defun-mh mh-url-hexify-string url-hexify-string (str)
"Escape characters in a string.
This is a copy of `url-hexify-string' from url-util.el in Emacs
22; needed by Emacs 21."
......@@ -283,7 +283,7 @@ This is a copy of `url-hexify-string' from url-util.el in Emacs
(char-to-string char)))
str ""))
(mh-defun-compat mh-view-mode-enter
(defun-mh mh-view-mode-enter
view-mode-enter (&optional return-to exit-action)
"Enter View mode.
This function is used by XEmacs that lacks `view-mode-enter'.
......
This diff is collapsed.
......@@ -39,19 +39,19 @@
(mh-require 'mml nil t)
;; Copy of function from gnus-util.el.
(mh-defun-compat mh-gnus-local-map-property gnus-local-map-property (map)
(defun-mh mh-gnus-local-map-property gnus-local-map-property (map)
"Return a list suitable for a text property list specifying keymap MAP."
(cond (mh-xemacs-flag (list 'keymap map))
((>= emacs-major-version 21) (list 'keymap map))
(t (list 'local-map map))))
;; Copy of function from mm-decode.el.
(mh-defun-compat mh-mm-merge-handles mm-merge-handles (handles1 handles2)
(defun-mh mh-mm-merge-handles mm-merge-handles (handles1 handles2)
(append (if (listp (car handles1)) handles1 (list handles1))
(if (listp (car handles2)) handles2 (list handles2))))
;; Copy of function from mm-decode.el.
(mh-defun-compat mh-mm-set-handle-multipart-parameter
(defun-mh mh-mm-set-handle-multipart-parameter
mm-set-handle-multipart-parameter (handle parameter value)
;; HANDLE could be a CTL.
(if handle
......@@ -59,7 +59,7 @@
(car handle))))
;; Copy of function from mm-view.el.
(mh-defun-compat mh-mm-inline-text-vcard mm-inline-text-vcard (handle)
(defun-mh mh-mm-inline-text-vcard mm-inline-text-vcard (handle)
(let (buffer-read-only)
(mm-insert-inline
handle
......@@ -73,17 +73,17 @@
;; Function from mm-decode.el used in PGP messages. Just define it with older
;; Gnus to avoid compiler warning.
(mh-defun-compat mh-mm-possibly-verify-or-decrypt
(defun-mh mh-mm-possibly-verify-or-decrypt
mm-possibly-verify-or-decrypt (parts ctl)
nil)
;; Copy of macro in mm-decode.el.
(mh-defmacro-compat mh-mm-handle-multipart-ctl-parameter
(defmacro-mh mh-mm-handle-multipart-ctl-parameter
mm-handle-multipart-ctl-parameter (handle parameter)
`(get-text-property 0 ,parameter (car ,handle)))
;; Copy of function in mm-decode.el.
(mh-defun-compat mh-mm-readable-p mm-readable-p (handle)
(defun-mh mh-mm-readable-p mm-readable-p (handle)
"Say whether the content of HANDLE is readable."
(and (< (with-current-buffer (mm-handle-buffer handle)
(buffer-size)) 10000)
......@@ -93,7 +93,7 @@
(not (mh-mm-long-lines-p 76))))))
;; Copy of function in mm-bodies.el.
(mh-defun-compat mh-mm-long-lines-p mm-long-lines-p (length)
(defun-mh mh-mm-long-lines-p mm-long-lines-p (length)
"Say whether any of the lines in the buffer is longer than LENGTH."
(save-excursion
(goto-char (point-min))
......@@ -105,21 +105,21 @@
(and (> (current-column) length)
(current-column))))
(mh-defun-compat mh-mm-keep-viewer-alive-p mm-keep-viewer-alive-p (handle)
(defun-mh mh-mm-keep-viewer-alive-p mm-keep-viewer-alive-p (handle)
;; Released Gnus doesn't keep handles associated with externally displayed
;; MIME parts. So this will always return nil.
nil)
(mh-defun-compat mh-mm-destroy-parts mm-destroy-parts (list)
(defun-mh mh-mm-destroy-parts mm-destroy-parts (list)
"Older versions of Emacs don't have this function."
nil)
(mh-defun-compat mh-mm-uu-dissect-text-parts mm-uu-dissect-text-parts (handles)
(defun-mh mh-mm-uu-dissect-text-parts mm-uu-dissect-text-parts (handles)
"Emacs 21 and XEmacs don't have this function."
nil)
;; Copy of function in mml.el.
(mh-defun-compat mh-mml-minibuffer-read-disposition
(defun-mh mh-mml-minibuffer-read-disposition
mml-minibuffer-read-disposition (type &optional default)
(unless default (setq default
(if (and (string-match "\\`text/" type)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment