Skip to content

Commit

Permalink
emacs 24.3 compatibility drop gnus-compile
Browse files Browse the repository at this point in the history
  • Loading branch information
langmartin committed Mar 15, 2013
1 parent 23b8302 commit 5a84dfd
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 40 deletions.
78 changes: 39 additions & 39 deletions goto-last-change.el
@@ -1,4 +1,4 @@
;;; goto-last-change.el --- Move point through buffer-undo-list positions -*-unibyte: t; coding: iso-8859-1;-*-
;;; goto-last-change.el --- Move point through buffer-undo-list positions -*-raw-text: t; coding: iso-8859-1;-*-

;; Copyright © 2003 Kevin Rodgers

Expand Down Expand Up @@ -30,41 +30,41 @@

;; After installing goto-last-change.el in a `load-path' directory and
;; compiling it with `M-x byte-compile-file', load it with
;; (require 'goto-last-change)
;; (require 'goto-last-change)
;; or autoload it with
;; (autoload 'goto-last-change "goto-last-change"
;; "Set point to the position of the last change." t)
;;
;; (autoload 'goto-last-change "goto-last-change"
;; "Set point to the position of the last change." t)
;;
;; You may also want to bind a key to `M-x goto-last-change', e.g.
;; (global-set-key "\C-x\C-\\" 'goto-last-change)
;; (global-set-key "\C-x\C-\\" 'goto-last-change)

;; goto-last-change.el was written in response to to the following:
;;
;;
;; From: Dan Jacobson <jidanni@jidanni.org>
;; Newsgroups: gnu.emacs.bug
;; Subject: function to go to spot of last change
;; Date: Sun, 15 Jun 2003 00:15:08 +0000 (UTC)
;; Sender: news <news@main.gmane.org>
;; Message-ID: <mailman.7910.1055637181.21513.bug-gnu-emacs@gnu.org>
;; NNTP-Posting-Host: monty-python.gnu.org
;;
;;
;;
;;
;; Why of course, a function to get the user to the spot of last changes
;; in the current buffer(s?), that's what emacs must lack.
;;
;;
;; How many times have you found yourself mosying [<-not in spell
;; checker!?] thru a file when you wonder, where the heck was I just
;; editing? Well, the best you can do is hit undo, ^F, and undo again,
;; to get back. Hence the "burning need" for the additional function,
;; which you might name the-jacobson-memorial-function, due to its brilliance.
;; --
;; --
;; http://jidanni.org/ Taiwan(04)25854780

;;; Code:
(provide 'goto-last-change)

(or (fboundp 'last) ; Emacs 20
(require 'cl)) ; Emacs 19
(or (fboundp 'last) ; Emacs 20
(require 'cl)) ; Emacs 19

(defvar goto-last-change-undo nil
"The `buffer-undo-list' entry of the previous \\[goto-last-change] command.")
Expand All @@ -87,11 +87,11 @@ will return point to the current position."
(unless minimal-line-distance
(setq minimal-line-distance 10))
(let ((position nil)
(undo-list (if (and (eq this-command last-command)
goto-last-change-undo)
(cdr (memq goto-last-change-undo buffer-undo-list))
buffer-undo-list))
undo)
(undo-list (if (and (eq this-command last-command)
goto-last-change-undo)
(cdr (memq goto-last-change-undo buffer-undo-list))
buffer-undo-list))
undo)
(while (and undo-list
(or (not position)
(eql position (point))
Expand All @@ -104,29 +104,29 @@ will return point to the current position."
minimal-line-distance))))
(setq undo (car undo-list))
(cond ((and (consp undo) (integerp (car undo)) (integerp (cdr undo)))
;; (BEG . END)
(setq position (cdr undo)))
((and (consp undo) (stringp (car undo))) ; (TEXT . POSITION)
(setq position (abs (cdr undo))))
((and (consp undo) (eq (car undo) t))) ; (t HIGH . LOW)
((and (consp undo) (null (car undo)))
;; (nil PROPERTY VALUE BEG . END)
(setq position (cdr (last undo))))
((and (consp undo) (markerp (car undo)))) ; (MARKER . DISTANCE)
((integerp undo)) ; POSITION
((null undo)) ; nil
(t (error "Invalid undo entry: %s" undo)))
;; (BEG . END)
(setq position (cdr undo)))
((and (consp undo) (stringp (car undo))) ; (TEXT . POSITION)
(setq position (abs (cdr undo))))
((and (consp undo) (eq (car undo) t))) ; (t HIGH . LOW)
((and (consp undo) (null (car undo)))
;; (nil PROPERTY VALUE BEG . END)
(setq position (cdr (last undo))))
((and (consp undo) (markerp (car undo)))) ; (MARKER . DISTANCE)
((integerp undo)) ; POSITION
((null undo)) ; nil
(t (error "Invalid undo entry: %s" undo)))
(setq undo-list (cdr undo-list)))
(cond (position
(setq goto-last-change-undo undo)
(goto-char (min position (point-max))))
((and (eq this-command last-command)
goto-last-change-undo)
(setq goto-last-change-undo nil)
(error "No further undo information"))
(t
(setq goto-last-change-undo nil)
(error "Buffer not modified")))))
(setq goto-last-change-undo undo)
(goto-char (min position (point-max))))
((and (eq this-command last-command)
goto-last-change-undo)
(setq goto-last-change-undo nil)
(error "No further undo information"))
(t
(setq goto-last-change-undo nil)
(error "Buffer not modified")))))

(defun goto-last-change-with-auto-marks (&optional minimal-line-distance)
"Calls goto-last-change and sets the mark at only the first invocations
Expand Down
2 changes: 1 addition & 1 deletion rc-gnus.el
Expand Up @@ -95,7 +95,7 @@
(setq gnus-novice-user nil))
(progn
;; Speed tricks: http://www.gnu.org/software/emacs/manual/html_node/gnus/_005b9_002e2_005d.html
(gnus-compile)
;; (gnus-compile)
(setq gc-cons-threshold 3500000)
(setq gnus-use-correct-string-widths nil))
)
Expand Down

0 comments on commit 5a84dfd

Please sign in to comment.