summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog44
-rw-r--r--lisp/ChangeLog.142
-rw-r--r--lisp/ChangeLog.154
-rw-r--r--lisp/files.el6
-rw-r--r--lisp/ido.el25
-rw-r--r--lisp/info.el4
-rw-r--r--lisp/outline.el1
-rw-r--r--lisp/progmodes/etags.el9
-rw-r--r--lisp/progmodes/hideshow.el1
-rw-r--r--lisp/progmodes/ruby-mode.el11
-rw-r--r--lisp/window.el11
-rw-r--r--src/ChangeLog.112
12 files changed, 89 insertions, 31 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d87c52a3e04..8601fb78b75 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -4,6 +4,50 @@
change. To avoid unwanted bidi reordering, use
bidi-string-mark-left-to-right instead of inserting LRO and PDF.
+2012-03-21 Dmitry Gutov <dgutov@yandex.ru>
+
+ * progmodes/ruby-mode.el: Don't confuse "end:" for "end" (bug#10786).
+ (ruby-block-end-re, ruby-delimiter, ruby-parse-partial)
+ (ruby-beginning-of-indent): Be more careful with the difference
+ between word-boundary and symbol boundary.
+ (ruby-mode-syntax-table): Make : a symbol constituent.
+
+2012-03-21 Andreas Politz <politza@fh-trier.de>
+
+ * outline.el (outline-flag-region): Evaporate overlays (bug#10789).
+
+2012-03-21 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * progmodes/etags.el (tags-completion-at-point-function):
+ Improve last fix.
+
+ * files.el (move-file-to-trash): Files aren't regexps (bug#11055).
+
+2012-03-21 Sam Steingold <sds@gnu.org>
+
+ * progmodes/etags.el (tags-completion-at-point-function):
+ Avoid the error when point is inside the pattern.
+
+2012-03-21 John Yates <john@yates-sheets.org> (tiny change)
+
+ * progmodes/hideshow.el (hs-inside-comment-p): Fix hiding of first
+ line (Bug#10855).
+
+2012-03-21 Drew Adams <drew.adams@oracle.com>
+
+ * info.el (Info-menu): Handle string value of FORK arg (Bug#10858).
+
+2012-03-21 Anmol Khirbat <anmol@khirbat.net> (tiny change)
+
+ * ido.el (ido-set-current-directory, ido-read-internal)
+ (ido-choose-completion-string, ido-completion-help): Handle nil
+ value of ido-completion-buffer (Bug#11008).
+
+2012-03-21 Sam Steingold <sds@gnu.org>
+
+ * window.el (switch-to-prev-buffer): Do not switch to a visible
+ window previous buffer, just like with the frame previous buffers.
+
2012-03-21 Chong Yidong <cyd@gnu.org>
* faces.el (make-face, make-empty-face, copy-face):
diff --git a/lisp/ChangeLog.14 b/lisp/ChangeLog.14
index 254e2863889..be50fc46672 100644
--- a/lisp/ChangeLog.14
+++ b/lisp/ChangeLog.14
@@ -7114,7 +7114,7 @@
vc-default-mark-resolved.
(vc-default-mark-resolved): Change to an alias for ignore.
-2008-09-24 Andreas Politz <politza@fh-trier.de> (tiny change)
+2008-09-24 Andreas Politz <politza@fh-trier.de>
* term.el (term-emulate-terminal): Encode input string before
checking its length.
diff --git a/lisp/ChangeLog.15 b/lisp/ChangeLog.15
index bf7a24a5b67..e3890b80ec4 100644
--- a/lisp/ChangeLog.15
+++ b/lisp/ChangeLog.15
@@ -14934,7 +14934,7 @@
* woman.el (woman-make-bufname): Handle man-pages with "." in the
name. (Bug#5038)
-2009-12-02 Andreas Politz <politza@fh-trier.de> (tiny change)
+2009-12-02 Andreas Politz <politza@fh-trier.de>
* ido.el (ido-file-internal): Handle filenames at point that do
not have a directory part. (Bug#5049)
@@ -19488,7 +19488,7 @@
(elint-log-message): Add optional argument. Use elint-output.
(elint-set-mode-line): New function.
-2009-09-12 Andreas Politz <politza@fh-trier.de> (tiny change)
+2009-09-12 Andreas Politz <politza@fh-trier.de>
* emacs-lisp/elp.el (elp-not-profilable): Add more
functions (Bug#4233).
diff --git a/lisp/files.el b/lisp/files.el
index cde15c5d0b1..8c61c288be9 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -6563,7 +6563,7 @@ Otherwise, trash FILENAME using the freedesktop.org conventions,
(new-fn (expand-file-name (file-name-nondirectory fn)
trash-dir)))
;; We can't trash a parent directory of trash-directory.
- (if (string-match fn trash-dir)
+ (if (string-prefix-p fn trash-dir)
(error "Trash directory `%s' is a subdirectory of `%s'"
trash-dir filename))
(unless (file-directory-p trash-dir)
@@ -6595,10 +6595,10 @@ Otherwise, trash FILENAME using the freedesktop.org conventions,
(file-name-directory fn)))
(error "Cannot move %s to trash: Permission denied" filename))
;; The trashed file cannot be the trash dir or its parent.
- (if (string-match fn trash-files-dir)
+ (if (string-prefix-p fn trash-files-dir)
(error "The trash directory %s is a subdirectory of %s"
trash-files-dir filename))
- (if (string-match fn trash-info-dir)
+ (if (string-prefix-p fn trash-info-dir)
(error "The trash directory %s is a subdirectory of %s"
trash-info-dir filename))
diff --git a/lisp/ido.el b/lisp/ido.el
index 5813aff0f21..dcaa8f373ce 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1722,8 +1722,9 @@ This function also adds a hook to the minibuffer."
(unless (and ido-enable-tramp-completion
(string-match "\\`/[^/]*@\\'" dir))
(setq dir (ido-final-slash dir t))))
- (if (get-buffer ido-completion-buffer)
- (kill-buffer ido-completion-buffer))
+ (and ido-completion-buffer
+ (get-buffer ido-completion-buffer)
+ (kill-buffer ido-completion-buffer))
(cond
((equal dir ido-current-directory)
nil)
@@ -1736,8 +1737,9 @@ This function also adds a hook to the minibuffer."
(t
(ido-trace "cd" dir)
(setq ido-current-directory dir)
- (if (get-buffer ido-completion-buffer)
- (kill-buffer ido-completion-buffer))
+ (and ido-completion-buffer
+ (get-buffer ido-completion-buffer)
+ (kill-buffer ido-completion-buffer))
(setq ido-directory-nonreadable (ido-nonreadable-directory-p dir))
(setq ido-directory-too-big (and (not ido-directory-nonreadable)
(ido-directory-too-big-p dir)))
@@ -1982,8 +1984,9 @@ If INITIAL is non-nil, it specifies the initial input string."
(setq ido-text-init nil))
ido-completion-map nil hist))))
(ido-trace "read-from-minibuffer" ido-final-text)
- (if (get-buffer ido-completion-buffer)
- (kill-buffer ido-completion-buffer))
+ (and ido-completion-buffer
+ (get-buffer ido-completion-buffer)
+ (kill-buffer ido-completion-buffer))
(ido-trace "\n_EXIT_" ido-exit)
@@ -3837,8 +3840,9 @@ This is to make them appear as if they were \"virtual buffers\"."
(defun ido-choose-completion-string (choice &rest ignored)
(when (ido-active)
;; Insert the completion into the buffer where completion was requested.
- (if (get-buffer ido-completion-buffer)
- (kill-buffer ido-completion-buffer))
+ (and ido-completion-buffer
+ (get-buffer ido-completion-buffer)
+ (kill-buffer ido-completion-buffer))
(cond
((ido-active t) ;; ido-use-merged-list
(setq ido-current-directory ""
@@ -3857,7 +3861,8 @@ This is to make them appear as if they were \"virtual buffers\"."
"Show possible completions in a *File Completions* buffer."
(interactive)
(setq ido-rescan nil)
- (let ((temp-buf (get-buffer ido-completion-buffer))
+ (let ((temp-buf (and ido-completion-buffer
+ (get-buffer ido-completion-buffer)))
display-it full-list)
(if (and (eq last-command this-command) temp-buf)
;; scroll buffer
@@ -3876,7 +3881,7 @@ This is to make them appear as if they were \"virtual buffers\"."
(scroll-other-window))
(set-buffer buf))
(setq display-it t))
- (if display-it
+ (if (and ido-completion-buffer display-it)
(with-output-to-temp-buffer ido-completion-buffer
(let ((completion-list (sort
(cond
diff --git a/lisp/info.el b/lisp/info.el
index b7e2d1eedbe..042ff158362 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -2594,7 +2594,9 @@ new buffer."
(list item current-prefix-arg))))
;; there is a problem here in that if several menu items have the same
;; name you can only go to the node of the first with this command.
- (Info-goto-node (Info-extract-menu-item menu-item) (if fork menu-item)))
+ (Info-goto-node (Info-extract-menu-item menu-item)
+ (and fork
+ (if (stringp fork) fork menu-item))))
(defun Info-extract-menu-item (menu-item)
(setq menu-item (regexp-quote menu-item))
diff --git a/lisp/outline.el b/lisp/outline.el
index 15af855ff43..da5519f95eb 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -751,6 +751,7 @@ If FLAG is nil then text is shown, while if FLAG is t the text is hidden."
;; very end of the heading, before the newline, so text inserted at FROM
;; belongs to the heading rather than to the entry.
(let ((o (make-overlay from to nil 'front-advance)))
+ (overlay-put o 'evaporate t)
(overlay-put o 'invisible 'outline)
(overlay-put o 'isearch-open-invisible
(or outline-isearch-open-invisible-function
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index cc5f0fef934..4b337e1c15c 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -809,10 +809,11 @@ If no tags table is loaded, do nothing and return nil."
beg)
(when pattern
(save-excursion
- (search-backward pattern) ;FIXME: will fail if we're inside pattern.
- (setq beg (point))
- (forward-char (length pattern))
- (list beg (point) (tags-lazy-completion-table) :exclusive 'no))))))
+ (forward-char (1- (length pattern)))
+ (search-backward pattern)
+ (setq beg (point))
+ (forward-char (length pattern))
+ (list beg (point) (tags-lazy-completion-table) :exclusive 'no))))))
(defun find-tag-tag (string)
"Read a tag name, with defaulting and completion."
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el
index 104a8f96727..26db60ddbc2 100644
--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -607,6 +607,7 @@ as cdr."
;; forward comment, and see if we are inside, then extend
;; forward and backward as long as we have comments
(let ((q (point)))
+ (skip-chars-forward "[:blank:]")
(when (or (looking-at hs-c-start-regexp)
(re-search-backward hs-c-start-regexp (point-min) t))
;; first get to the beginning of this comment...
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index bf264972940..66aa256f947 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -96,7 +96,7 @@
(regexp-opt (append ruby-modifier-beg-keywords ruby-block-op-keywords))
"Regexp to match hanging block modifiers.")
-(defconst ruby-block-end-re "\\<end\\>")
+(defconst ruby-block-end-re "\\_<end\\_>")
(eval-and-compile
(defconst ruby-here-doc-beg-re
@@ -115,9 +115,9 @@ This should only be called after matching against `ruby-here-doc-beg-re'."
(match-string 6)))))
(defconst ruby-delimiter
- (concat "[?$/%(){}#\"'`.:]\\|<<\\|\\[\\|\\]\\|\\<\\("
+ (concat "[?$/%(){}#\"'`.:]\\|<<\\|\\[\\|\\]\\|\\_<\\("
ruby-block-beg-re
- "\\)\\>\\|" ruby-block-end-re
+ "\\)\\_>\\|" ruby-block-end-re
"\\|^=begin\\|" ruby-here-doc-beg-re))
(defconst ruby-negative
@@ -166,6 +166,7 @@ This should only be called after matching against `ruby-here-doc-beg-re'."
(modify-syntax-entry ?$ "." table)
(modify-syntax-entry ?? "_" table)
(modify-syntax-entry ?_ "_" table)
+ (modify-syntax-entry ?: "_" table)
(modify-syntax-entry ?< "." table)
(modify-syntax-entry ?> "." table)
(modify-syntax-entry ?& "." table)
@@ -565,7 +566,7 @@ and `\\' when preceded by `?'."
(setq nest (cons (cons nil pnt) nest))
(setq depth (1+ depth))))
(goto-char (match-end 0)))
- ((looking-at (concat "\\<\\(" ruby-block-beg-re "\\)\\>"))
+ ((looking-at (concat "\\_<\\(" ruby-block-beg-re "\\)\\_>"))
(and
(save-match-data
(or (not (looking-at (concat "do" ruby-keyword-end-re)))
@@ -864,7 +865,7 @@ move backward."
;; It seems like it should move to the line where indentation should deepen,
;; but ruby-indent-beg-re only accounts for whitespace before class, module and def,
;; so this will only match other block beginners at the beginning of the line.
- (and (re-search-backward (concat "^\\(" ruby-indent-beg-re "\\)\\b") nil 'move)
+ (and (re-search-backward (concat "^\\(" ruby-indent-beg-re "\\)\\_>") nil 'move)
(beginning-of-line)))
(defun ruby-move-to-block (n)
diff --git a/lisp/window.el b/lisp/window.el
index f79041e0e6c..894d113cdc7 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -2600,11 +2600,14 @@ shall not be switched to in future invocations of this command."
(not (setq killed-buffers
(cons new-buffer killed-buffers))))
(not (eq new-buffer old-buffer))
- (or bury-or-kill
+ (or bury-or-kill
(not (memq new-buffer next-buffers))))
- (set-window-buffer-start-and-point
- window new-buffer (nth 1 entry) (nth 2 entry))
- (throw 'found t)))
+ (if (get-buffer-window new-buffer)
+ ;; Try to avoid showing a buffer visible in some other window.
+ (setq visible new-buffer)
+ (set-window-buffer-start-and-point
+ window new-buffer (nth 1 entry) (nth 2 entry))
+ (throw 'found t))))
;; Scan reverted buffer list of WINDOW's frame next, skipping
;; entries of next buffers. Note that when we bury or kill a
;; buffer we don't reverse the global buffer list to avoid showing
diff --git a/src/ChangeLog.11 b/src/ChangeLog.11
index 2e5404779b1..97d5a65281a 100644
--- a/src/ChangeLog.11
+++ b/src/ChangeLog.11
@@ -9627,7 +9627,7 @@
* frame.c (Vdefault_frame_scroll_bars): Put non-GTK X scroll-bars
on left.
-2010-03-13 Andreas Politz <politza@fh-trier.de> (tiny change)
+2010-03-13 Andreas Politz <politza@fh-trier.de>
* editfns.c (Fformat): Account for string precision when computing
field width (Bug#5710).