]> git.eshelyaron.com Git - emacs.git/commitdiff
Minor cleanups.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 5 May 2010 04:27:16 +0000 (00:27 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 5 May 2010 04:27:16 +0000 (00:27 -0400)
* 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.

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

index f2ebf07fd87f2f4d89e58112abce5f62f97c00bc..4c33ae6a193e2ecca4782fea9ed3336de32abb11 100644 (file)
@@ -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)
index 2abde59af9088ac8b68041480016274ed9575dd3..37764a15435d9fec4392335a6133327feaa186db 100644 (file)
@@ -858,8 +858,7 @@ Argument NUM is the number of lines to delete."
 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)))
index 9144be89e96949afed9581a344d789bc16e9ff74..1660721fe216f0a3e32a0f6d0df4e6f72e264563 100644 (file)
@@ -1619,21 +1619,20 @@ error occurs."
               (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))
 
index 1406abecdcb8a7e9b773ba886e6fea28b37e4901..fb3f3339be5a69ab42c910f882ec9da13e2bd30e 100644 (file)
@@ -249,7 +249,7 @@ If called with a positive, numeric prefix argument, e.g.
 ``\\[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)
index 0c420a73debdde08a855303371e21657106cafa1..2b29da02580b574c3a90a6c46f80141092a45ff4 100644 (file)
@@ -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.
index 1cec8a8a227a3317d250669edba5f49b908920f1..50e785282561d7545884254d1d12531f19716cb1 100644 (file)
@@ -5916,9 +5916,8 @@ so that the date SD will be in that range."
 (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
index 98c48baf52c2f701d74dee1daff76edf20967231..bbf9f10bc254f3dad704fd09bcbcedcc91fb0d04 100644 (file)
@@ -3514,34 +3514,33 @@ to execute outside of tables."
   "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))
index 0d57f1ba0c5974a06bccdad2d30760166d8a7a30..0cc05a78bc766ceafa80cdc6d82ca78d701498c4 100644 (file)
@@ -1477,8 +1477,7 @@ If TOGGLE has a `:menu-tag', that is used for the menu item's label."
              (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 @@ If TOGGLE has a `:menu-tag', that is used for the menu item's label."
              (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)))))))
 \f
 ;;; Load history