summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog48
-rw-r--r--lisp/calendar/appt.el72
-rw-r--r--lisp/emacs-lisp/eieio.el2
-rw-r--r--lisp/gnus/ChangeLog18
-rw-r--r--lisp/gnus/gnus-group.el2
-rw-r--r--lisp/gnus/gnus-sum.el6
-rw-r--r--lisp/gnus/nntp.el3
-rw-r--r--lisp/gnus/shr.el3
-rw-r--r--lisp/info-look.el28
-rw-r--r--lisp/mail/mail-utils.el2
-rw-r--r--lisp/net/tramp.el12
-rw-r--r--lisp/progmodes/cc-defs.el2
-rw-r--r--lisp/progmodes/grep.el1
-rw-r--r--lisp/progmodes/idlw-shell.el2
-rw-r--r--lisp/progmodes/python.el4
-rw-r--r--lisp/shell.el2
-rw-r--r--lisp/vc/diff-mode.el80
17 files changed, 194 insertions, 93 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 48be120982b..1fc7cc88f8d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,6 +1,50 @@
-2011-05-16 Paul Eggert <eggert@cs.ucla.edu>
+2011-05-17 Stefan Monnier <monnier@iro.umontreal.ca>
- * vc/diff-mode.el (diff-fixup-modifs): Remove stray ')' (Bug#8672).
+ * progmodes/grep.el (grep-mode): Disable default
+ compilation-directory-matcher setting (bug#8684).
+
+2011-05-17 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp.el (tramp-handle-insert-file-contents): Use "dd"
+ instead of "head" and "tail". There were problems with SunOS 5.9,
+ and it performs better.
+
+2011-05-17 Glenn Morris <rgm@gnu.org>
+
+ * mail/mail-utils.el (mail-dont-reply-to): Silence compiler.
+
+ * progmodes/idlw-shell.el (idlwave-shell-complete-filename):
+ Replace obsolete function.
+
+ * shell.el (pcomplete-parse-arguments-function): Declare.
+
+ * calendar/appt.el (appt-message-warning-time, appt-display-mode-line)
+ (appt-display-diary, appt-display-interval, appt-prev-comp-time)
+ (appt-check): Doc fixes.
+ (appt-disp-window-function, appt-delete-window-function):
+ Remove needless special case in custom :type.
+ (appt-display-count): Default to 0, not nil.
+ (appt-check): Reset appt-display-count to 0, not nil.
+
+2011-05-17 Juanma Barranquero <lekktu@gmail.com>
+
+ * progmodes/python.el (python-font-lock-keywords):
+ Add the Python 3.X keyword "nonlocal" (bug#8639).
+
+2011-05-16 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/eieio.el (defmethod): Fix quoting of code (bug#8677).
+
+2011-05-16 Kevin Ryde <user42@zip.com.au>
+
+ * info-look.el (makefile-automake-mode): New setups, looking in
+ automake manual, then makefile-mode.
+ (makefile-mode): Remove automake manual, have it just in
+ makefile-automake-mode since there's various things different or
+ not relevant to plain make.
+ (makefile-mode): Remove "other-modes" non-existent automake-mode,
+ believe a hypothetical automake-mode would go to makefile-mode,
+ not the other way around.
2011-05-15 Chong Yidong <cyd@stupidchicken.com>
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index d547102a6ee..7fde9e348db 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -62,15 +62,10 @@
;; `appt-check' reads.
;;
;; You can change the way the appointment window is created/deleted by
-;; setting the variables
-;;
-;; appt-disp-window-function
-;; and
-;; appt-delete-window-function
-;;
-;; For instance, these variables could be set to functions that display
-;; appointments in pop-up frames, which are lowered or iconified after
-;; `appt-display-interval' minutes.
+;; setting the variables `appt-disp-window-function' and
+;; `appt-delete-window-function'. For instance, you could be set them
+;; to functions that display appointments in pop-up frames, which are
+;; lowered or iconified after `appt-display-interval' minutes.
;;
;;; Code:
@@ -84,7 +79,8 @@
:group 'calendar)
(defcustom appt-message-warning-time 12
- "Default time in minutes before an appointment that the warning begins."
+ "Default time in minutes before an appointment that the warning begins.
+You probably want to make `appt-display-interval' a factor of this."
:type 'integer
:group 'appt)
@@ -122,7 +118,9 @@ See also `appt-audible' and `appt-display-mode-line'."
(defcustom appt-display-mode-line t
"Non-nil means display minutes to appointment and time on the mode line.
-This is in addition to any other display of appointment messages."
+This is in addition to any other display of appointment messages.
+The mode line updates every minute, independent of the value of
+`appt-display-interval'."
:type 'boolean
:group 'appt)
@@ -134,12 +132,21 @@ Only relevant if reminders are to be displayed in their own window."
(defcustom appt-display-diary t
"Non-nil displays the diary when the appointment list is first initialized.
-This will occur at midnight when the appointment list is updated."
+This occurs when this package is first activated, and then at
+midnight when the appointment list updates."
:type 'boolean
:group 'appt)
(defcustom appt-display-interval 3
- "Number of minutes to wait between checking the appointment list."
+ "Interval in minutes at which to display appointment reminders.
+Once an appointment becomes due, Emacs displays reminders every
+`appt-display-interval' minutes. You probably want to make
+`appt-message-warning-time' be a multiple of this, so that you get
+a final message displayed precisely when the appointment is due.
+
+Note that this variable controls the interval at which
+`appt-display-message' is called. The mode line display (if active)
+always updates every minute."
:type 'integer
:group 'appt)
@@ -148,15 +155,13 @@ This will occur at midnight when the appointment list is updated."
Only relevant if reminders are being displayed in a window.
It should take three string arguments: the number of minutes till
the appointment, the current time, and the text of the appointment."
- :type '(choice (const appt-disp-window)
- function)
+ :type 'function
:group 'appt)
(defcustom appt-delete-window-function 'appt-delete-window
"Function called to remove appointment window and buffer.
Only relevant if reminders are being displayed in a window."
- :type '(choice (const appt-delete-window)
- function)
+ :type 'function
:group 'appt)
@@ -194,10 +199,9 @@ Only used if `appt-display-mode-line' is non-nil.")
(put 'appt-mode-string 'risky-local-variable t) ; for 'face property
(defvar appt-prev-comp-time nil
- "Time of day (mins since midnight) at which we last checked appointments.
-A nil value forces the diary file to be (re-)checked for appointments.")
+ "Time of day (mins since midnight) at which we last checked appointments.")
-(defvar appt-display-count nil
+(defvar appt-display-count 0
"Internal variable used to count number of consecutive reminders.")
(defvar appt-timer nil
@@ -249,29 +253,28 @@ The following variables control appointment notification:
Controls the format in which reminders are displayed.
`appt-audible'
- Variable used to determine if reminder is audible.
- Default is t.
+ Non-nil means there is an audible component to reminders.
`appt-message-warning-time'
- Variable used to determine when appointment message
- should first be displayed.
+ The default number of minutes in advance at which reminders
+ should start.
`appt-display-mode-line'
- If non-nil, a generic message giving the time remaining
- is shown in the mode-line when an appointment is due.
+ Non-nil means show in the mode line a countdown to the
+ time of each appointment, once reminders start.
`appt-display-interval'
- Interval in minutes at which to check for pending appointments.
+ Interval in minutes at which to display appointment messages.
`appt-display-diary'
- Display the diary buffer when the appointment list is
- initialized for the first time in a day.
+ Non-nil means display the diary whenever the appointment list is
+ initialized (e.g. the first time we check for appointments each day).
The following variables are only relevant if reminders are being
displayed in a window:
`appt-display-duration'
- The number of seconds an appointment message is displayed.
+ Number of seconds for which an appointment message is displayed.
`appt-disp-window-function'
Function called to display appointment window.
@@ -281,7 +284,7 @@ displayed in a window:
(interactive "P") ; so people can force updates
(let* ((min-to-app -1)
(prev-appt-mode-string appt-mode-string)
- (prev-appt-display-count (or appt-display-count 0))
+ (prev-appt-display-count appt-display-count)
now now-mins appt-mins appt-warn-time)
(save-excursion ; FIXME ?
;; Convert current time to minutes after midnight (12.01am = 1).
@@ -301,9 +304,12 @@ displayed in a window:
;; diary-number-of-entries. Since appt.el only
;; works on a daily basis, no need for more entries.
(diary-list-entries (calendar-current-date) 1 t)))))
+ ;; Reset everything now in case we somehow missed a minute,
+ ;; or (more likely) an appt was deleted. (This is the only
+ ;; reason we need prev-appt-display-count.)
(setq appt-prev-comp-time now-mins
appt-mode-string nil
- appt-display-count nil)
+ appt-display-count 0)
;; Remove any entries that are in the past.
;; FIXME how can there be any such entries, given that this
;; function removes entries when they hit zero minutes,
@@ -354,7 +360,7 @@ displayed in a window:
;; appointment on the next cycle.
(if (zerop min-to-app)
(setq appt-time-msg-list (cdr appt-time-msg-list)
- appt-display-count nil)
+ appt-display-count 0)
(setq appt-display-count (1+ prev-appt-display-count)))))
;; If we have changed the mode line string, redisplay all mode lines.
(and appt-display-mode-line
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 6abf9aa3657..8c5260106a8 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -1308,7 +1308,7 @@ Summary:
(defgeneric ,method ,args
,(or (documentation code)
(format "Generically created method `%s'." method)))
- (eieio--defmethod ',method ',key ',class ',code))))
+ (eieio--defmethod ',method ',key ',class #',code))))
(defun eieio--defmethod (method kind argclass code)
"Work part of the `defmethod' macro defining METHOD with ARGS."
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 8dad14c44ae..068093159e3 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,21 @@
+2011-05-17 Glenn Morris <rgm@gnu.org>
+
+ * gnus-group.el (gnus-import-other-newsrc-file):
+ Use insert-file-contents.
+
+2011-05-16 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * gnus-sum.el (gnus-summary-hide-all-threads): Add update message every
+ 1000 iterations.
+
+2011-05-16 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * nntp.el (nntp-open-connection): Check if process-type is available.
+
+2011-05-16 Julien Danjou <julien@danjou.info>
+
+ * shr.el (shr-tag-del): Add support for del tag.
+
2011-05-13 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-html.el (gnus-html-put-image): Register a displayer.
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index c265538e19c..a21faa8c983 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -4407,7 +4407,7 @@ and the second element is the address."
;; file. Use with caution, if at all.
(defun gnus-import-other-newsrc-file (file)
(with-temp-buffer
- (insert-file file)
+ (insert-file-contents file)
(let (form)
(while (ignore-errors
(setq form (read (current-buffer))))
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 3cbb479e068..53c2e5e596f 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -11533,8 +11533,12 @@ will not be hidden."
(interactive)
(save-excursion
(goto-char (point-min))
- (let ((end nil))
+ (let ((end nil)
+ (count 0))
(while (not end)
+ (incf count)
+ (when (zerop (mod count 1000))
+ (message "Hiding all threads... %d" count))
(when (or (not predicate)
(gnus-map-articles
predicate (gnus-summary-article-children)))
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el
index aa4b9184dbb..cdd12abbc06 100644
--- a/lisp/gnus/nntp.el
+++ b/lisp/gnus/nntp.el
@@ -1362,7 +1362,8 @@ password contained in '~/.nntp-authinfo'."
(nntp-kill-buffer pbuffer))
(when (and (buffer-name pbuffer)
process)
- (when (and (fboundp 'set-network-process-option)
+ (when (and (fboundp 'set-network-process-option) ;; Unavailable in XEmacs.
+ (fboundp 'process-type) ;; Emacs 22 doesn't provide it.
(eq (process-type process) 'network))
;; Use TCP-keepalive so that connections that pass through a NAT router
;; don't hang when left idle.
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el
index edd106618df..d23d9c7724b 100644
--- a/lisp/gnus/shr.el
+++ b/lisp/gnus/shr.el
@@ -780,6 +780,9 @@ ones, in case fg and bg are nil."
(defun shr-tag-s (cont)
(shr-fontize-cont cont 'shr-strike-through))
+(defun shr-tag-del (cont)
+ (shr-fontize-cont cont 'shr-strike-through))
+
(defun shr-tag-b (cont)
(shr-fontize-cont cont 'bold))
diff --git a/lisp/info-look.el b/lisp/info-look.el
index 6baed1c422d..5e51fcc9b9d 100644
--- a/lisp/info-look.el
+++ b/lisp/info-look.el
@@ -720,11 +720,31 @@ Return nil if there is nothing appropriate in the buffer near point."
:mode 'makefile-mode
:regexp "\\$[^({]\\|\\.[_A-Z]*\\|[_a-zA-Z][_a-zA-Z0-9-]*"
:doc-spec '(("(make)Name Index" nil
- "^[ \t]*`" "'")
- ("(automake)Macro and Variable Index" nil
"^[ \t]*`" "'"))
- :parse-rule "\\$[^({]\\|\\.[_A-Z]*\\|[_a-zA-Z0-9-]+"
- :other-modes '(automake-mode))
+ :parse-rule "\\$[^({]\\|\\.[_A-Z]*\\|[_a-zA-Z0-9-]+")
+
+(info-lookup-maybe-add-help
+ :topic 'symbol
+ :mode 'makefile-automake-mode
+ ;; similar regexp/parse-rule as makefile-mode, but also the following
+ ;; (which have index entries),
+ ;; "##" special automake comment
+ ;; "+=" append operator, separate from the GNU make one
+ :regexp "\\$[^({]\\|\\.[_A-Z]*\\|[_a-zA-Z][_a-zA-Z0-9-]*\\|##\\|\\+="
+ :parse-rule "\\$[^({]\\|\\.[_A-Z]*\\|[_a-zA-Z0-9-]+\\|##\\|\\+="
+ :doc-spec '(
+ ;; "(automake)Macro Index" is autoconf macros used in
+ ;; configure.in, not Makefile.am, so don't have that here.
+ ("(automake)Variable Index" nil "^[ \t]*`" "'")
+ ;; In automake 1.4 macros and variables were a combined node.
+ ("(automake)Macro and Variable Index" nil "^[ \t]*`" "'")
+ ;; Directives like "if" are in the "General Index".
+ ;; Prefix "`" since the text for say `+=' isn't always an
+ ;; @item etc and so not always at the start of a line.
+ ("(automake)General Index" nil "`" "'")
+ ;; In automake 1.3 there was just a single "Index" node.
+ ("(automake)Index" nil "`" "'"))
+ :other-modes '(makefile-mode))
(info-lookup-maybe-add-help
:mode 'texinfo-mode
diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el
index 328a5d50d34..2e6f06a6758 100644
--- a/lisp/mail/mail-utils.el
+++ b/lisp/mail/mail-utils.el
@@ -236,7 +236,7 @@ comma-separated list, and return the pruned list."
(setq mail-dont-reply-to-names
(concat
;; `rmail-default-dont-reply-to-names' is obsolete.
- (if rmail-default-dont-reply-to-names
+ (if (bound-and-true-p rmail-default-dont-reply-to-names)
(concat rmail-default-dont-reply-to-names "\\|")
"")
(if (and user-mail-address
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 693e082ecc8..bc831c3b596 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2838,16 +2838,16 @@ User is always nil."
v
(cond
((and beg end)
- (format "tail -c +%d %s | head -c +%d >%s"
- (1+ beg) (tramp-shell-quote-argument localname)
+ (format "dd bs=1 skip=%d if=%s count=%d of=%s"
+ beg (tramp-shell-quote-argument localname)
(- end beg) remote-copy))
(beg
- (format "tail -c +%d %s >%s"
- (1+ beg) (tramp-shell-quote-argument localname)
+ (format "dd bs=1 skip=%d if=%s of=%s"
+ beg (tramp-shell-quote-argument localname)
remote-copy))
(end
- (format "head -c +%d %s >%s"
- (1+ end) (tramp-shell-quote-argument localname)
+ (format "dd bs=1 count=%d if=%s of=%s"
+ end (tramp-shell-quote-argument localname)
remote-copy)))))
;; `insert-file-contents-literally' takes care to avoid
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index ce38cf8850b..a063ce7dab6 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -369,7 +369,7 @@ to it is returned. This function does not modify the point or the mark."
(put 'c-safe 'lisp-indent-function 0)
(defmacro c-int-to-char (integer)
- ;; In GNU Emacs, a character is an integer. In XEmacs, a character is a
+ ;; In Emacs, a character is an integer. In XEmacs, a character is a
;; type distinct from an integer. Sometimes we need to convert integers to
;; characters. `c-int-to-char' makes this conversion, if necessary.
(if (fboundp 'int-to-char)
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 143220ad28a..3b819a149b2 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -698,6 +698,7 @@ This function is called from `compilation-filter-hook'."
grep-hit-face)
(set (make-local-variable 'compilation-error-regexp-alist)
grep-regexp-alist)
+ (set (make-local-variable 'compilation-directory-matcher) nil)
(set (make-local-variable 'compilation-process-setup-function)
'grep-process-setup)
(set (make-local-variable 'compilation-disable-input) t)
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index 93a3bf1b7f5..01c256ab41b 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -2187,7 +2187,7 @@ args of an executive .run, .rnew or .compile."
;; CWD might have changed, resync, to set default directory
(idlwave-shell-resync-dirs)
(let ((comint-file-name-chars idlwave-shell-file-name-chars))
- (comint-dynamic-complete-as-filename)))
+ (comint-filename-completion)))
(defun idlwave-shell-executive-command ()
"Return the name of the current executive command, if any."
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index a7851c54356..67a51dfbeee 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -99,7 +99,9 @@
"import" "in" "is" "lambda" "not" "or" "pass" "print"
"raise" "return" "try" "while" "with" "yield"
;; Not real keywords, but close enough to be fontified as such
- "self" "True" "False")
+ "self" "True" "False"
+ ;; Python 3
+ "nonlocal")
symbol-end)
(,(rx symbol-start "None" symbol-end) ; see § Keywords in 2.7 manual
. font-lock-constant-face)
diff --git a/lisp/shell.el b/lisp/shell.el
index a05fefa9c11..cba50038bc0 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -380,6 +380,8 @@ to `dirtrack-mode'."
:group 'shell
:type '(choice (const nil) regexp))
+(defvar pcomplete-parse-arguments-function)
+
(defun shell-completion-vars ()
"Setup completion vars for `shell-mode' and `read-shell-command'."
(set (make-local-variable 'comint-completion-fignore)
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index a493f0dcfc0..56ebe868a2d 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -1119,46 +1119,46 @@ else cover the whole buffer."
(goto-char end) (diff-end-of-hunk nil 'donttrustheader)
(let ((plus 0) (minus 0) (space 0) (bang 0))
(while (and (= (forward-line -1) 0) (<= start (point)))
- (if (not (looking-at
- (concat diff-hunk-header-re-unified
- "\\|[-*][-*][-*] [0-9,]+ [-*][-*][-*][-*]$"
- "\\|--- .+\n\\+\\+\\+ ")))
- (case (char-after)
- (?\s (incf space))
- (?+ (incf plus))
- (?- (incf minus))
- (?! (incf bang))
- ((?\\ ?#) nil)
- (t (setq space 0 plus 0 minus 0 bang 0)))
- (cond
- ((looking-at diff-hunk-header-re-unified)
- (let* ((old1 (match-string 2))
- (old2 (match-string 4))
- (new1 (number-to-string (+ space minus)))
- (new2 (number-to-string (+ space plus))))
- (if old2
- (unless (string= new2 old2) (replace-match new2 t t nil 4))
- (goto-char (match-end 3))
- (insert "," new2))
- (if old1
- (unless (string= new1 old1) (replace-match new1 t t nil 2))
- (goto-char (match-end 1))
- (insert "," new1))))
- ((looking-at diff-context-mid-hunk-header-re)
- (when (> (+ space bang plus) 0)
- (let* ((old1 (match-string 1))
- (old2 (match-string 2))
- (new (number-to-string
- (+ space bang plus -1 (string-to-number old1)))))
- (unless (string= new old2) (replace-match new t t nil 2)))))
- ((looking-at "\\*\\*\\* \\([0-9]+\\),\\(-?[0-9]*\\) \\*\\*\\*\\*$")
- (when (> (+ space bang minus) 0)
- (let* ((old (match-string 1))
- (new (format
- (concat "%0" (number-to-string (length old)) "d")
- (+ space bang minus -1 (string-to-number old)))))
- (unless (string= new old) (replace-match new t t nil 2))))))
- (setq space 0 plus 0 minus 0 bang 0)))))))
+ (if (not (looking-at
+ (concat diff-hunk-header-re-unified
+ "\\|[-*][-*][-*] [0-9,]+ [-*][-*][-*][-*]$"
+ "\\|--- .+\n\\+\\+\\+ ")))
+ (case (char-after)
+ (?\s (incf space))
+ (?+ (incf plus))
+ (?- (incf minus))
+ (?! (incf bang))
+ ((?\\ ?#) nil)
+ (t (setq space 0 plus 0 minus 0 bang 0)))
+ (cond
+ ((looking-at diff-hunk-header-re-unified)
+ (let* ((old1 (match-string 2))
+ (old2 (match-string 4))
+ (new1 (number-to-string (+ space minus)))
+ (new2 (number-to-string (+ space plus))))
+ (if old2
+ (unless (string= new2 old2) (replace-match new2 t t nil 4))
+ (goto-char (match-end 3))
+ (insert "," new2))
+ (if old1
+ (unless (string= new1 old1) (replace-match new1 t t nil 2))
+ (goto-char (match-end 1))
+ (insert "," new1))))
+ ((looking-at diff-context-mid-hunk-header-re)
+ (when (> (+ space bang plus) 0)
+ (let* ((old1 (match-string 1))
+ (old2 (match-string 2))
+ (new (number-to-string
+ (+ space bang plus -1 (string-to-number old1)))))
+ (unless (string= new old2) (replace-match new t t nil 2)))))
+ ((looking-at "\\*\\*\\* \\([0-9]+\\),\\(-?[0-9]*\\) \\*\\*\\*\\*$")
+ (when (> (+ space bang minus) 0)
+ (let* ((old (match-string 1))
+ (new (format
+ (concat "%0" (number-to-string (length old)) "d")
+ (+ space bang minus -1 (string-to-number old)))))
+ (unless (string= new old) (replace-match new t t nil 2))))))
+ (setq space 0 plus 0 minus 0 bang 0)))))))
;;;;
;;;; Hooks