changeset 108243:be3f6d650654

Minor cleanups. * org-table.el (orgtbl-setup): * org-agenda.el (org-agenda-entry-text-mode): Simplify. * subr.el (add-minor-mode): Use push. * mail/supercite.el (sc-electric-mode): Use more descriptive arg name. * emulation/edt.el (edt-select-mode): Simplify.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 05 May 2010 00:27:16 -0400
parents dc6153a5f4f7
children 2ee48fcc701c 1d1025faed5f
files lisp/ChangeLog lisp/emulation/edt.el lisp/mail/supercite.el lisp/net/rlogin.el lisp/org/ChangeLog lisp/org/org-agenda.el lisp/org/org-table.el lisp/subr.el
diffstat 8 files changed, 47 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue May 04 23:45:21 2010 -0400
+++ b/lisp/ChangeLog	Wed May 05 00:27:16 2010 -0400
@@ -1,5 +1,10 @@
 2010-05-05  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+	Minor cleanups.
+	* subr.el (add-minor-mode): Use push.
+	* mail/supercite.el (sc-electric-mode): Use more descriptive arg name.
+	* emulation/edt.el (edt-select-mode): Simplify.
+
 	Use define-minor-mode in more cases.
 	* term/tvi970.el (tvi970-set-keypad-mode):
 	* simple.el (auto-fill-mode, overwrite-mode, binary-overwrite-mode)
--- a/lisp/emulation/edt.el	Tue May 04 23:45:21 2010 -0400
+++ b/lisp/emulation/edt.el	Wed May 05 00:27:16 2010 -0400
@@ -858,8 +858,7 @@
 In select mode, selected text is highlighted."
   (if arg
       (progn
-	(make-local-variable 'edt-select-mode)
-	(setq edt-select-mode 'edt-select-mode-current)
+	(set (make-local-variable 'edt-select-mode) 'edt-select-mode-current)
 	(setq rect-start-point (window-point)))
     (progn
       (kill-local-variable 'edt-select-mode)))
--- a/lisp/mail/supercite.el	Tue May 04 23:45:21 2010 -0400
+++ b/lisp/mail/supercite.el	Wed May 05 00:27:16 2010 -0400
@@ -1619,21 +1619,20 @@
 	       (cadr err) sc-eref-style)
 	      (beep))))))
 
-(defun sc-electric-mode (&optional arg)
-  "
-Mode for viewing Supercite reference headers.  Commands are:
+(defun sc-electric-mode (&optional style)
+  "Mode for viewing Supercite reference headers.  Commands are:
 \n\\{sc-electric-mode-map}
 
 `sc-electric-mode' is not intended to be run interactively, but rather
 accessed through Supercite's electric reference feature.  See
-`sc-insert-reference' for more details.  Optional ARG is the initial
+`sc-insert-reference' for more details.  Optional STYLE is the initial
 header style to use, unless not supplied or invalid, in which case
 `sc-preferred-header-style' is used."
 
   (let ((info sc-mail-info))
 
     (setq sc-eref-style
-	  (or (sc-valid-index-p arg)
+	  (or (sc-valid-index-p style)
 	      (sc-valid-index-p sc-preferred-header-style)
 	      0))
 
--- a/lisp/net/rlogin.el	Tue May 04 23:45:21 2010 -0400
+++ b/lisp/net/rlogin.el	Wed May 05 00:27:16 2010 -0400
@@ -249,7 +249,7 @@
 ``\\[universal-argument] 1 M-x rlogin-directory-tracking-mode\'',
 then do directory tracking but assume the remote filesystem is the same as
 the local system.  This only works in general if the remote machine and the
-local one share the same directories (through NFS)."
+local one share the same directories (e.g. through NFS)."
   (interactive "P")
   (cond
    ((or (null prefix)
--- a/lisp/org/ChangeLog	Tue May 04 23:45:21 2010 -0400
+++ b/lisp/org/ChangeLog	Wed May 05 00:27:16 2010 -0400
@@ -1,3 +1,8 @@
+2010-05-05  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* org-table.el (orgtbl-setup):
+	* org-agenda.el (org-agenda-entry-text-mode): Simplify.
+
 2010-05-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* org-table.el (orgtbl-mode): Use define-minor-mode.
--- a/lisp/org/org-agenda.el	Tue May 04 23:45:21 2010 -0400
+++ b/lisp/org/org-agenda.el	Wed May 05 00:27:16 2010 -0400
@@ -5916,9 +5916,8 @@
 (defun org-agenda-entry-text-mode (&optional arg)
   "Toggle entry text mode in an agenda buffer."
   (interactive "P")
-  (if (integerp arg)
-      (setq org-agenda-entry-text-mode t)
-    (setq org-agenda-entry-text-mode (not org-agenda-entry-text-mode)))
+  (setq org-agenda-entry-text-mode (or (integerp arg)
+                                       (not org-agenda-entry-text-mode)))
   (org-agenda-entry-text-hide)
   (and org-agenda-entry-text-mode
        (let ((org-agenda-entry-text-maxlines
--- a/lisp/org/org-table.el	Tue May 04 23:45:21 2010 -0400
+++ b/lisp/org/org-table.el	Wed May 05 00:27:16 2010 -0400
@@ -3514,34 +3514,33 @@
   "Setup orgtbl keymaps."
   (let ((nfunc 0)
 	(bindings
-	 (list
-	  '([(meta shift left)]  org-table-delete-column)
-	  '([(meta left)]	 org-table-move-column-left)
-	  '([(meta right)]       org-table-move-column-right)
-	  '([(meta shift right)] org-table-insert-column)
-	  '([(meta shift up)]    org-table-kill-row)
-	  '([(meta shift down)]  org-table-insert-row)
-	  '([(meta up)]		 org-table-move-row-up)
-	  '([(meta down)]	 org-table-move-row-down)
-	  '("\C-c\C-w"		 org-table-cut-region)
-	  '("\C-c\M-w"		 org-table-copy-region)
-	  '("\C-c\C-y"		 org-table-paste-rectangle)
-	  '("\C-c-"		 org-table-insert-hline)
-	  '("\C-c}"		 org-table-toggle-coordinate-overlays)
-	  '("\C-c{"		 org-table-toggle-formula-debugger)
-	  '("\C-m"		 org-table-next-row)
-	  '([(shift return)]	 org-table-copy-down)
-	  '("\C-c?"		 org-table-field-info)
-	  '("\C-c "		 org-table-blank-field)
-	  '("\C-c+"		 org-table-sum)
-	  '("\C-c="		 org-table-eval-formula)
-	  '("\C-c'"		 org-table-edit-formulas)
-	  '("\C-c`"		 org-table-edit-field)
-	  '("\C-c*"		 org-table-recalculate)
-	  '("\C-c^"		 org-table-sort-lines)
-	  '("\M-a"		 org-table-beginning-of-field)
-	  '("\M-e"		 org-table-end-of-field)
-	  '([(control ?#)]       org-table-rotate-recalc-marks)))
+	 '(([(meta shift left)]  org-table-delete-column)
+	   ([(meta left)]	 org-table-move-column-left)
+	   ([(meta right)]       org-table-move-column-right)
+	   ([(meta shift right)] org-table-insert-column)
+	   ([(meta shift up)]    org-table-kill-row)
+	   ([(meta shift down)]  org-table-insert-row)
+	   ([(meta up)]		 org-table-move-row-up)
+	   ([(meta down)]	 org-table-move-row-down)
+	   ("\C-c\C-w"		 org-table-cut-region)
+	   ("\C-c\M-w"		 org-table-copy-region)
+	   ("\C-c\C-y"		 org-table-paste-rectangle)
+	   ("\C-c-"		 org-table-insert-hline)
+	   ("\C-c}"		 org-table-toggle-coordinate-overlays)
+	   ("\C-c{"		 org-table-toggle-formula-debugger)
+	   ("\C-m"		 org-table-next-row)
+	   ([(shift return)]	 org-table-copy-down)
+	   ("\C-c?"		 org-table-field-info)
+	   ("\C-c "		 org-table-blank-field)
+	   ("\C-c+"		 org-table-sum)
+	   ("\C-c="		 org-table-eval-formula)
+	   ("\C-c'"		 org-table-edit-formulas)
+	   ("\C-c`"		 org-table-edit-field)
+	   ("\C-c*"		 org-table-recalculate)
+	   ("\C-c^"		 org-table-sort-lines)
+	   ("\M-a"		 org-table-beginning-of-field)
+	   ("\M-e"		 org-table-end-of-field)
+	   ([(control ?#)]       org-table-rotate-recalc-marks)))
 	elt key fun cmd)
     (while (setq elt (pop bindings))
       (setq nfunc (1+ nfunc))
--- a/lisp/subr.el	Tue May 04 23:45:21 2010 -0400
+++ b/lisp/subr.el	Wed May 05 00:27:16 2010 -0400
@@ -1477,8 +1477,7 @@
 	      (let ((rest (cdr found)))
 		(setcdr found nil)
 		(nconc found (list (list toggle name)) rest))
-	    (setq minor-mode-alist (cons (list toggle name)
-					 minor-mode-alist)))))))
+	    (push (list toggle name) minor-mode-alist))))))
   ;; Add the toggle to the minor-modes menu if requested.
   (when (get toggle :included)
     (define-key mode-line-mode-menu
@@ -1507,8 +1506,7 @@
 	      (let ((rest (cdr found)))
 		(setcdr found nil)
 		(nconc found (list (cons toggle keymap)) rest))
-	    (setq minor-mode-map-alist (cons (cons toggle keymap)
-					     minor-mode-map-alist))))))))
+	    (push (cons toggle keymap) minor-mode-map-alist)))))))
 
 ;;; Load history