Mercurial > emacs
diff lisp/mh-e/mh-alias.el @ 67758:6b063593fdad
Follow Emacs coding conventions. Use default setting of
emacs-lisp-docstring-fill-column which is 65.
author | Bill Wohler <wohler@newt.com> |
---|---|
date | Fri, 23 Dec 2005 07:40:40 +0000 |
parents | 7ff92ad99326 |
children | 9c3504ae6060 |
line wrap: on
line diff
--- a/lisp/mh-e/mh-alias.el Fri Dec 23 05:40:21 2005 +0000 +++ b/lisp/mh-e/mh-alias.el Fri Dec 23 07:40:40 2005 +0000 @@ -68,10 +68,11 @@ "/usr/lib/mh/MailAliases" "/usr/share/mailutils/mh/MailAliases" "/etc/passwd") "*A list of system files which are a source of aliases. -If these files are modified, they are automatically reread. This list need -include only system aliases and the passwd file, since personal alias files -listed in your `Aliasfile:' MH profile component are automatically included. -You can update the alias list manually using \\[mh-alias-reload].") +If these files are modified, they are automatically reread. This list +need include only system aliases and the passwd file, since personal +alias files listed in your `Aliasfile:' MH profile component are +automatically included. You can update the alias list manually using +\\[mh-alias-reload].") @@ -79,8 +80,8 @@ (defun mh-alias-tstamp (arg) "Check whether alias files have been modified. -Return t if any file listed in the Aliasfile MH profile component has been -modified since the timestamp. +Return t if any file listed in the Aliasfile MH profile component has +been modified since the timestamp. If ARG is non-nil, set timestamp with the current time." (if arg (let ((time (current-time))) @@ -98,8 +99,10 @@ (defun mh-alias-filenames (arg) "Return list of filenames that contain aliases. -The filenames come from the Aliasfile profile component and are expanded. -If ARG is non-nil, filenames listed in `mh-alias-system-aliases' are appended." +The filenames come from the Aliasfile profile component and are +expanded. +If ARG is non-nil, filenames listed in `mh-alias-system-aliases' are +appended." (or mh-progs (mh-find-path)) (save-excursion (let* ((filename (mh-profile-component "Aliasfile")) @@ -120,8 +123,8 @@ (defun mh-alias-gecos-name (gecos-name username comma-separator) "Return a usable address string from a GECOS-NAME and USERNAME. -Use only part of the GECOS-NAME up to the first comma if COMMA-SEPARATOR is -non-nil." +Use only part of the GECOS-NAME up to the first comma if +COMMA-SEPARATOR is non-nil." (let ((res gecos-name)) ;; Keep only string until first comma if COMMA-SEPARATOR is t. (if (and comma-separator @@ -183,14 +186,15 @@ (defun mh-alias-reload () "Reload MH aliases. -Since aliases are updated frequently, MH-E reloads aliases automatically -whenever an alias lookup occurs if an alias source has changed. Sources -include files listed in your `Aliasfile:' profile component and your password -file if option `mh-alias-local-users' is turned on. However, you can reload -your aliases manually by calling this command directly. +Since aliases are updated frequently, MH-E reloads aliases +automatically whenever an alias lookup occurs if an alias source has +changed. Sources include files listed in your `Aliasfile:' profile +component and your password file if option `mh-alias-local-users' is +turned on. However, you can reload your aliases manually by calling +this command directly. -This function runs `mh-alias-reloaded-hook' after the aliases have been -loaded." +This function runs `mh-alias-reloaded-hook' after the aliases have +been loaded." (interactive) (save-excursion (message "Loading MH aliases...") @@ -238,8 +242,8 @@ (defun mh-alias-ali (alias &optional user) "Return ali expansion for ALIAS. ALIAS must be a string for a single alias. -If USER is t, then assume ALIAS is an address and call ali -user. -ali returns the string unchanged if not defined. The same is done here." +If USER is t, then assume ALIAS is an address and call ali -user. ali +returns the string unchanged if not defined. The same is done here." (condition-case err (save-excursion (let ((user-arg (if user "-user" "-nouser"))) @@ -322,8 +326,8 @@ (defun mh-alias-suggest-alias (string &optional no-comma-swap) "Suggest an alias for STRING. -Don't reverse the order of strings separated by a comma if NO-COMMA-SWAP is -non-nil." +Don't reverse the order of strings separated by a comma if +NO-COMMA-SWAP is non-nil." (cond ((string-match "^<\\(.*\\)>$" string) ;; <somename@foo.bar> -> recurse, stripping brackets. @@ -378,8 +382,8 @@ (defun mh-alias-canonicalize-suggestion (string) "Process STRING to replace spaces by periods. First all spaces and commas are replaced by periods. Then every run of -consecutive periods are replaced with a single period. Finally the string -is converted to lower case." +consecutive periods are replaced with a single period. Finally the +string is converted to lower case." (with-temp-buffer (insert string) ;; Replace spaces with periods @@ -417,10 +421,10 @@ (defun mh-alias-insert-file (&optional alias) "Return filename which should be used to add ALIAS. -The value of the option `mh-alias-insert-file' is used if non-nil\; otherwise -the value of the `Aliasfile:' profile component is used. -If the alias already exists, try to return the name of the file that contains -it." +The value of the option `mh-alias-insert-file' is used if non-nil\; +otherwise the value of the `Aliasfile:' profile component is used. +If the alias already exists, try to return the name of the file that +contains it." (cond ((and mh-alias-insert-file (listp mh-alias-insert-file)) (if (not (elt mh-alias-insert-file 1)) ; Only one entry, use it @@ -488,12 +492,14 @@ (defun mh-alias-add-alias-to-file (alias address &optional file) "Add ALIAS for ADDRESS in alias FILE without alias check or prompts. -Prompt for alias file if not provided and there is more than one candidate. +Prompt for alias file if not provided and there is more than one +candidate. -If the alias exists already, you will have the choice of inserting the new -alias before or after the old alias. In the former case, this alias will be -used when sending mail to this alias. In the latter case, the alias serves as -an additional folder name hint when filing messages." +If the alias exists already, you will have the choice of +inserting the new alias before or after the old alias. In the +former case, this alias will be used when sending mail to this +alias. In the latter case, the alias serves as an additional +folder name hint when filing messages." (if (not file) (setq file (mh-alias-insert-file alias))) (save-excursion @@ -543,11 +549,12 @@ ;;;###mh-autoload (defun mh-alias-add-alias (alias address) "*Add ALIAS for ADDRESS in personal alias file. -This function prompts you for an alias and address. If the alias exists -already, you will have the choice of inserting the new alias before or after -the old alias. In the former case, this alias will be used when sending mail -to this alias. In the latter case, the alias serves as an additional folder -name hint when filing messages." +This function prompts you for an alias and address. If the alias +exists already, you will have the choice of inserting the new +alias before or after the old alias. In the former case, this +alias will be used when sending mail to this alias. In the latter +case, the alias serves as an additional folder name hint when +filing messages." (interactive "P\nP") (mh-alias-reload-maybe) (setq alias (completing-read "Alias: " mh-alias-alist nil nil alias))