+2009-08-22 Glenn Morris <rgm@gnu.org>
+
+ * bs.el (bs--redisplay):
+ * cus-edit.el (custom-redraw):
+ * ibuffer.el (ibuffer-bury-buffer):
+ * server.el (server-goto-line-column):
+ * startup.el (command-line-1):
+ * strokes.el (strokes-xpm-for-stroke):
+ * term.el (term-display-buffer-line):
+ * view.el (View-goto-line):
+ * calc/calc.el (calc-do, calc-trail-buffer):
+ * play/gamegrid.el (gamegrid-add-score-insecure):
+ * progmodes/ada-mode.el (ada-compile-goto-error):
+ * progmodes/ada-xref.el (ada-xref-find-in-modified-ali):
+ (ebrowse-select-1st-to-9nth):
+ * progmodes/ebrowse.el (ebrowse-toggle-file-name-display)
+ * progmodes/gud.el (gud-display-line):
+ (idlwave-shell-display-line):
+ * progmodes/idlw-shell.el (idlwave-shell-goto-frame)
+ * progmodes/make-mode.el (makefile-browser-toggle):
+ (vhdl-speedbar-port-copy, vhdl-compose-components-package):
+ * progmodes/vhdl-mode.el (vhdl-speedbar-find-file)
+ * textmodes/picture.el (picture-draw-rectangle):
+ * textmodes/reftex-index.el (reftex-index-goto-letter):
+ (reftex-select-jump-to-previous):
+ * textmodes/reftex-sel.el (reftex-find-start-point)
+ * textmodes/reftex-toc.el (reftex-toc, reftex-toc-restore-region):
+ (rst-straighten-deco-spacing, rst-section-tree, rst-toc):
+ * textmodes/rst.el (rst-promote-region, rst-straighten-decorations)
+ * textmodes/tex-mode.el (tex-compilation-parse-errors):
+ * textmodes/two-column.el (2C-associated-buffer):
+ Use forward-line rather than goto-line.
+
+ * emulation/vi.el (vi-goto-line): Don't warn about non-interactive
+ goto-line.
+
+ * international/ucs-normalize.el (nfd)
+ (decomposition-translation-alist, decomposition-char-recursively)
+ (alist-list-to-vector, quick-check-list, quick-check-list-to-regexp):
+ Declare.
+
+ * progmodes/make-mode.el (makefile-browser-insert-selection): Use
+ goto-char rather than goto-line.
+
+ * progmodes/prolog.el (compilation-error-regexp-alist)
+ (compilation-forget-errors): Declare.
+
2009-08-22 Juri Linkov <juri@jurta.org>
* progmodes/grep.el (lgrep, rgrep): At the beginning
;;; bs.el --- menu for selecting and displaying buffers
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+;; 2007, 2008, 2009 Free Software Foundation, Inc.
;; Author: Olaf Sylvester <Olaf.Sylvester@netsurf.de>
;; Maintainer: Olaf Sylvester <Olaf.Sylvester@netsurf.de>
;; Keywords: convenience
"Redisplay whole Buffer Selection Menu.
If KEEP-LINE-P is non-nil the point will stay on current line.
SORT-DESCRIPTION is an element of `bs-sort-functions'."
- (let ((line (1+ (count-lines 1 (point)))))
+ (let ((line (count-lines 1 (point))))
(bs-show-in-buffer (bs-buffer-list nil sort-description))
(when keep-line-p
- (goto-line line))
+ (goto-char (point-min))
+ (forward-line line))
(beginning-of-line)))
(defun bs--goto-current-buffer ()
;;; calc.el --- the GNU Emacs calculator
-;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, 2005,
+;; 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
(and (memq 'position-point calc-command-flags)
(if (eq major-mode 'calc-mode)
(progn
- (goto-line calc-final-point-line)
+ (goto-char (point-min))
+ (forward-line (1- calc-final-point-line))
(move-to-column calc-final-point-column))
(save-current-buffer
(calc-select-buffer)
- (goto-line calc-final-point-line)
+ (goto-char (point-min))
+ (forward-line (1- calc-final-point-line))
(move-to-column calc-final-point-column))))
(unless (memq 'keep-flags calc-command-flags)
(save-excursion
(eq (marker-buffer calc-trail-pointer) calc-trail-buffer))
(save-excursion
(set-buffer calc-trail-buffer)
- (goto-line 2)
+ (goto-char (point-min))
+ (forward-line 1)
(setq calc-trail-pointer (point-marker))))
calc-trail-buffer)
(when (and (>= pos from) (<= pos to))
(condition-case nil
(progn
- (if (> column 0)
- (goto-line line)
- (goto-line (1+ line)))
+ (goto-char (point-min))
+ (forward-line (if (> column 0)
+ (1- line)
+ line))
(move-to-column column))
(error nil)))))
;;; ibuffer.el --- operate on buffers like dired
-;; Copyright (C) 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+;; 2009 Free Software Foundation, Inc.
;; Author: Colin Walters <walters@verbum.org>
;; Maintainer: John Paul Wallington <jpw@gnu.org>
(line (+ 1 (count-lines 1 (point)))))
(bury-buffer buf)
(ibuffer-update nil t)
- (goto-line line)))
+ (goto-char (point-min))
+ (forward-line (1- line))))
(defun ibuffer-visit-tags-table ()
"Visit the tags table in the buffer on this line. See `visit-tags-table'."
(t ""))))
(sort-fields 1 (point-min) (point-max))
(reverse-region (point-min) (point-max))
- (goto-line (1+ gamegrid-score-file-length))
+ (goto-char (point-min))
+ (forward-line gamegrid-score-file-length)
(delete-region (point) (point-max))
(setq buffer-read-only t)
(save-buffer)))
;;; ada-mode.el --- major-mode for editing Ada sources
;; Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Author: Rolf Ebert <ebert@inf.enst.fr>
;; Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de>
(const ada-no-auto-case))
:group 'ada)
+;; FIXME If this is not something required by the ada language, this
+;; should be removed.
(defcustom ada-clean-buffer-before-saving t
"*Non-nil means remove trailing spaces and untabify the buffer before saving."
:type 'boolean :group 'ada)
(compilation-find-file (point-marker) (match-string 1) "./")
(set-buffer file)
- (if (stringp line)
- (goto-line (string-to-number line)))
+ (when (stringp line)
+ (goto-char (point-min))
+ (forward-line (1- (string-to-number line))))
(setq source (point-marker)))
;; ada-xref.el --- for lookup and completion in Ada mode
;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-;; 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Author: Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de>
;; Rolf Ebert <ebert@inf.enst.fr>
(ada-name-of identlist)))
;; one => should be the right one
((= len 1)
- (goto-line (caar declist)))
+ (goto-char (point-min))
+ (forward-line (1- (caar declist))))
;; more than one => display choice list
(t
(read-from-minibuffer "Enter No. of your choice: "))))
)
(set-buffer ali-buffer)
- (goto-line (car (nth (1- choice) declist)))
+ (goto-char (point-min))
+ (forward-line (1- (car (nth (1- choice) declist))))
))))))
;; move the cursor to the correct position
(push-mark)
- (goto-line line)
+ (goto-char (point-min))
+ (forward-line (1- line))
(move-to-column column)
;; If we are not on the identifier, the ali file was not up-to-date.
;;; ebrowse.el --- Emacs C++ class browser & tags facility
;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
;; Free Software Foundation Inc.
;; Author: Gerd Moellmann <gerd@gnu.org>
(setf ebrowse--show-file-names-flag (not ebrowse--show-file-names-flag))
(let ((old-line (count-lines (point-min) (point))))
(ebrowse-redraw-tree)
- (goto-line old-line)))
+ (goto-char (point-min))
+ (forward-line (1- old-line))))
\f
(interactive)
(let* ((maxlin (count-lines (point-min) (point-max)))
(n (min maxlin (+ 2 (string-to-number (this-command-keys))))))
- (goto-line n)
+ (goto-char (point-min))
+ (forward-line (1- n))
(throw 'electric-buffer-menu-select (point))))
;;; gud.el --- Grand Unified Debugger mode for running GDB and other debuggers
+;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001, 2002, 2003,
+;; 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+
;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
;; Maintainer: FSF
;; Keywords: unix, tools
-;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001, 2002, 2003,
-;; 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
(setq gud-keep-buffer t)))
(save-restriction
(widen)
- (goto-line line)
+ (goto-char (point-min))
+ (forward-line (1- line))
(setq pos (point))
(or gud-overlay-arrow-position
(setq gud-overlay-arrow-position (make-marker)))
;; idlw-shell.el --- run IDL as an inferior process of Emacs.
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+;; 2009 Free Software Foundation, Inc.
;; Authors: J.D. Smith <jdsmith@as.arizona.edu>
;; Carsten Dominik <dominik@astro.uva.nl>
(frame
(set-buffer (idlwave-find-file-noselect (car frame) 'shell))
(widen)
- (goto-line (nth 1 frame)))))
+ (goto-char (point-min))
+ (forward-line (1- (nth 1 frame))))))
(defun idlwave-shell-pc-frame ()
"Returns the frame for IDL execution."
(set-buffer buffer)
(save-restriction
(widen)
- (goto-line (nth 1 frame))
- (forward-line 0)
+ (goto-char (point-min))
+ (forward-line (1- (nth 1 frame)))
(setq pos (point))
(setq idlwave-shell-is-stopped t)
(let ((buffer (get-file-buffer (car token))))
(speedbar-find-file-in-frame (car token))
(when (or vhdl-speedbar-jump-to-unit buffer)
- (goto-line (cdr token))
+ (goto-char (point-min))
+ (forward-line (1- (cdr token)))
(recenter))
(vhdl-speedbar-update-current-unit t t)
(speedbar-set-timer dframe-update-speed)
(let ((token (get-text-property
(match-beginning 3) 'speedbar-token)))
(vhdl-visit-file (car token) t
- (progn (goto-line (cdr token))
+ (progn (goto-char (point-min))
+ (forward-line (1- (cdr token)))
(end-of-line)
(if is-entity
(vhdl-port-copy)
;; insert component declarations
(while ent-alist
(vhdl-visit-file (nth 2 (car ent-alist)) nil
- (progn (goto-line (nth 3 (car ent-alist)))
+ (progn (goto-char (point-min))
+ (forward-line (1- (nth 3 (car ent-alist))))
(end-of-line)
(vhdl-port-copy)))
(goto-char component-pos)
;;; server.el --- Lisp code for GNU Emacs running as server process
;; Copyright (C) 1986, 1987, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+;; Free Software Foundation, Inc.
;; Author: William Sommerfeld <wesommer@athena.mit.edu>
;; Maintainer: FSF
"Move point to the position indicated in LINE-COL.
LINE-COL should be a pair (LINE . COL)."
(when line-col
- (goto-line (car line-col))
+ (goto-char (point-min))
+ (forward-line (1- (car line-col)))
(let ((column-number (cdr line-col)))
(when (> column-number 0)
(move-to-column (1- column-number))))))
(if (= file-count 1)
(setq first-file-buffer (find-file file))
(find-file-other-window file)))
- (or (zerop line)
- (goto-line line))
+ (unless (zerop line)
+ (goto-char (point-min))
+ (forward-line (1- line)))
(setq line 0)
(unless (< column 1)
(move-to-column (1- column)))
(inhibit-startup-screen
(find-file-other-window file))
(t (find-file file))))
- (or (zerop line)
- (goto-line line))
+ (unless (zerop line)
+ (goto-char (point-min))
+ (forward-line (1- line)))
(setq line 0)
(unless (< column 1)
(move-to-column (1- column)))
(let ((char (or (car rainbow-chars) ?\.)))
(loop for i from 0 to 2 do
(loop for j from 0 to 2 do
- (goto-line (+ 16 i y))
+ (goto-char (point-min))
+ (forward-line (+ 15 i y))
(forward-char (+ 1 j x))
(delete-char 1)
(insert char)))
(setq rainbow-chars (cdr rainbow-chars)
lift-flag nil))
;; Otherwise, just plot the point...
- (goto-line (+ 17 y))
+ (goto-char (point-min))
+ (forward-line (+ 16 y))
(forward-char (+ 2 x))
(subst-char-in-region (point) (1+ (point)) ?\s ?\*)))
((strokes-lift-p point)
(set-buffer buffer)
(save-restriction
(widen)
- (goto-line line)
+ (goto-char (point-min))
+ (forward-line (1- line))
(setq pos (point))
(setq overlay-arrow-string "=>")
(or overlay-arrow-position
;;; picture.el --- "Picture mode" -- editing using quarter-plane screen model
-;; Copyright (C) 1985, 1994, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: K. Shane Hartman
;; Maintainer: FSF
(left (min c1 c2))
(top (min r1 r2))
(bottom (max r1 r2)))
- (goto-line top)
+ (goto-char (point-min))
+ (forward-line (1- top))
(move-to-column left t)
(picture-update-desired-column t)
(picture-insert picture-rectangle-v (- (picture-current-line) top))
(picture-set-motion pvs phs)
- (goto-line sl)
+ (goto-char (point-min))
+ (forward-line (1- sl))
(move-to-column sc t)))
\f
"Go to the CHAR section in the index."
(let ((pos (point))
(case-fold-search nil))
- (goto-line 3)
+ (goto-char (point-min))
+ (forward-line 2)
(if (re-search-forward (concat "^" (char-to-string char)) nil t)
(progn
(beginning-of-line)
(defun reftex-select-label-mode ()
"Major mode for selecting a label in a LaTeX document.
This buffer was created with RefTeX.
-It only has a meaningful keymap when you are in the middle of a
+It only has a meaningful keymap when you are in the middle of a
selection process.
To select a label, move the cursor to it and press RET.
Press `?' for a summary of important key bindings.
(defun reftex-select-bib-mode ()
"Major mode for selecting a citation key in a LaTeX document.
This buffer was created with RefTeX.
-It only has a meaningful keymap when you are in the middle of a
+It only has a meaningful keymap when you are in the middle of a
selection process.
In order to select a citation, move the cursor to it and press RET.
Press `?' for a summary of important key bindings.
note (nth 5 cell))
(when (and labels
- (or (eq labels t)
+ (or (eq labels t)
(string= typekey labels)
(string= labels " "))
(or show-commented (null comment)))
(put-text-property from to :data cell)
(when mouse-face
(put-text-property from (1- to)
- 'mouse-face mouse-face))
+ 'mouse-face mouse-face))
(goto-char to)))
((eq (car cell) 'index)
(when font
(setq to (point))
- (put-text-property
+ (put-text-property
(- (point) (length (nth 7 cell))) to
'face index-face)
(goto-char to))
(put-text-property from to :data cell)
(when mouse-face
(put-text-property from (1- to)
- 'mouse-face mouse-face))
+ 'mouse-face mouse-face))
(goto-char to))))
- (if (eq cell here-I-am)
+ (if (eq cell here-I-am)
(setq offset 'attention))
(if (and prev-inserted (eq offset 'attention))
(setq offset prev-inserted))
((listp loc)
(setq pos (text-property-any (point-min) (point-max) :data loc))
(when pos
- (goto-char pos)
+ (goto-char pos)
(throw 'exit t)))
((integerp loc)
(when (<= loc (count-lines (point-min) (point-max)))
- (goto-line loc)
+ (goto-char (point-min))
+ (forward-line (1- loc))
(throw 'exit t)))))
(goto-char fallback))))
(setq truncate-lines t)
;; Find a good starting point
- (reftex-find-start-point
+ (reftex-find-start-point
(point-min) offset reftex-last-data reftex-last-line)
(beginning-of-line 1)
(set (make-local-variable 'reftex-last-follow-point) (point))
(let (b e)
(setq data (get-text-property (point) :data))
(setq last-data (or data last-data))
-
+
(when (and data cb-flag
(not (equal reftex-last-follow-point (point))))
(setq reftex-last-follow-point (point))
- (funcall call-back data reftex-callback-fwd
+ (funcall call-back data reftex-callback-fwd
(not reftex-revisit-to-follow)))
(if data
(setq b (or (previous-single-property-change
(goto-char pos))
((and (local-variable-p 'reftex-last-line (current-buffer))
(integerp reftex-last-line))
- (goto-line reftex-last-line))
+ (goto-char (point-min))
+ (forward-line (1- reftex-last-line)))
(t (ding)))))
(defun reftex-select-toggle-follow ()
"Toggle follow mode: Other window follows with full context."
(defun reftex-select-read-label ()
"Use minibuffer to read a label to reference, with completion."
(interactive)
- (let ((label (completing-read
+ (let ((label (completing-read
"Label: " (symbol-value reftex-docstruct-symbol)
nil nil reftex-prefix)))
(unless (or (equal label "") (equal label reftex-prefix))
([(up)] . reftex-select-previous)
("f" . reftex-select-toggle-follow)
("\C-m" . reftex-select-accept)
- ([(return)] . reftex-select-accept)
+ ([(return)] . reftex-select-accept)
("q" . reftex-select-quit)
("." . reftex-select-show-insertion-point)
("?" . reftex-select-help))
(define-key map [(button2)] 'reftex-select-mouse-accept)
(define-key map [(mouse-2)] 'reftex-select-mouse-accept)
(define-key map [follow-link] 'mouse-face))
-
+
;; Digit arguments
(loop for key across "0123456789" do
;; Specific bindings in reftex-select-label-map
(loop for key across "aAcgFlrRstx#%" do
(define-key reftex-select-label-map (vector (list key))
- (list 'lambda '()
+ (list 'lambda '()
"Press `?' during selection to find out about this key."
'(interactive) (list 'throw '(quote myexit) key))))
;; Specific bindings in reftex-select-bib-map
(loop for key across "grRaAeE" do
(define-key reftex-select-bib-map (vector (list key))
- (list 'lambda '()
+ (list 'lambda '()
"Press `?' during selection to find out about this key."
'(interactive) (list 'throw '(quote myexit) key))))
("m" . reftex-select-mark)
("u" . reftex-select-unmark))
do (define-key reftex-select-bib-map (car x) (cdr x)))
-
+
;; arch-tag: 842078ff-0586-4e0b-957e-536e08218464
;;; reftex-sel.el ends here
;;; reftex-toc.el --- RefTeX's table of contents mode
-;; Copyright (C) 1997, 1998, 1999, 2000, 2003, 2004, 2005,
-;; 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+
+;; Copyright (C) 1997, 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2007,
+;; 2008, 2009 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: auctex-devel@gnu.org
(frame-parameter (selected-frame) 'unsplittable)))
offset toc-window)
- (if (setq toc-window (get-buffer-window
+ (if (setq toc-window (get-buffer-window
"*toc*"
(if reuse 'visible)))
(select-window toc-window)
(split-window-horizontally
(floor (* (window-width)
reftex-toc-split-windows-fraction)))
- (split-window-vertically
+ (split-window-vertically
(floor (* (window-height)
reftex-toc-split-windows-fraction)))))
reftex-toc-include-context
nil ; counter
nil ; commented
- here-I-am
+ here-I-am
"" ; xr-prefix
t ; a toc buffer
))
-
+
(run-hooks 'reftex-display-copied-context-hook)
(message "Building *toc* buffer...done.")
(setq buffer-read-only t))
t
reftex-toc-include-index-entries
reftex-toc-include-file-boundaries)
- (reftex-last-assoc-before-elt
+ (reftex-last-assoc-before-elt
'toc here-I-am
(symbol-value reftex-docstruct-symbol))))
(put 'reftex-toc :reftex-line 3)
- (goto-line 3)
- (beginning-of-line)))
+ (goto-char (point-min))
+ (forward-line 2)))
;; Find the correct starting point
(reftex-find-start-point (point) offset (get 'reftex-toc :reftex-line))
(not (get-text-property (point) 'intangible))
(memq reftex-highlight-selection '(cursor both))
(reftex-highlight 2
- (or (previous-single-property-change
+ (or (previous-single-property-change
(min (point-max) (1+ (point))) :data)
(point-min))
(or (next-single-property-change (point) :data)
(window-height))))))
(defun reftex-toc-dframe-p (&optional frame error)
- ;; Check if FRAME is the dedicated TOC frame.
+ ;; Check if FRAME is the dedicated TOC frame.
;; If yes, and ERROR is non-nil, throw an error.
(setq frame (or frame (selected-frame)))
- (let ((res (equal
+ (let ((res (equal
(if (fboundp 'frame-property)
(frame-property frame 'name)
(frame-parameter frame 'name))
(when (featurep 'xemacs) (setq zmacs-region-stays t))
(setq reftex-callback-fwd t)
(or (eobp) (forward-char 1))
- (goto-char (or (next-single-property-change (point) :data)
+ (goto-char (or (next-single-property-change (point) :data)
(point))))
(defun reftex-toc-previous (&optional arg)
"Move to previous selectable item."
With prefix ARG, prompt for a label type and include only labels of
that specific type."
(interactive "P")
- (setq reftex-toc-include-labels
+ (setq reftex-toc-include-labels
(if arg (reftex-query-label-type)
(not reftex-toc-include-labels)))
(reftex-toc-revert))
(defun reftex-toc-rescan (&rest ignore)
"Regenerate the *toc* buffer by reparsing file of section at point."
(interactive)
- (if (and reftex-enable-partial-scans
+ (if (and reftex-enable-partial-scans
(null current-prefix-arg))
(let* ((data (get-text-property (point) :data))
(what (car data))
(defun reftex-toc-revert (&rest ignore)
"Regenerate the *toc* from the internal lists."
(interactive)
- (let ((unsplittable
+ (let ((unsplittable
(if (fboundp 'frame-property)
(frame-property (selected-frame) 'unsplittable)
(frame-parameter (selected-frame) 'unsplittable)))
(goto-char start-pos)
(setq sections (reftex-toc-extract-section-number (car entries)))
(if (> (setq nsec (length entries)) 1)
- (setq sections
+ (setq sections
(concat sections "-"
(reftex-toc-extract-section-number
(nth (1- nsec) entries)))))
(save-window-excursion
(reftex-toc-Rescan))
(reftex-toc-restore-region start-line mark-line)
- (message "%d section%s %smoted"
+ (message "%d section%s %smoted"
nsec (if (= 1 nsec) "" "s") pro-or-de)
nil))
(if msg (progn (ding) (message "%s" msg)))))
(defun reftex-toc-restore-region (point-line &optional mark-line)
- (if mark-line
- (progn (goto-line mark-line)
- (setq mpos (point))))
- (if point-line (goto-line point-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)
(error "This is not a label entry."))
(setq newlabel (read-string (format "Rename label \"%s\" to:" label)))
(if (assoc newlabel (symbol-value reftex-docstruct-symbol))
- (if (not (y-or-n-p
+ (if (not (y-or-n-p
(format "Label '%s' exists. Use anyway? " label)))
(error "Abort")))
(save-excursion
(reftex-query-replace-document
(concat "{" (regexp-quote label) "}")
(format "{%s}" newlabel))
- (error t))))
+ (error t))))
(reftex-toc-rescan)))
show-window show-buffer match)
(unless toc (error "Don't know which toc line to visit"))
-
+
(cond
-
+
((eq (car toc) 'toc)
;; a toc entry
(setq match (reftex-toc-find-section toc no-revisit)))
(file (nth 1 toc)))
(if (or (not no-revisit) (reftex-get-buffer-visiting file))
(progn
- (switch-to-buffer-other-window
+ (switch-to-buffer-other-window
(reftex-get-file-buffer-force file nil))
(goto-char (if (eq where 'bof) (point-min) (point-max))))
(message "%s" reftex-no-follow-message) nil))))
(looking-at (reftex-make-desperate-section-regexp literal))
(looking-at (concat "\\\\"
(regexp-quote
- (car
- (rassq level
+ (car
+ (rassq level
reftex-section-levels-all)))
"[[{]?"))))
((or (not no-revisit)
(define-key reftex-toc-map (vector (list key)) 'digit-argument))
(define-key reftex-toc-map "-" 'negative-argument)
-(easy-menu-define
+(easy-menu-define
reftex-toc-menu reftex-toc-map
"Menu for Table of Contents buffer"
'("TOC"
["Context" reftex-toc-toggle-context :style toggle
:selected reftex-toc-include-context]
"--"
- ["Follow Mode" reftex-toc-toggle-follow :style toggle
+ ["Follow Mode" reftex-toc-toggle-follow :style toggle
:selected reftex-toc-follow-mode]
["Auto Recenter" reftex-toggle-auto-toc-recenter :style toggle
:selected reftex-toc-auto-recenter-timer]
(let (m line)
(while (and cur (< (setq line (caar cur)) region-end-line))
(setq m (make-marker))
- (goto-line line)
+ (goto-char (point-min))
+ (forward-line (1- line))
(push (list (set-marker m (point)) (cdar cur)) marker-list)
(setq cur (cdr cur)) ))
(lambda (deco)
(cons (rst-position (cdr deco) hier)
(let ((m (make-marker)))
- (goto-line (car deco))
+ (goto-char (point-min))
+ (forward-line (1- (car deco)))
(set-marker m (point))
m)))
alldecos))
;; adjust for the changes in the document.
(dolist (deco (nreverse alldecos))
;; Go to the appropriate position.
- (goto-line (car deco))
+ (goto-char (point-min))
+ (forward-line (1- (car deco)))
(insert "@\n")
;; FIXME: todo, we
)
(save-excursion
(setq lines
(mapcar (lambda (deco)
- (goto-line (car deco))
+ (goto-char (point-min))
+ (forward-line (1- (car deco)))
(list (gethash (cons (cadr deco) (caddr deco)) levels)
(rst-get-stripped-line)
(let ((m (make-marker)))
(set (make-local-variable 'rst-toc-return-buffer) curbuf)
;; Move the cursor near the right section in the TOC.
- (goto-line line)
+ (goto-char (point-min))
+ (forward-line (1- line))
))
;; If the index is positive, goto the line, otherwise go to the buffer
;; boundaries.
(if (and cur (>= idx 0))
- (goto-line (car cur))
+ (progn
+ (goto-char (point-min))
+ (forward-line (1- (car cur))))
(if (> offset 0) (goto-char (point-max)) (goto-char (point-min))))
))
(with-syntax-table tex-error-parse-syntax-table
(backward-up-list 1)
(skip-syntax-forward "(_")
- (while (not
+ (while (not
(and (setq try-filename (thing-at-point
'filename))
(not (string= "" try-filename))
(find-file-noselect filename))
(save-excursion
(if new-file
- (progn (goto-line linenum) (setq last-position nil))
+ (progn
+ (goto-char (point-min))
+ (forward-line (1- linenum))
+ (setq last-position nil))
(goto-char last-position)
(forward-line (- linenum last-linenum)))
;; first try a forward search for the error text,
(if (get-buffer-window (2C-other t))
(select-window (get-buffer-window (2C-other)))
(switch-to-buffer (2C-other)))
- (newline (goto-line line))
+ (goto-char (point-min))
+ (newline (forward-line (1- line)))
(if col
(move-to-column col)
(end-of-line 1))))
Also set the mark at the position where point was."
(interactive "p")
(push-mark)
- (goto-line line)
+ (goto-char (point-min))
+ (forward-line (1- line))
(view-recenter))
(defun View-back-to-mark (&optional ignore)