diff lisp/x-menu.el @ 12950:83fea4c633e8

Doc fixes. (caar, cdar): Deleted--use (car (car ...)).
author Richard M. Stallman <rms@gnu.org>
date Sat, 26 Aug 1995 20:53:20 +0000
parents 2cdce064065f
children 83f275dcd93a
line wrap: on
line diff
--- a/lisp/x-menu.el	Sat Aug 26 20:43:35 1995 +0000
+++ b/lisp/x-menu.el	Sat Aug 26 20:53:20 1995 +0000
@@ -20,12 +20,6 @@
 
 ;;; Code:
 
-(defmacro caar (conscell)
-  (list 'car (list 'car conscell)))
-
-(defmacro cdar (conscell)
-  (list 'cdr (list 'car conscell)))
-
 (defun x-menu-mode ()
   "Major mode for creating permanent menus for use with X.
 These menus are implemented entirely in Lisp; popup menus, implemented
@@ -50,7 +44,8 @@
   "*Minimum horizontal spacing between objects in a permanent X menu.")
 
 (defun x-menu-create-menu (name)
-  "Create a permanent X menu.  Returns an item which should be used as a
+  "Create a permanent X menu.
+Returns an item which should be used as a
 menu object whenever referring to the menu."
   (let ((old (current-buffer))
 	(buf (get-buffer-create name)))
@@ -61,15 +56,15 @@
     buf))
 
 (defun x-menu-change-associated-buffer (menu buffer)
-  "Change associated buffer of MENU to BUFFER.  BUFFER should be a buffer
-object."
+  "Change associated buffer of MENU to BUFFER.
+BUFFER should be a buffer object."
   (let ((old (current-buffer)))
     (set-buffer menu)
     (setq x-menu-assoc-buffer buffer)
     (set-buffer old)))
 
 (defun x-menu-add-item (menu item binding)
-  "Adds to MENU an item with name ITEM, associated with BINDING.
+  "Add to MENU an item with name ITEM, associated with BINDING.
 Following a sequence of calls to x-menu-add-item, a call to x-menu-compute
 should be performed before the menu will be made available to the user.
 
@@ -86,8 +81,8 @@
     item))
 
 (defun x-menu-delete-item (menu item)
-  "Deletes from MENU the item named ITEM.  x-menu-compute should be called
-before the menu is made available to the user."
+  "Delete from MENU the item named ITEM.
+Call `x-menu-compute' before making the menu available to the user."
   (let ((old (current-buffer))
 	elt)
     (set-buffer menu)
@@ -97,10 +92,9 @@
     item))
 
 (defun x-menu-activate (menu)
-  "Computes all necessary parameters for MENU.  This must be called whenever
-a menu is modified before it is made available to the user.
-
-This also creates the menu itself."
+  "Compute all necessary parameters for MENU.
+This must be called whenever a menu is modified before it is made
+available to the user.  This also creates the menu itself."
   (let ((buf (current-buffer)))
     (pop-to-buffer menu)
     (let (buffer-read-only)
@@ -109,11 +103,11 @@
       (let (items-head
 	    (items-tail x-menu-items-alist))
 	(while items-tail
-	  (if (caar items-tail)
+	  (if (car (car items-tail))
 	      (progn (setq items-head (cons (car items-tail) items-head))
 		     (setq x-menu-item-width
 			   (max x-menu-item-width
-				(length (caar items-tail))))))
+				(length (car (car items-tail)))))))
 	  (setq items-tail (cdr items-tail)))
 	(setq x-menu-items-alist (reverse items-head)))
       (setq x-menu-item-width (+ x-menu-item-spacing x-menu-item-width))
@@ -127,7 +121,7 @@
 			(<= (setq items (1+ items)) x-menu-items-per-line))
 	      (insert (format (concat "%"
 				      (int-to-string x-menu-item-width) "s")
-			      (caar items-head)))
+			      (car (car items-head))))
 	      (setq items-head (cdr items-head))))
 	  (insert ?\n)))
       (shrink-window (max 0