[sawfish] Dropped two outdated featuers in command definition.



commit b6bb485061be40d317be3184458172ab79a7dceb
Author: Teika kazura <teika lavabit com>
Date:   Sat Nov 27 14:00:00 2010 +0900

    Dropped two outdated featuers in command definition.
    
    Function 'define-command-args' is deleted. In 'define-command',
    'doc-key' arg is dropped.

 lisp/sawfish/wm/commands.jl |   11 +----------
 man/news.texi               |    3 +++
 man/sawfish.texi            |   12 +++---------
 sawfish.el                  |    2 +-
 4 files changed, 8 insertions(+), 20 deletions(-)
---
diff --git a/lisp/sawfish/wm/commands.jl b/lisp/sawfish/wm/commands.jl
index 01b318e..3d34a09 100644
--- a/lisp/sawfish/wm/commands.jl
+++ b/lisp/sawfish/wm/commands.jl
@@ -21,7 +21,6 @@
 (define-structure sawfish.wm.commands
 
     (export define-command
-	    define-command-args
 	    autoload-command
 	    command-ref
 	    command-type
@@ -87,15 +86,13 @@ evaluated.")
   (define autoloader (make-autoloader getter setter))
   (define real-getter (autoloader-ref getter))
 
-  (define (apply-command-keys name #!key spec type doc doc-key class)
+  (define (apply-command-keys name #!key spec type doc class)
     (when spec
       (put name 'command-spec spec))
     (when type
       (put name 'custom-command-args type))
     (when doc
       (put name 'command-doc doc))
-    (when doc-key
-      (put name 'command-doc-key doc-key))
     (when class
       (put name 'command-class class)))
 
@@ -107,10 +104,6 @@ interactive specification and a custom-type specification respectively)."
     (setter name fun)
     (apply apply-command-keys name keys))
 
-  ;; obsolete, use define-command
-  (define (define-command-args name spec)
-    (put name 'custom-command-args spec))
-
   (define (autoload-command name module . keys)
     "Record that loading the module called MODULE (a symbol) will provde a
 command called NAME (optionally whose arguments have custom-type TYPE)."
@@ -356,8 +349,6 @@ command called NAME (optionally whose arguments have custom-type TYPE)."
   (define (command-documentation name)
     "Return the documentation associated with the command called NAME."
     (cond ((get name 'command-doc))
-	  ((get name 'command-doc-key)
-	   (doc-file-ref (get name 'command-doc-key)))
 	  (t
 	   (let ((value (command-ref name)))
 	     ;; assume that the command has the same name as
diff --git a/man/news.texi b/man/news.texi
index 9b6ce5f..628754b 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -124,7 +124,10 @@ Category @code{Placement} is renamed to @code{Geometry}.  The item
 @code{fixed-size} to @code{geometry}.
 
 @item Spec-File compatibility for RHEL 6beta [Kim B. Heino]
+ item Deletion of outdated features in command definition [Teika Kazura]
 
+Function @code{define-command-args} is deleted. In @code{define-command}
+function, the keyword argument @code{doc-key} is dropped.
 @end itemize
 @end itemize
 
diff --git a/man/sawfish.texi b/man/sawfish.texi
index 4670dd5..cdac89f 100644
--- a/man/sawfish.texi
+++ b/man/sawfish.texi
@@ -5613,7 +5613,7 @@ The default value is @code{(default)}.
 @node Command Definition, Old-style Command Definition, , Commands
 @section Command Definition
 
- defun define-command name fun #!key spec type doc doc-key class
+ defun define-command name fun #!key spec type doc class
 Define a command called @var{name} (a symbol).  The function @var{fun}
 will be called to execute the command.
 
@@ -5632,20 +5632,14 @@ set in ``Bindings'' section of the configurator. (The doc is lacking.)
 @code{advanced}. Users can choose which commands are shown in the
 configurator according to @var{class}. See the documetation
 of @code{customize-command-classes} (@pxref{Commands}.)
-
-The command-documentation may be stored in the doc file, rather than
-in the code itself; if it exists, the @var{doc-key} will be used to
-look up the doc file entry.  If it's provided together with @var{doc},
-both will be stored.  But the @code{command-documentation} function
-favors the built-in doc string over the doc file entry.
 @end defun
 
- defun define-command-to-screen name fun #!key spec type doc doc-key class
+ defun define-command-to-screen name fun #!key spec type doc class
 As @code{define-command}, but any printed output of @var{fun} is sent
 to the screen, i.e. @code{standard-output} is redirected.
 @end defun
 
- defun autoload-command name module #!key spec type doc doc-key class
+ defun autoload-command name module #!key spec type doc class
 Record that loading the module called @var{module} (a symbol) will provde a
 command called @var{name}.
 
diff --git a/sawfish.el b/sawfish.el
index 60690ab..b4485b2 100644
--- a/sawfish.el
+++ b/sawfish.el
@@ -288,7 +288,7 @@ already fontified."
              ;; mean that you'd have to have sawfish running at the time
              ;; that this constant is defined.
              (list 
-              "define" "define-command-args" "define-command-to-screen"
+              "define" "define-command-to-screen"
               "define-custom-deserializer" "define-custom-serializer"
               "define-custom-setter" "define-datum-printer"
               "define-file-handler" "define-focus-mode"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]