summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2014-07-28 05:39:09 -0400
committerGlenn Morris <rgm@gnu.org>2014-07-28 05:39:09 -0400
commitda41ffdd089b529c3d5216412d95840e065c3fe3 (patch)
treea69f5a510e2c47f774f145d9567188bc89563ac1
parent414e1537ab09d2f4571e61b420523dcd082f2d3a (diff)
parent1c6c2e3c70ff2f666a1e3f29b8852d375c8392cd (diff)
downloademacs-da41ffdd089b529c3d5216412d95840e065c3fe3.tar.gz
Merge from emacs-24; up to 2014-06-26T06:55:15Z!rgm@gnu.org
-rw-r--r--doc/misc/ChangeLog5
-rw-r--r--doc/misc/todo-mode.texi9
-rw-r--r--etc/DEBUG10
-rw-r--r--etc/NEWS2
-rw-r--r--lisp/ChangeLog46
-rw-r--r--lisp/calendar/todo-mode.el314
-rw-r--r--lisp/files.el1
-rw-r--r--lisp/progmodes/prolog.el4
-rw-r--r--lisp/progmodes/python.el3
-rw-r--r--lisp/textmodes/tex-mode.el2
-rw-r--r--lisp/vc/vc-hooks.el11
-rw-r--r--lisp/window.el2
-rw-r--r--src/.gdbinit10
-rw-r--r--src/ChangeLog6
-rw-r--r--src/dispnew.c2
-rw-r--r--src/window.c4
-rw-r--r--test/automated/python-tests.el2
17 files changed, 256 insertions, 177 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index d78543183df..261f81f8b2f 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,8 @@
+2014-07-28 Stephen Berman <stephen.berman@gmx.net>
+
+ * todo-mode.texi (Marked Items): Correct omission of item deletion
+ from commands applying to both todo and done items.
+
2014-07-18 Albert Krewinkel <albert+gnus@zeitkraut.de>
* gnus.texi (Posting Styles): Document the possibility to perform
diff --git a/doc/misc/todo-mode.texi b/doc/misc/todo-mode.texi
index bb2aea21ac2..8b9903419ab 100644
--- a/doc/misc/todo-mode.texi
+++ b/doc/misc/todo-mode.texi
@@ -1323,10 +1323,11 @@ If you use @kbd{m}, @kbd{d}, @kbd{A d} or @kbd{u} on multiple
noncontiguous marked items, the relocated items retain their relative
order but are now listed consecutively en bloc.
-You can mark both todo and done items, but note that only @kbd{m} can apply
-to both; other commands only affect either marked todo or marked done
-items, so if both types of items are marked, invoking these commands
-has no effect and informs you of your erroneous attempt.
+You can mark both todo and done items, but note that only @kbd{m} and
+@kbd{k} can apply to both; other commands only affect either marked
+todo or marked done items, so if both types of items are marked,
+invoking these commands has no effect and informs you of your
+erroneous attempt.
@node Todo Categories Mode, Searching for Items, Marked Items, Top
@chapter Todo Categories Mode
diff --git a/etc/DEBUG b/etc/DEBUG
index c1b04eaf7f2..096bdbc48c9 100644
--- a/etc/DEBUG
+++ b/etc/DEBUG
@@ -7,9 +7,9 @@ See the end of the file for license conditions.
[People who debug Emacs on Windows using Microsoft debuggers should
read the Windows-specific section near the end of this document.]
-** When you debug Emacs with GDB, you should start it in the directory
-where the executable was made (the 'src' directory in the Emacs source
-tree). That directory has a .gdbinit file that defines various
+** When you debug Emacs with GDB, you should start GDB in the directory
+where the Emacs executable was made (the 'src' directory in the Emacs
+source tree). That directory has a .gdbinit file that defines various
"user-defined" commands for debugging Emacs. (These commands are
described below under "Examining Lisp object values" and "Debugging
Emacs Redisplay problems".)
@@ -21,7 +21,9 @@ you will see a warning when GDB starts, like this:
warning: File ".../src/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
There are several ways to overcome that difficulty, they are all
-described in the node "Auto-loading safe path" in the GDB user manual.
+described in the node "Auto-loading safe path" in the GDB user
+manual. If nothing else helps, type "source /path/to/.gdbinit RET" at
+the GDB prompt, to unconditionally load the GDB init file.
** When you are trying to analyze failed assertions or backtraces, it
is essential to compile Emacs with flags suitable for debugging.
diff --git a/etc/NEWS b/etc/NEWS
index 558e1608dfb..9a2c03aad15 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -873,7 +873,7 @@ along with the non-SMIE indentation code.
** Python mode
*** Out of the box support for CPython, iPython and readline based shells.
-**** `python-shell-completion-module-string-code` is no longer used.
+**** `python-shell-completion-module-string-code' is no longer used.
*** Automatic shell prompt detection. New user options:
**** `python-shell-interpreter-interactive-arg'.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 23e66fe3158..1d00a180e9c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,49 @@
+2014-07-28 Eli Zaretskii <eliz@gnu.org>
+
+ * window.el (window--pixel-to-total): Use FRAME's root window, not
+ that of the selected frame. (Bug#18112, Bug#16674)
+
+2014-07-28 Andreas Schwab <schwab@linux-m68k.org>
+
+ * textmodes/tex-mode.el (tex-font-lock-verb): Doc fix.
+ (Bug#18117)
+
+2014-07-28 Fabián Ezequiel Gallina <fgallina@gnu.org>
+
+ * progmodes/python.el (inferior-python-mode): Doc fix.
+
+2014-07-28 Stephen Berman <stephen.berman@gmx.net>
+
+ * calendar/todo-mode.el (todo-edit-item--next-key): If next key is
+ not a character, ignore it instead of raising an error.
+
+ * calendar/todo-mode.el: Fix handling of marked items and make
+ minor code improvements.
+ (todo-edit-item): If there are marked items, ensure user can only
+ invoke editing commands that work with marked items.
+ (todo-edit-item--text): When there are marked items, make it a
+ noop if invoked with point not on an item; otherwise, ensure it
+ applies only to item at point.
+ (todo-item-undone): If there are marked not-done items, return
+ point to its original position before signaling user error.
+ (todo--user-error-if-marked-done-item): New function.
+ (todo-edit-item--header, todo-edit-item--diary-inclusion)
+ (todo-item-done): Use it.
+
+2014-07-28 Glenn Morris <rgm@gnu.org>
+
+ * files.el (toggle-read-only): Re-add basic doc-string.
+ * vc/vc-hooks.el (vc-toggle-read-only): Tweak obsolescence mesage.
+
+ * progmodes/prolog.el (prolog-mode-keybindings-edit):
+ Replace missing `switch-to-prolog' with `run-prolog'.
+ (switch-to-prolog): Define as (obsolete) alias, as in 23.4.
+
+2014-07-28 Stephen Berman <stephen.berman@gmx.net>
+
+ * calendar/todo-mode.el (todo-set-top-priorities): Fix overwriting
+ of file-wide setting when changing category-wide setting.
+
2014-07-28 Stephen Berman <stephen.berman@gmx.net>
* doc-view.el (doc-view-open-text): Don't require that the
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 7429819adc9..6a857a10fda 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -2068,87 +2068,101 @@ the item at point."
(defun todo-edit-item (&optional arg)
"Choose an editing operation for the current item and carry it out."
(interactive "P")
- (cond ((todo-done-item-p)
- (todo-edit-item--next-key todo-edit-done-item--param-key-alist))
- ((todo-item-string)
- (todo-edit-item--next-key todo-edit-item--param-key-alist arg))))
+ (let ((marked (assoc (todo-current-category) todo-categories-with-marks)))
+ (cond ((and (todo-done-item-p) (not marked))
+ (todo-edit-item--next-key todo-edit-done-item--param-key-alist))
+ ((or marked (todo-item-string))
+ (todo-edit-item--next-key todo-edit-item--param-key-alist arg)))))
(defun todo-edit-item--text (&optional arg)
"Function providing the text editing facilities of `todo-edit-item'."
- (let* ((opoint (point))
- (start (todo-item-start))
- (end (save-excursion (todo-item-end)))
- (item-beg (progn
- (re-search-forward
- (concat todo-date-string-start todo-date-pattern
- "\\( " diary-time-regexp "\\)?"
- (regexp-quote todo-nondiary-end) "?")
- (line-end-position) t)
- (1+ (- (point) start))))
- (include-header (eq arg 'include-header))
- (comment-edit (eq arg 'comment-edit))
- (comment-delete (eq arg 'comment-delete))
- (header-string (substring (todo-item-string) 0 item-beg))
- (item (if (or include-header comment-edit comment-delete)
- (todo-item-string)
- (substring (todo-item-string) item-beg)))
- (multiline (> (length (split-string item "\n")) 1))
- (comment (save-excursion
- (todo-item-start)
- (re-search-forward
- (concat " \\[" (regexp-quote todo-comment-string)
- ": \\([^]]+\\)\\]") end t)))
- (prompt (if comment "Edit comment: " "Enter a comment: "))
- (buffer-read-only nil))
- (cond
- ((or comment-edit comment-delete)
- (save-excursion
- (todo-item-start)
- (if (re-search-forward (concat " \\[" (regexp-quote todo-comment-string)
- ": \\([^]]+\\)\\]")
- end t)
- (if comment-delete
- (when (todo-y-or-n-p "Delete comment? ")
- (delete-region (match-beginning 0) (match-end 0)))
- (replace-match (read-string prompt (cons (match-string 1) 1))
- nil nil nil 1))
- (if comment-delete
- (user-error "There is no comment to delete")
- (insert " [" todo-comment-string ": "
- (prog1 (read-string prompt)
- ;; If user moved point during editing,
- ;; make sure it moves back.
- (goto-char opoint)
- (todo-item-end))
- "]")))))
- ((or multiline (eq arg 'multiline))
- (let ((buf todo-edit-buffer))
- (set-window-buffer (selected-window)
- (set-buffer (make-indirect-buffer (buffer-name) buf)))
- (narrow-to-region (todo-item-start) (todo-item-end))
- (todo-edit-mode)
- (message "%s" (substitute-command-keys
- (concat "Type \\[todo-edit-quit] "
- "to return to Todo mode.\n")))))
- (t
- (let ((new (concat (if include-header "" header-string)
- (read-string "Edit: " (if include-header
- (cons item item-beg)
- (cons item 0))))))
- (when include-header
- (while (not (string-match (concat todo-date-string-start
- todo-date-pattern)
- new))
- (setq new (read-from-minibuffer
- "Item must start with a date: " new))))
- ;; Ensure lines following hard newlines are indented.
- (setq new (replace-regexp-in-string "\\(\n\\)[^[:blank:]]"
- "\n\t" new nil nil 1))
- ;; If user moved point during editing, make sure it moves back.
- (goto-char opoint)
- (todo-remove-item)
- (todo-insert-with-overlays new)
- (move-to-column item-beg))))))
+ (let ((full-item (todo-item-string)))
+ ;; If there are marked items and user invokes a text-editing
+ ;; commands with point not on an item, todo-item-start is nil and
+ ;; 1+ signals an error, so just make this a noop.
+ (when full-item
+ (let* ((opoint (point))
+ (start (todo-item-start))
+ (end (save-excursion (todo-item-end)))
+ (item-beg (progn
+ (re-search-forward
+ (concat todo-date-string-start todo-date-pattern
+ "\\( " diary-time-regexp "\\)?"
+ (regexp-quote todo-nondiary-end) "?")
+ (line-end-position) t)
+ (1+ (- (point) start))))
+ (include-header (eq arg 'include-header))
+ (comment-edit (eq arg 'comment-edit))
+ (comment-delete (eq arg 'comment-delete))
+ (header-string (substring full-item 0 item-beg))
+ (item (if (or include-header comment-edit comment-delete)
+ full-item
+ (substring full-item item-beg)))
+ (multiline (or (eq arg 'multiline)
+ (> (length (split-string item "\n")) 1)))
+ (comment (save-excursion
+ (todo-item-start)
+ (re-search-forward
+ (concat " \\[" (regexp-quote todo-comment-string)
+ ": \\([^]]+\\)\\]") end t)))
+ (prompt (if comment "Edit comment: " "Enter a comment: "))
+ (buffer-read-only nil))
+ ;; When there are marked items, user can invoke todo-edit-item
+ ;; even if point is not on an item, but text editing only
+ ;; applies to the item at point.
+ (when (or (and (todo-done-item-p)
+ (or comment-edit comment-delete))
+ (and (not (todo-done-item-p))
+ (or (not arg) include-header multiline)))
+ (cond
+ ((or comment-edit comment-delete)
+ (save-excursion
+ (todo-item-start)
+ (if (re-search-forward (concat " \\["
+ (regexp-quote todo-comment-string)
+ ": \\([^]]+\\)\\]") end t)
+ (if comment-delete
+ (when (todo-y-or-n-p "Delete comment? ")
+ (delete-region (match-beginning 0) (match-end 0)))
+ (replace-match (read-string prompt (cons (match-string 1) 1))
+ nil nil nil 1))
+ (if comment-delete
+ (user-error "There is no comment to delete")
+ (insert " [" todo-comment-string ": "
+ (prog1 (read-string prompt)
+ ;; If user moved point during editing,
+ ;; make sure it moves back.
+ (goto-char opoint)
+ (todo-item-end))
+ "]")))))
+ (multiline
+ (let ((buf todo-edit-buffer))
+ (set-window-buffer (selected-window)
+ (set-buffer (make-indirect-buffer
+ (buffer-name) buf)))
+ (narrow-to-region (todo-item-start) (todo-item-end))
+ (todo-edit-mode)
+ (message "%s" (substitute-command-keys
+ (concat "Type \\[todo-edit-quit] "
+ "to return to Todo mode.\n")))))
+ (t
+ (let ((new (concat (if include-header "" header-string)
+ (read-string "Edit: " (if include-header
+ (cons item item-beg)
+ (cons item 0))))))
+ (when include-header
+ (while (not (string-match (concat todo-date-string-start
+ todo-date-pattern) new))
+ (setq new (read-from-minibuffer
+ "Item must start with a date: " new))))
+ ;; Ensure lines following hard newlines are indented.
+ (setq new (replace-regexp-in-string "\\(\n\\)[^[:blank:]]"
+ "\n\t" new nil nil 1))
+ ;; If user moved point during editing, make sure it moves back.
+ (goto-char opoint)
+ (todo-remove-item)
+ (todo-insert-with-overlays new)
+ (move-to-column item-beg)))))))))
(defun todo-edit-quit ()
"Return from Todo Edit mode to Todo mode.
@@ -2203,16 +2217,16 @@ made in the number or names of categories."
(defun todo-edit-item--header (what &optional inc)
"Function providing header editing facilities of `todo-edit-item'."
- (let* ((cat (todo-current-category))
- (marked (assoc cat todo-categories-with-marks))
- (first t)
- (todo-date-from-calendar t)
- ;; INC must be an integer, but users could pass it via
- ;; `todo-edit-item' as e.g. `-' or `C-u'.
- (inc (prefix-numeric-value inc))
- (buffer-read-only nil)
- ndate ntime year monthname month day
- dayname) ; Needed by calendar-date-display-form.
+ (let ((marked (assoc (todo-current-category) todo-categories-with-marks))
+ (first t)
+ (todo-date-from-calendar t)
+ ;; INC must be an integer, but users could pass it via
+ ;; `todo-edit-item' as e.g. `-' or `C-u'.
+ (inc (prefix-numeric-value inc))
+ (buffer-read-only nil)
+ ndate ntime year monthname month day
+ dayname) ; Needed by calendar-date-display-form.
+ (when marked (todo--user-error-if-marked-done-item))
(save-excursion
(or (and marked (goto-char (point-min))) (todo-item-start))
(catch 'end
@@ -2374,47 +2388,45 @@ made in the number or names of categories."
(defun todo-edit-item--diary-inclusion (&optional nonmarking)
"Function providing diary marking facilities of `todo-edit-item'."
(let ((buffer-read-only)
- (marked (assoc (todo-current-category)
- todo-categories-with-marks)))
+ (marked (assoc (todo-current-category) todo-categories-with-marks)))
+ (when marked (todo--user-error-if-marked-done-item))
(catch 'stop
(save-excursion
(when marked (goto-char (point-min)))
(while (not (eobp))
- (if (todo-done-item-p)
- (throw 'stop (message "Done items cannot be edited"))
- (unless (and marked (not (todo-marked-item-p)))
- (let* ((beg (todo-item-start))
- (lim (save-excursion (todo-item-end)))
- (end (save-excursion
- (or (todo-time-string-matcher lim)
- (todo-date-string-matcher lim)))))
- (if nonmarking
- (if (looking-at (regexp-quote diary-nonmarking-symbol))
- (replace-match "")
- (when (looking-at (regexp-quote todo-nondiary-start))
- (save-excursion
- (replace-match "")
- (search-forward todo-nondiary-end (1+ end) t)
- (replace-match "")
- (todo-update-count 'diary 1)))
- (insert diary-nonmarking-symbol))
- (if (looking-at (regexp-quote todo-nondiary-start))
- (progn
+ (unless (and marked (not (todo-marked-item-p)))
+ (let* ((beg (todo-item-start))
+ (lim (save-excursion (todo-item-end)))
+ (end (save-excursion
+ (or (todo-time-string-matcher lim)
+ (todo-date-string-matcher lim)))))
+ (if nonmarking
+ (if (looking-at (regexp-quote diary-nonmarking-symbol))
+ (replace-match "")
+ (when (looking-at (regexp-quote todo-nondiary-start))
+ (save-excursion
(replace-match "")
(search-forward todo-nondiary-end (1+ end) t)
(replace-match "")
- (todo-update-count 'diary 1))
- (when end
- (when (looking-at (regexp-quote diary-nonmarking-symbol))
- (replace-match "")
- (setq end (1- end))) ; Since we deleted nonmarking symbol.
- (insert todo-nondiary-start)
- (goto-char (1+ end))
- (insert todo-nondiary-end)
- (todo-update-count 'diary -1))))))
- (unless marked (throw 'stop nil))
- (todo-forward-item)))))
- (todo-update-categories-sexp)))
+ (todo-update-count 'diary 1)))
+ (insert diary-nonmarking-symbol))
+ (if (looking-at (regexp-quote todo-nondiary-start))
+ (progn
+ (replace-match "")
+ (search-forward todo-nondiary-end (1+ end) t)
+ (replace-match "")
+ (todo-update-count 'diary 1))
+ (when end
+ (when (looking-at (regexp-quote diary-nonmarking-symbol))
+ (replace-match "")
+ (setq end (1- end))) ; Since we deleted nonmarking symbol.
+ (insert todo-nondiary-start)
+ (goto-char (1+ end))
+ (insert todo-nondiary-end)
+ (todo-update-count 'diary -1))))))
+ (unless marked (throw 'stop nil))
+ (todo-forward-item)))))
+ (todo-update-categories-sexp))
(defun todo-edit-category-diary-inclusion (arg)
"Make all items in this category diary items.
@@ -2785,21 +2797,7 @@ visible."
(interactive "P")
(let* ((cat (todo-current-category))
(marked (assoc cat todo-categories-with-marks)))
- (when marked
- (save-excursion
- (save-restriction
- (goto-char (point-max))
- (todo-backward-item)
- (unless (todo-done-item-p)
- (widen)
- (unless (re-search-forward
- (concat "^" (regexp-quote todo-category-beg)) nil t)
- (goto-char (point-max)))
- (forward-line -1))
- (while (todo-done-item-p)
- (when (todo-marked-item-p)
- (user-error "This command does not apply to done items"))
- (todo-backward-item)))))
+ (when marked (todo--user-error-if-marked-done-item))
(unless (and (not marked)
(or (todo-done-item-p)
;; Point is between todo and done items.
@@ -2887,7 +2885,9 @@ comments without asking."
(while (not (eobp))
(when (or (not marked) (and marked (todo-marked-item-p)))
(if (not (todo-done-item-p))
- (user-error "Only done items can be undone")
+ (progn
+ (goto-char opoint)
+ (user-error "Only done items can be undone"))
(todo-item-start)
(unless marked
(setq ov (make-overlay (save-excursion (todo-item-start))
@@ -4285,24 +4285,25 @@ set the user customizable option `todo-top-priorities-overrides'."
(frule (assoc-string file rules))
(crules (nth 2 frule))
(crule (assoc-string cat crules))
- (cur (or (and arg (cdr crule))
- (nth 1 frule)
- todo-top-priorities))
+ (fcur (or (nth 1 frule)
+ todo-top-priorities))
+ (ccur (or (and arg (cdr crule))
+ fcur))
(prompt (if arg (concat "Number of top priorities in this category"
" (currently %d): ")
(concat "Default number of top priorities per category"
" in this file (currently %d): ")))
(new -1))
(while (< new 0)
- (let ((cur0 cur))
- (setq new (read-number (format prompt cur0))
+ (let ((cur (if arg ccur fcur)))
+ (setq new (read-number (format prompt cur))
prompt "Enter a non-negative number: "
- cur0 nil)))
+ cur nil)))
(let ((nrule (if arg
(append (delete crule crules) (list (cons cat new)))
(append (list file new) (list crules)))))
(setq rules (cons (if arg
- (list file cur nrule)
+ (list file fcur nrule)
nrule)
(delete frule rules)))
(customize-save-variable 'todo-top-priorities-overrides rules)
@@ -5223,6 +5224,25 @@ Overrides `diary-goto-entry'."
(progn (goto-char (point-min))
(looking-at todo-done-string-start)))))
+(defun todo--user-error-if-marked-done-item ()
+ "Signal user error on marked done items.
+Helper funtion for editing commands that only apply to (possibly
+marked) not done todo items."
+ (save-excursion
+ (save-restriction
+ (goto-char (point-max))
+ (todo-backward-item)
+ (unless (todo-done-item-p)
+ (widen)
+ (unless (re-search-forward
+ (concat "^" (regexp-quote todo-category-beg)) nil t)
+ (goto-char (point-max)))
+ (forward-line -1))
+ (while (todo-done-item-p)
+ (when (todo-marked-item-p)
+ (user-error "This command does not apply to done items"))
+ (todo-backward-item)))))
+
(defun todo-reset-done-separator (sep)
"Replace existing overlays of done items separator string SEP."
(save-excursion
@@ -5531,8 +5551,8 @@ already entered and those still available."
'(add/edit delete))
" comment"))))
params " "))
- (this-key (char-to-string
- (read-key (concat todo-edit-item--prompt p->k))))
+ (this-key (let ((key (read-key (concat todo-edit-item--prompt p->k))))
+ (and (characterp key) (char-to-string key))))
(this-param (car (rassoc this-key params))))
(pcase this-param
(`edit (todo-edit-item--text))
diff --git a/lisp/files.el b/lisp/files.el
index 252ae76fa0b..9272e98384f 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -5017,6 +5017,7 @@ prints a message in the minibuffer. Instead, use `set-buffer-modified-p'."
(set-buffer-modified-p arg))
(defun toggle-read-only (&optional arg interactive)
+ "Change whether this buffer is read-only."
(declare (obsolete read-only-mode "24.3"))
(interactive (list current-prefix-arg t))
(if interactive
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el
index a082d75b3c4..853f2d0dad2 100644
--- a/lisp/progmodes/prolog.el
+++ b/lisp/progmodes/prolog.el
@@ -1079,7 +1079,7 @@ VERSION is of the format (Major . Minor)"
;; Inherited from the old prolog.el.
(define-key map "\e\C-x" 'prolog-consult-region)
(define-key map "\C-c\C-l" 'prolog-consult-file)
- (define-key map "\C-c\C-z" 'switch-to-prolog))
+ (define-key map "\C-c\C-z" 'run-prolog))
(defun prolog-mode-keybindings-inferior (_map)
"Define keybindings for inferior Prolog mode in MAP."
@@ -1240,6 +1240,8 @@ To find out what version of Prolog mode you are running, enter
((string-match "\\`[rf] *[0-9]*\\'" str) nil) ;r(edo) or f(ail)
(t t)))
+;; This statement was missing in Emacs 24.1, 24.2, 24.3.
+(define-obsolete-function-alias 'switch-to-prolog 'run-prolog "24.1")
;;;###autoload
(defun run-prolog (arg)
"Run an inferior Prolog process, input and output via buffer *prolog*.
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 7d882837abc..b08da8da029 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2332,7 +2332,6 @@ interpreter is run. Variables
`python-shell-font-lock-enable',
`python-shell-completion-setup-code',
`python-shell-completion-string-code',
-`python-shell-completion-module-string-code',
`python-eldoc-setup-code', `python-eldoc-string-code',
`python-ffap-setup-code' and `python-ffap-string-code' can
customize this mode for different Python interpreters.
@@ -2408,7 +2407,7 @@ killed."
interpreter nil args))
(python-shell--parent-buffer (current-buffer))
(process (get-buffer-process buffer))
- ;; As the user may have overriden default values for
+ ;; As the user may have overridden default values for
;; these vars on `run-python', let-binding them allows
;; to have the new right values in all setup code
;; that's is done in `inferior-python-mode', which is
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index dce99607074..18843bcd15a 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -808,7 +808,7 @@ Not smaller than the value set by `tex-suscript-height-minimum'."
(defvar tex-verbatim-face 'tex-verbatim)
(defun tex-font-lock-verb (start delim)
- "Place syntax table properties on the \verb construct.
+ "Place syntax table properties on the \\verb construct.
START is the position of the \\ and DELIM is the delimiter char."
;; Do nothing if the \verb construct is itself inside a comment or
;; verbatim env.
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index ce7f2c8f4ed..df660d193e2 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -633,8 +633,15 @@ this function."
(throw 'found trial))))
templates))))
-(define-obsolete-function-alias
- 'vc-toggle-read-only 'toggle-read-only "24.1")
+
+;; toggle-read-only is obsolete since 24.3, but since vc-t-r-o was made
+;; obsolete earlier, it is ok for the latter to be an alias to the former,
+;; since the latter will be removed first. We can't just make it
+;; an alias for read-only-mode, since that is not 100% the same.
+(defalias 'vc-toggle-read-only 'toggle-read-only)
+(make-obsolete 'vc-toggle-read-only
+ "use `read-only-mode' instead (or `toggle-read-only' in older versions of Emacs)."
+ "24.1")
(defun vc-default-make-version-backups-p (_backend _file)
"Return non-nil if unmodified versions should be backed up locally.
diff --git a/lisp/window.el b/lisp/window.el
index a7dcd9a6612..f55f0657a30 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -2286,7 +2286,7 @@ Optional argument HORIZONTAL non-nil means assign new total
window widths from pixel widths."
(setq frame (window-normalize-frame frame))
(let* ((char-size (frame-char-size frame horizontal))
- (root (frame-root-window))
+ (root (frame-root-window frame))
(root-size (window-size root horizontal t))
;; We have to care about the minibuffer window only if it
;; appears together with the root window on this frame.
diff --git a/src/.gdbinit b/src/.gdbinit
index fb2a9bf72ed..c10fe3ddded 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -820,15 +820,7 @@ define xwindow
xgetptr $
print (struct window *) $ptr
set $window = (struct window *) $ptr
- xgetint $window->total_cols
- set $width=$int
- xgetint $window->total_lines
- set $height=$int
- xgetint $window->left_col
- set $left=$int
- xgetint $window->top_line
- set $top=$int
- printf "%dx%d+%d+%d\n", $width, $height, $left, $top
+ printf "%dx%d+%d+%d\n", $window->total_cols, $window->total_lines, $window->left_col, $window->top_line
end
document xwindow
Print $ as a window pointer, assuming it is an Emacs Lisp window value.
diff --git a/src/ChangeLog b/src/ChangeLog
index f74a46c4ad2..57d49594d7a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
2014-07-28 Eli Zaretskii <eliz@gnu.org>
+ * .gdbinit (xwindow): The members total_cols, total_lines,
+ left_col, and top_line are C integers (and has been so for the
+ last 1.5 years).
+
* .gdbinit (xsubchartable): The members 'depth' and 'min_char' are
now C integers.
@@ -4479,7 +4483,7 @@
Avoid undefined behavior with huge regexp interval counts.
* regex.c (GET_INTERVAL_COUNT): Rename from 'GET_UNSIGNED_NUMBER',
since it's now specialized to interval counts. All uses changed.
- Do not assume wrapraound on signed integer overflow.
+ Do not assume wraparound on signed integer overflow.
(regex_compile): Simplify based on the above changes.
2013-12-12 Eli Zaretskii <eliz@gnu.org>
diff --git a/src/dispnew.c b/src/dispnew.c
index 289431d6dc4..70862985e66 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1638,7 +1638,7 @@ allocate_matrices_for_frame_redisplay (Lisp_Object window, int x, int y,
/* Actually change matrices, if allowed. Do not consider
CHANGED_LEAF_MATRIX computed above here because the pool
- may have been changed which we don't now here. We trust
+ may have been changed which we don't know here. We trust
that we only will be called with DIM_ONLY_P when
necessary. */
if (!dim_only_p)
diff --git a/src/window.c b/src/window.c
index ae28b714720..e3554ea032e 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3854,7 +3854,7 @@ window_resize_check (struct window *w, bool horflag)
}
-/* Set w->pixel_height (w->pixel_height if HORIZONTAL is non-zero) to
+/* Set w->pixel_height (w->pixel_width if HORFLAG is non-zero) to
w->new_pixel for window W and recursively all child windows of W.
Also calculate and assign the new vertical (horizontal) pixel start
positions of each of these windows.
@@ -3944,7 +3944,7 @@ window_resize_apply (struct window *w, bool horflag)
}
-/* Set w->total_lines (w->total_cols if HORIZONTAL is non-zero) to
+/* Set w->total_lines (w->total_cols if HORFLAG is non-zero) to
w->new_total for window W and recursively all child windows of W.
Also calculate and assign the new vertical (horizontal) start
positions of each of these windows. */
diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el
index 81f4567091e..e1eaeea2c38 100644
--- a/test/automated/python-tests.el
+++ b/test/automated/python-tests.el
@@ -1807,7 +1807,7 @@ Using `python-shell-interpreter' and
(kill-buffer shell-buffer))))
(ert-deftest python-shell-make-comint-3 ()
- "Check comint creation with overriden python interpreter and args.
+ "Check comint creation with overridden python interpreter and args.
The command passed to `python-shell-make-comint' as argument must
locally override global values set in `python-shell-interpreter'
and `python-shell-interpreter-args' in the new shell buffer."