]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/cus-edit.el (custom-variable-documentation): Simplify with format.
authorGlenn Morris <rgm@gnu.org>
Tue, 1 May 2012 18:47:23 +0000 (14:47 -0400)
committerGlenn Morris <rgm@gnu.org>
Tue, 1 May 2012 18:47:23 +0000 (14:47 -0400)
lisp/ChangeLog
lisp/cus-edit.el

index cfc40bc01a897dd3f7431d7d0f93a01c60c47335..e4c45a2347872a6c434fe04d4f597143798170b9 100644 (file)
@@ -1,3 +1,7 @@
+2012-05-01  Glenn Morris  <rgm@gnu.org>
+
+       * cus-edit.el (custom-variable-documentation): Simplify with format.
+
 2012-05-01  Aaron S. Hawley  <aaron.s.hawley@gmail.com>
             Stefan Monnier  <monnier@iro.umontreal.ca>
 
index 8198a4594c411e00aa037a74c2ba0a1124b05046..4458bb7b56f1ce1e3bba5d4056ef26b5cb4254dc 100644 (file)
@@ -1,6 +1,6 @@
 ;;; cus-edit.el --- tools for customizing Emacs and Lisp packages
 ;;
-;; Copyright (C) 1996-1997, 1999-2012  Free Software Foundation, Inc.
+;; Copyright (C) 1996-1997, 1999-2012 Free Software Foundation, Inc.
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Maintainer: FSF
@@ -2460,15 +2460,15 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
   "Return documentation of VARIABLE for use in Custom buffer.
 Normally just return the docstring.  But if VARIABLE automatically
 becomes buffer local when set, append a message to that effect."
-  (if (and (local-variable-if-set-p variable)
-          (or (not (local-variable-p variable))
-              (with-temp-buffer
-                (local-variable-if-set-p variable))))
-      (concat (documentation-property variable 'variable-documentation)
+  (format "%s%s" (documentation-property variable 'variable-documentation)
+         (if (and (local-variable-if-set-p variable)
+                  (or (not (local-variable-p variable))
+                      (with-temp-buffer
+                        (local-variable-if-set-p variable))))
              "\n
 This variable automatically becomes buffer-local when set outside Custom.
-However, setting it through Custom sets the default value.")
-    (documentation-property variable 'variable-documentation)))
+However, setting it through Custom sets the default value."
+           "")))
 
 (define-widget 'custom-variable 'custom
   "A widget for displaying a Custom variable.