summaryrefslogtreecommitdiff
path: root/lisp/mh-e/mh-acros.el
diff options
context:
space:
mode:
authorBill Wohler <wohler@newt.com>2005-12-23 07:40:40 +0000
committerBill Wohler <wohler@newt.com>2005-12-23 07:40:40 +0000
commit2dcf34f9ca6c16817a902fb7340af06708702781 (patch)
tree01f09bebb644d9978078e24521e698132ed014c7 /lisp/mh-e/mh-acros.el
parentd169946261347a11f80680f4deda7d0a62816f39 (diff)
downloademacs-2dcf34f9ca6c16817a902fb7340af06708702781.tar.gz
Follow Emacs coding conventions. Use default setting of
emacs-lisp-docstring-fill-column which is 65.
Diffstat (limited to 'lisp/mh-e/mh-acros.el')
-rw-r--r--lisp/mh-e/mh-acros.el31
1 files changed, 17 insertions, 14 deletions
diff --git a/lisp/mh-e/mh-acros.el b/lisp/mh-e/mh-acros.el
index 5523f1cf46b..16c42d90634 100644
--- a/lisp/mh-e/mh-acros.el
+++ b/lisp/mh-e/mh-acros.el
@@ -49,8 +49,9 @@
(defmacro mh-require-cl ()
"Macro to load `cl' if needed.
Some versions of `cl' produce code for the expansion of
-\(setf (gethash ...) ...) that uses functions in `cl' at run time. This macro
-recognizes that and loads `cl' where appropriate."
+\(setf (gethash ...) ...) that uses functions in `cl' at run
+time. This macro recognizes that and loads `cl' where
+appropriate."
(if (eq (car (macroexpand '(setf (gethash foo bar) baz))) 'cl-puthash)
`(require 'cl)
`(eval-when-compile (require 'cl))))
@@ -75,16 +76,16 @@ recognizes that and loads `cl' where appropriate."
(defmacro mh-make-local-hook (hook)
"Make HOOK local if needed.
-XEmacs and versions of GNU Emacs before 21.1 require `make-local-hook' to be
-called."
+XEmacs and versions of GNU Emacs before 21.1 require
+`make-local-hook' to be called."
(when (and (fboundp 'make-local-hook)
(not (get 'make-local-hook 'byte-obsolete-info)))
`(make-local-hook ,hook)))
(defmacro mh-mark-active-p (check-transient-mark-mode-flag)
"A macro that expands into appropriate code in XEmacs and nil in GNU Emacs.
-In GNU Emacs if CHECK-TRANSIENT-MARK-MODE-FLAG is non-nil then check if
-variable `transient-mark-mode' is active."
+In GNU Emacs if CHECK-TRANSIENT-MARK-MODE-FLAG is non-nil then
+check if variable `transient-mark-mode' is active."
(cond ((featurep 'xemacs) ;XEmacs
`(and (boundp 'zmacs-regions) zmacs-regions (region-active-p)))
((not check-transient-mark-mode-flag) ;GNU Emacs
@@ -95,12 +96,14 @@ variable `transient-mark-mode' is active."
(defmacro mh-defstruct (name-spec &rest fields)
"Replacement for `defstruct' from the `cl' package.
-The `defstruct' in the `cl' library produces compiler warnings, and generates
-code that uses functions present in `cl' at run-time. This is a partial
-replacement, that avoids these issues.
-
-NAME-SPEC declares the name of the structure, while FIELDS describes the
-various structure fields. Lookup `defstruct' for more details."
+The `defstruct' in the `cl' library produces compiler warnings,
+and generates code that uses functions present in `cl' at
+run-time. This is a partial replacement, that avoids these
+issues.
+
+NAME-SPEC declares the name of the structure, while FIELDS
+describes the various structure fields. Lookup `defstruct' for
+more details."
(let* ((struct-name (if (atom name-spec) name-spec (car name-spec)))
(conc-name (or (and (consp name-spec)
(cadr (assoc :conc-name (cdr name-spec))))
@@ -136,8 +139,8 @@ various structure fields. Lookup `defstruct' for more details."
(defmacro mh-assoc-ignore-case (key alist)
"Check if KEY is present in ALIST while ignoring case to do the comparison.
-Compatibility macro for Emacs versions that lack `assoc-string', introduced in
-Emacs 22."
+Compatibility macro for Emacs versions that lack `assoc-string',
+introduced in Emacs 22."
(if (fboundp 'assoc-string)
`(assoc-string ,key ,alist t)
`(assoc-ignore-case ,key ,alist)))