;;;###tramp-autoload
(defun tramp-get-local-gid (id-format)
+ ;; `group-gid' has been introduced with Emacs 24.4.
(if (and (fboundp 'group-gid) (equal id-format 'integer))
(tramp-compat-funcall 'group-gid)
- (nth 3 (tramp-compat-file-attributes "~/" id-format))))
+ (nth 3 (file-attributes "~/" id-format))))
+
++(defun tramp-get-local-locale (&optional vec)
++ ;; We use key nil for local connection properties.
++ (with-tramp-connection-property nil "locale"
++ (let ((candidates '("en_US.utf8" "C.utf8" "en_US.UTF-8"))
++ locale)
++ (with-temp-buffer
++ (unless (or (memq system-type '(windows-nt))
++ (not (zerop (tramp-call-process
++ nil "locale" nil t nil "-a"))))
++ (while candidates
++ (goto-char (point-min))
++ (if (string-match (format "^%s\r?$" (regexp-quote (car candidates)))
++ (buffer-string))
++ (setq locale (car candidates)
++ candidates nil)
++ (setq candidates (cdr candidates))))))
++ ;; Return value.
++ (when vec (tramp-message vec 7 "locale %s" (or locale "C")))
++ (or locale "C"))))
+
(defun tramp-get-local-locale (&optional vec)
;; We use key nil for local connection properties.
(with-tramp-connection-property nil "locale"
`(c-forward-type)
`(c-forward-name)))
nil
- (and (looking-at c-keywords-regexp)
- (c-forward-keyword-clause 1))))
+ (cond ((looking-at c-keywords-regexp)
+ (c-forward-keyword-clause 1))
+ ((and c-opt-cpp-prefix
+ (looking-at c-noise-macro-with-parens-name-re))
+ (c-forward-noise-clause)))))
- (when (memq res '(t known found prefix))
- ,(when (eq type 'ref)
- `(when c-record-type-identifiers
- (c-record-ref-id c-last-identifier-range)))
+ (when (memq res '(t known found prefix maybe))
+ (when c-record-type-identifiers
- ,(if (eq type 'type)
- `(c-record-type-id c-last-identifier-range)
- `(c-record-ref-id c-last-identifier-range)))
++ ,(if (eq type 'type)
++ `(c-record-type-id c-last-identifier-range)
++ `(c-record-ref-id c-last-identifier-range)))
t)))
(defmacro c-forward-id-comma-list (type update-safe-pos)
--- /dev/null
+var a = 1;
+b = 2;
+
+let c = 1,
+ d = 2;
+
+var e = 100500,
+ + 1;
+
+function test ()
+{
+ return /[/]/.test ('/') // (bug#19397)
+}
+
+var f = bar('/protocols/')
+baz();
+
+var h = 100500
+1;
+
+const i = 1,
+ j = 2;
+
+var k = 1,
+ l = [
+ 1, 2,
+ 3, 4
+ ],
+ m = 5;
+
+var n = function() {
+ return 7;
+},
+ o = 8;
+
+foo(bar, function() {
+ return 2;
+});
+
+switch (b) {
+case "a":
+ 2;
+default:
+ 3;
+}
+
+var p = {
+ case: 'zzzz',
+ default: 'donkey',
+ tee: 'ornery'
+};
+
+var evens = [e for each (e in range(0, 21))
+ if (ed % 2 == 0)];
+
+!b
+ !=b
+ !==b
+
+a++
+b +=
+ c
+
+baz(`http://foo.bar/${tee}`)
+ .qux();
+
+`multiline string
+ contents
+ are kept
+ unchanged!`
+
+class A {
+ * x() {
+ return 1
+ * a(2);
+ }
+
+ *[Symbol.iterator]() {
+ yield "Foo";
+ yield "Bar";
+ }
+}
+
+if (true)
+ 1
+else
+ 2
+
+Foobar
+ .find()
+ .catch((err) => {
+ return 2;
+ })
+ .then((num) => {
+ console.log(num);
+ });
+
++var arr = [
++ -1, 2,
++ -3, 4 +
++ -5
++];
++
+// Local Variables:
+// indent-tabs-mode: nil
+// js-indent-level: 2
+// End: