aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJoakim Verona2013-02-15 00:04:11 +0100
committerJoakim Verona2013-02-15 00:04:11 +0100
commit73b3f91cfcc9b42d2851ced24d7ba3d17e4c6d00 (patch)
treedc111557cc7492ec9cd6dbfec4db2772ee4121b9 /lisp
parent694d759a9dd8fcbd23078bab33f84ff399d58971 (diff)
parent51b3a99c948dc83f3387f440702ab6e175b61e0f (diff)
downloademacs-73b3f91cfcc9b42d2851ced24d7ba3d17e4c6d00.tar.gz
emacs-73b3f91cfcc9b42d2851ced24d7ba3d17e4c6d00.zip
auto upstream
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog34
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/gnus-util.el7
-rw-r--r--lisp/help-fns.el12
-rw-r--r--lisp/info.el2
-rw-r--r--lisp/net/quickurl.el3
-rw-r--r--lisp/net/tramp.el14
-rw-r--r--lisp/progmodes/ruby-mode.el59
8 files changed, 104 insertions, 32 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index eb3f4f833f5..5a752fe0c3a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,37 @@
12013-02-14 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-debug-message): Add
4 `tramp-condition-case-unless-debug'.
5 (tramp-debug-on-error): New defvar.
6 (tramp-condition-case-unless-debug): New defun.
7 (tramp-file-name-handler): Use it.
8
92013-02-14 Juri Linkov <juri@jurta.org>
10
11 * info.el (Info-isearch-filter): Treat non-nil values of
12 `search-invisible' including its default value `open'
13 like the value `t' to match hidden text. (Bug#13402)
14
152013-02-14 Glenn Morris <rgm@gnu.org>
16
17 * help-fns.el (find-lisp-object-file-name): Give special treatment
18 to all ~/.foo.elc files, not just ~/.emacs. (Bug#9007)
19
202013-02-14 David Biesack <sasdjb@d72933.na.sas.com> (tiny change)
21
22 * net/quickurl.el (quickurl-save-urls):
23 Ensure quickurl-urls is not truncated on printing. (Bug#9276)
24
252013-02-14 Dmitry Gutov <dgutov@yandex.ru>
26
27 * progmodes/ruby-mode.el (ruby-parse-partial): Don't increase
28 depth for unfinished percent literal. Not using it in the caller.
29 (ruby-move-to-block): Jump over multiline literals of all types,
30 ignoring code-looking contents inside them.
31 (ruby-add-log-current-method): Improve performance at the expense
32 of accuracy. `ruby-block-contains-point' is relatively slow, so
33 only use it for method and singleton class blocks.
34
12013-02-13 Michael Albinus <michael.albinus@gmx.de> 352013-02-13 Michael Albinus <michael.albinus@gmx.de>
2 36
3 Use ControlMaster where applicable. (Bug#13677) 37 Use ControlMaster where applicable. (Bug#13677)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 14499a8fafc..b6e8fd976d3 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
12013-02-14 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * gnus-util.el (gnus-define-keys): Convert [?\S-\ ] to [(shift space)]
4 for XEmacs.
5
12013-02-13 Juri Linkov <juri@jurta.org> 62013-02-13 Juri Linkov <juri@jurta.org>
2 7
3 * gnus-art.el (gnus-article-mode-map): 8 * gnus-art.el (gnus-article-mode-map):
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index df805c6fb26..331f9556710 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -333,6 +333,13 @@ TIME defaults to the current time."
333 333
334(defmacro gnus-define-keys (keymap &rest plist) 334(defmacro gnus-define-keys (keymap &rest plist)
335 "Define all keys in PLIST in KEYMAP." 335 "Define all keys in PLIST in KEYMAP."
336 ;; Convert the key [?\S-\ ] to [(shift space)] for XEmacs.
337 (when (featurep 'xemacs)
338 (let ((bindings plist))
339 (while bindings
340 (when (equal (car bindings) [?\S-\ ])
341 (setcar bindings [(shift space)]))
342 (setq bindings (cddr bindings)))))
336 `(gnus-define-keys-1 (quote ,keymap) (quote ,plist))) 343 `(gnus-define-keys-1 (quote ,keymap) (quote ,plist)))
337 344
338(defmacro gnus-define-keys-safe (keymap &rest plist) 345(defmacro gnus-define-keys-safe (keymap &rest plist)
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 178096d1024..bdf86016844 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -336,11 +336,15 @@ suitable file is found, return nil."
336 ;; If we don't have a file-name string by now, we lost. 336 ;; If we don't have a file-name string by now, we lost.
337 nil) 337 nil)
338 ;; Now, `file-name' should have become an absolute file name. 338 ;; Now, `file-name' should have become an absolute file name.
339 ;; For files loaded from ~/.emacs.elc, try ~/.emacs. 339 ;; For files loaded from ~/.foo.elc, try ~/.foo.
340 ;; This applies to config files like ~/.emacs,
341 ;; which people sometimes compile.
340 ((let (fn) 342 ((let (fn)
341 (and (string-equal file-name 343 (and (string-match "\\`\\..*\\.elc\\'"
342 (expand-file-name ".emacs.elc" "~")) 344 (file-name-nondirectory file-name))
343 (file-readable-p (setq fn (expand-file-name ".emacs" "~"))) 345 (string-equal (file-name-directory file-name)
346 (file-name-as-directory (expand-file-name "~")))
347 (file-readable-p (setq fn (file-name-sans-extension file-name)))
344 fn))) 348 fn)))
345 ;; When the Elisp source file can be found in the install 349 ;; When the Elisp source file can be found in the install
346 ;; directory, return the name of that file. 350 ;; directory, return the name of that file.
diff --git a/lisp/info.el b/lisp/info.el
index a6db9f3f4dc..24a7181ff52 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -2151,7 +2151,7 @@ and is not in the header line or a tag table."
2151 (let ((backward (< found beg-found))) 2151 (let ((backward (< found beg-found)))
2152 (not 2152 (not
2153 (or 2153 (or
2154 (and (not (eq search-invisible t)) 2154 (and (not search-invisible)
2155 (if backward 2155 (if backward
2156 (or (text-property-not-all found beg-found 'invisible nil) 2156 (or (text-property-not-all found beg-found 'invisible nil)
2157 (text-property-not-all found beg-found 'display nil)) 2157 (text-property-not-all found beg-found 'display nil))
diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el
index ce9ef55f499..1de9feb1341 100644
--- a/lisp/net/quickurl.el
+++ b/lisp/net/quickurl.el
@@ -272,7 +272,8 @@ It also restores point after the `read'."
272(defun quickurl-save-urls () 272(defun quickurl-save-urls ()
273 "Save the contents of `quickurl-urls' to `quickurl-url-file'." 273 "Save the contents of `quickurl-urls' to `quickurl-url-file'."
274 (with-temp-buffer 274 (with-temp-buffer
275 (let ((standard-output (current-buffer))) 275 (let ((standard-output (current-buffer))
276 (print-length nil))
276 (princ quickurl-prefix) 277 (princ quickurl-prefix)
277 (pp quickurl-urls) 278 (pp quickurl-urls)
278 (princ quickurl-postfix) 279 (princ quickurl-postfix)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index a4250f94988..89648b0e9a9 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1399,6 +1399,7 @@ ARGS to actually emit the message (if applicable)."
1399 "tramp-compat-condition-case-unless-debug" 1399 "tramp-compat-condition-case-unless-debug"
1400 "tramp-compat-funcall" 1400 "tramp-compat-funcall"
1401 "tramp-compat-with-temp-message" 1401 "tramp-compat-with-temp-message"
1402 "tramp-condition-case-unless-debug"
1402 "tramp-debug-message" 1403 "tramp-debug-message"
1403 "tramp-error" 1404 "tramp-error"
1404 "tramp-error-with-buffer" 1405 "tramp-error-with-buffer"
@@ -2011,6 +2012,15 @@ ARGS are the arguments OPERATION has been called with."
2011 res (cdr elt)))) 2012 res (cdr elt))))
2012 res)))) 2013 res))))
2013 2014
2015(defvar tramp-debug-on-error nil
2016 "Like `debug-on-error' but used Tramp internal.")
2017
2018(defmacro tramp-condition-case-unless-debug
2019 (var bodyform &rest handlers)
2020 "Like `condition-case-unless-debug' but `tramp-debug-on-error'."
2021 `(let ((debug-on-error tramp-debug-on-error))
2022 (tramp-compat-condition-case-unless-debug ,var ,bodyform ,@handlers)))
2023
2014;; Main function. 2024;; Main function.
2015;;;###autoload 2025;;;###autoload
2016(defun tramp-file-name-handler (operation &rest args) 2026(defun tramp-file-name-handler (operation &rest args)
@@ -2026,7 +2036,7 @@ Falls back to normal file name handler if no Tramp file name handler exists."
2026 (with-parsed-tramp-file-name filename nil 2036 (with-parsed-tramp-file-name filename nil
2027 ;; Call the backend function. 2037 ;; Call the backend function.
2028 (if foreign 2038 (if foreign
2029 (tramp-compat-condition-case-unless-debug err 2039 (tramp-condition-case-unless-debug err
2030 (let ((sf (symbol-function foreign)) 2040 (let ((sf (symbol-function foreign))
2031 result) 2041 result)
2032 ;; Some packages set the default directory to a 2042 ;; Some packages set the default directory to a
@@ -2079,7 +2089,7 @@ Falls back to normal file name handler if no Tramp file name handler exists."
2079 ;; in order to give the user a chance to correct the 2089 ;; in order to give the user a chance to correct the
2080 ;; file name in the minibuffer. 2090 ;; file name in the minibuffer.
2081 ;; In order to get a full backtrace, one could apply 2091 ;; In order to get a full backtrace, one could apply
2082 ;; (setq debug-on-error t debug-on-signal t) 2092 ;; (setq tramp-debug-on-error t)
2083 (error 2093 (error
2084 (cond 2094 (cond
2085 ((and completion (zerop (length localname)) 2095 ((and completion (zerop (length localname))
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index b1017bb6302..9b007c0063a 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -519,12 +519,6 @@ Can be one of `heredoc', `modifier', `expr-qstr', `expr-re'."
519 (concat "[^\\]\\(\\\\\\\\\\)*" w)) 519 (concat "[^\\]\\(\\\\\\\\\\)*" w))
520 end t))) 520 end t)))
521 (setq in-string (point)) 521 (setq in-string (point))
522 (when (eq (char-syntax (string-to-char w)) ?\()
523 ;; The rest of the literal, when parsed separately, will
524 ;; have the depth of -1. So in the rare case when this
525 ;; number is used despite the in-string status, the
526 ;; depths will balance.
527 (setq depth (1+ depth)))
528 (goto-char end))) 522 (goto-char end)))
529 (t 523 (t
530 (goto-char pnt)))) 524 (goto-char pnt))))
@@ -913,10 +907,16 @@ current block, a sibling block, or an outer block. Do that (abs N) times."
913 (re-search-forward "^=end\\>")) 907 (re-search-forward "^=end\\>"))
914 ((and backward (looking-at "^=end\\>")) 908 ((and backward (looking-at "^=end\\>"))
915 (re-search-backward "^=begin\\>")) 909 (re-search-backward "^=begin\\>"))
910 ;; Jump over a multiline literal.
911 ((ruby-in-ppss-context-p 'string)
912 (goto-char (nth 8 (syntax-ppss)))
913 (unless backward
914 (forward-sexp)
915 (when (bolp) (forward-char -1)))) ; After a heredoc.
916 (t 916 (t
917 (incf depth (or (nth 2 (ruby-parse-region (point) 917 (let ((state (ruby-parse-region (point) (line-end-position))))
918 (line-end-position))) 918 (unless (car state) ; Line ends with unfinished string.
919 0)) 919 (setq depth (+ (nth 2 state) depth))))
920 (cond 920 (cond
921 ;; Deeper indentation, we found a block. 921 ;; Deeper indentation, we found a block.
922 ;; FIXME: We can't recognize empty blocks this way. 922 ;; FIXME: We can't recognize empty blocks this way.
@@ -1073,29 +1073,33 @@ For example:
1073See `add-log-current-defun-function'." 1073See `add-log-current-defun-function'."
1074 (condition-case nil 1074 (condition-case nil
1075 (save-excursion 1075 (save-excursion
1076 (let ((indent 0) mname mlist 1076 (let* ((indent 0) mname mlist
1077 (start (point)) 1077 (start (point))
1078 (definition-re 1078 (make-definition-re
1079 (concat "^[ \t]*" ruby-defun-beg-re "[ \t]+" 1079 (lambda (re)
1080 "\\(" 1080 (concat "^[ \t]*" re "[ \t]+"
1081 ;; \\. and :: for class methods 1081 "\\("
1082 "\\([A-Za-z_]" ruby-symbol-re "*\\|\\.\\|::" "\\)" 1082 ;; \\. and :: for class methods
1083 "+\\)"))) 1083 "\\([A-Za-z_]" ruby-symbol-re "*\\|\\.\\|::" "\\)"
1084 "+\\)")))
1085 (definition-re (funcall make-definition-re ruby-defun-beg-re))
1086 (module-re (funcall make-definition-re "\\(class\\|module\\)")))
1084 ;; Get the current method definition (or class/module). 1087 ;; Get the current method definition (or class/module).
1085 (when (re-search-backward definition-re nil t) 1088 (when (re-search-backward definition-re nil t)
1086 (goto-char (match-beginning 1)) 1089 (goto-char (match-beginning 1))
1087 (when (ruby-block-contains-point start) 1090 (if (not (string-equal "def" (match-string 1)))
1088 ;; We're inside the method, class or module. 1091 (setq mlist (list (match-string 2)))
1089 (setq mname (match-string 2)) 1092 ;; We're inside the method. For classes and modules,
1090 (unless (string-equal "def" (match-string 1)) 1093 ;; this check is skipped for performance.
1091 (setq mlist (list mname) mname nil))) 1094 (when (ruby-block-contains-point start)
1095 (setq mname (match-string 2))))
1092 (setq indent (current-column)) 1096 (setq indent (current-column))
1093 (beginning-of-line)) 1097 (beginning-of-line))
1094 ;; Walk up the class/module nesting. 1098 ;; Walk up the class/module nesting.
1095 (while (and (> indent 0) 1099 (while (and (> indent 0)
1096 (re-search-backward definition-re nil t)) 1100 (re-search-backward module-re nil t))
1097 (goto-char (match-beginning 1)) 1101 (goto-char (match-beginning 1))
1098 (when (ruby-block-contains-point start) 1102 (when (< (current-column) indent)
1099 (setq mlist (cons (match-string 2) mlist)) 1103 (setq mlist (cons (match-string 2) mlist))
1100 (setq indent (current-column)) 1104 (setq indent (current-column))
1101 (beginning-of-line))) 1105 (beginning-of-line)))
@@ -1121,6 +1125,13 @@ See `add-log-current-defun-function'."
1121 (let ((in-singleton-class 1125 (let ((in-singleton-class
1122 (when (re-search-forward ruby-singleton-class-re start t) 1126 (when (re-search-forward ruby-singleton-class-re start t)
1123 (goto-char (match-beginning 0)) 1127 (goto-char (match-beginning 0))
1128 ;; FIXME: Optimize it out, too?
1129 ;; This can be slow in a large file, but
1130 ;; unlike class/module declaration
1131 ;; indentations, method definitions can be
1132 ;; intermixed with these, and may or may not
1133 ;; be additionally indented after visibility
1134 ;; keywords.
1124 (ruby-block-contains-point start)))) 1135 (ruby-block-contains-point start))))
1125 (setq mname (concat 1136 (setq mname (concat
1126 (if in-singleton-class "." "#") 1137 (if in-singleton-class "." "#")