[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102239: reftex-toc trivia.
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102239: reftex-toc trivia. |
Date: |
Wed, 03 Nov 2010 01:03:42 -0700 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102239
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2010-11-03 01:03:42 -0700
message:
reftex-toc trivia.
* lisp/textmodes/reftex-toc.el (reftex-toc-do-promote): Remove unused
local `mpos'.
(reftex-toc-restore-region): Make `mpos' local to this function.
modified:
lisp/ChangeLog
lisp/textmodes/reftex-toc.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-11-03 07:57:43 +0000
+++ b/lisp/ChangeLog 2010-11-03 08:03:42 +0000
@@ -7,6 +7,8 @@
set-process-query-on-exit-flag.
* textmodes/reftex-toc.el (name1, dummy, dummy2): Remove unused decs.
+ (reftex-toc-do-promote): Remove unused local `mpos'.
+ (reftex-toc-restore-region): Make `mpos' local to this function.
* net/dbus.el (dbus-name-owner-changed-handler): Doc fix.
=== modified file 'lisp/textmodes/reftex-toc.el'
--- a/lisp/textmodes/reftex-toc.el 2010-11-03 07:20:03 +0000
+++ b/lisp/textmodes/reftex-toc.el 2010-11-03 08:03:42 +0000
@@ -546,7 +546,6 @@
;; Promotion/Demotion stuff
(defvar delta)
-(defvar mpos)
(defvar pro-or-de)
(defvar start-pos)
(defvar start-line)
@@ -575,7 +574,7 @@
(if (bolp) 1 0)))))
(start-pos (point))
(pro-or-de (if (> delta 0) "de" "pro"))
- beg end entries data sections nsec mpos msg)
+ beg end entries data sections nsec msg)
(setq msg
(catch 'exit
(if (reftex-region-active-p)
@@ -629,20 +628,20 @@
(defun reftex-toc-restore-region (point-line &optional mark-line)
- (when mark-line
- (goto-char (point-min))
- (forward-line (1- mark-line))
- (setq mpos (point)))
- (when point-line
- (goto-char (point-min))
- (forward-line (1- point-line)))
- (if mark-line
- (progn
- (set-mark mpos)
- (if (featurep 'xemacs)
- (zmacs-activate-region)
- (setq mark-active t
- deactivate-mark nil)))))
+ (let (mpos)
+ (when mark-line
+ (goto-char (point-min))
+ (forward-line (1- mark-line))
+ (setq mpos (point)))
+ (when point-line
+ (goto-char (point-min))
+ (forward-line (1- point-line)))
+ (when mark-line
+ (set-mark mpos)
+ (if (featurep 'xemacs)
+ (zmacs-activate-region)
+ (setq mark-active t
+ deactivate-mark nil)))))
(defun reftex-toc-promote-prepare (x)
"Look at a toc entry and see if we could pro/demote it.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102239: reftex-toc trivia.,
Glenn Morris <=