diff options
| author | Joakim Verona | 2012-04-26 11:52:04 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-04-26 11:52:04 +0200 |
| commit | ab5b626f97ea7d71a98a06d8cc777fa925a1f716 (patch) | |
| tree | 7961d0e6b583290e1480771cd0fabd00f4ea7f86 /lisp/progmodes | |
| parent | 2ec5843f029c7d55234dbe51d993003b2b3939ec (diff) | |
| parent | ab036cd7bdd7b087047d241ffb5607d14942179e (diff) | |
| download | emacs-ab5b626f97ea7d71a98a06d8cc777fa925a1f716.tar.gz emacs-ab5b626f97ea7d71a98a06d8cc777fa925a1f716.zip | |
upstream partial out of memory
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 5 | ||||
| -rw-r--r-- | lisp/progmodes/cc-menus.el | 41 | ||||
| -rw-r--r-- | lisp/progmodes/flymake.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/grep.el | 3 | ||||
| -rw-r--r-- | lisp/progmodes/hideshow.el | 11 | ||||
| -rw-r--r-- | lisp/progmodes/which-func.el | 11 |
6 files changed, 43 insertions, 36 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index cf38001c123..65e28c11e21 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -5382,7 +5382,7 @@ comment at the start of cc-engine.el for more info." | |||
| 5382 | new-beg new-end need-new-beg need-new-end) | 5382 | new-beg new-end need-new-beg need-new-end) |
| 5383 | ;; Locate the barrier before the changed region | 5383 | ;; Locate the barrier before the changed region |
| 5384 | (goto-char (if beg-lit-limits (car beg-lit-limits) beg)) | 5384 | (goto-char (if beg-lit-limits (car beg-lit-limits) beg)) |
| 5385 | (c-syntactic-skip-backward "^;{}" (max (- beg 2048) (point-min))) | 5385 | (c-syntactic-skip-backward "^;{}" (c-determine-limit 512)) |
| 5386 | (setq new-beg (point)) | 5386 | (setq new-beg (point)) |
| 5387 | 5387 | ||
| 5388 | ;; Remove the syntax-table properties from each pertinent <...> pair. | 5388 | ;; Remove the syntax-table properties from each pertinent <...> pair. |
| @@ -5393,8 +5393,7 @@ comment at the start of cc-engine.el for more info." | |||
| 5393 | 5393 | ||
| 5394 | ;; Locate the barrier after END. | 5394 | ;; Locate the barrier after END. |
| 5395 | (goto-char (if end-lit-limits (cdr end-lit-limits) end)) | 5395 | (goto-char (if end-lit-limits (cdr end-lit-limits) end)) |
| 5396 | (c-syntactic-re-search-forward "[;{}]" | 5396 | (c-syntactic-re-search-forward "[;{}]" (c-determine-+ve-limit 512) 'end) |
| 5397 | (min (+ end 2048) (point-max)) 'end) | ||
| 5398 | (setq new-end (point)) | 5397 | (setq new-end (point)) |
| 5399 | 5398 | ||
| 5400 | ;; Remove syntax-table properties from the remaining pertinent <...> | 5399 | ;; Remove syntax-table properties from the remaining pertinent <...> |
diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el index f57fcbff5ca..a53d65f6307 100644 --- a/lisp/progmodes/cc-menus.el +++ b/lisp/progmodes/cc-menus.el | |||
| @@ -63,6 +63,20 @@ For example: | |||
| 63 | 63 | ||
| 64 | A sample value might look like: `\\(_P\\|_PROTO\\)'.") | 64 | A sample value might look like: `\\(_P\\|_PROTO\\)'.") |
| 65 | 65 | ||
| 66 | ;; *Warning for cc-mode developers* | ||
| 67 | ;; | ||
| 68 | ;; `cc-imenu-objc-generic-expression' elements depend on | ||
| 69 | ;; `cc-imenu-c++-generic-expression'. So if you change this | ||
| 70 | ;; expression, you need to change following variables, | ||
| 71 | ;; `cc-imenu-objc-generic-expression-*-index', | ||
| 72 | ;; too. `cc-imenu-objc-function' uses these *-index variables, in | ||
| 73 | ;; order to know where the each regexp *group \\(foobar\\)* elements | ||
| 74 | ;; are started. | ||
| 75 | ;; | ||
| 76 | ;; *-index variables are initialized during `cc-imenu-objc-generic-expression' | ||
| 77 | ;; being initialized. | ||
| 78 | ;; | ||
| 79 | |||
| 66 | (defvar cc-imenu-c++-generic-expression | 80 | (defvar cc-imenu-c++-generic-expression |
| 67 | `( | 81 | `( |
| 68 | ;; Try to match ::operator definitions first. Otherwise `X::operator new ()' | 82 | ;; Try to match ::operator definitions first. Otherwise `X::operator new ()' |
| @@ -187,23 +201,8 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") | |||
| 187 | ")" | 201 | ")" |
| 188 | "[.," c-alnum " \t\n\r]*" | 202 | "[.," c-alnum " \t\n\r]*" |
| 189 | "{" | 203 | "{" |
| 190 | )) 1)) | 204 | )) 1)) |
| 191 | "Imenu generic expression for Java mode. See | 205 | "Imenu generic expression for Java mode. See `imenu-generic-expression'.") |
| 192 | `imenu-generic-expression'.") | ||
| 193 | |||
| 194 | ;; *Warning for cc-mode developers* | ||
| 195 | ;; | ||
| 196 | ;; `cc-imenu-objc-generic-expression' elements depend on | ||
| 197 | ;; `cc-imenu-c++-generic-expression'. So if you change this | ||
| 198 | ;; expression, you need to change following variables, | ||
| 199 | ;; `cc-imenu-objc-generic-expression-*-index', | ||
| 200 | ;; too. `cc-imenu-objc-function' uses these *-index variables, in | ||
| 201 | ;; order to know where the each regexp *group \\(foobar\\)* elements | ||
| 202 | ;; are started. | ||
| 203 | ;; | ||
| 204 | ;; *-index variables are initialized during `cc-imenu-objc-generic-expression' | ||
| 205 | ;; being initialized. | ||
| 206 | ;; | ||
| 207 | 206 | ||
| 208 | ;; Internal variables | 207 | ;; Internal variables |
| 209 | (defvar cc-imenu-objc-generic-expression-noreturn-index nil) | 208 | (defvar cc-imenu-objc-generic-expression-noreturn-index nil) |
| @@ -224,7 +223,7 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") | |||
| 224 | "\\|" | 223 | "\\|" |
| 225 | ;; > General function name regexp | 224 | ;; > General function name regexp |
| 226 | ;; Pick a token by (match-string 3) | 225 | ;; Pick a token by (match-string 3) |
| 227 | (car (cdr (nth 2 cc-imenu-c++-generic-expression))) ; -> index += 5 | 226 | (car (cdr (nth 2 cc-imenu-c++-generic-expression))) ; -> index += 6 |
| 228 | (prog2 (setq cc-imenu-objc-generic-expression-general-func-index 3) "") | 227 | (prog2 (setq cc-imenu-objc-generic-expression-general-func-index 3) "") |
| 229 | ;; > Special case for definitions using phony prototype macros like: | 228 | ;; > Special case for definitions using phony prototype macros like: |
| 230 | ;; > `int main _PROTO( (int argc,char *argv[]) )'. | 229 | ;; > `int main _PROTO( (int argc,char *argv[]) )'. |
| @@ -233,11 +232,11 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") | |||
| 233 | (concat | 232 | (concat |
| 234 | "\\|" | 233 | "\\|" |
| 235 | (car (cdr (nth 3 cc-imenu-c++-generic-expression))) ; -> index += 1 | 234 | (car (cdr (nth 3 cc-imenu-c++-generic-expression))) ; -> index += 1 |
| 236 | (prog2 (setq cc-imenu-objc-generic-expression-objc-base-index 9) "") | 235 | (prog2 (setq cc-imenu-objc-generic-expression-objc-base-index 10) "") |
| 237 | ) | 236 | ) |
| 238 | (prog2 (setq cc-imenu-objc-generic-expression-objc-base-index 8) "") | 237 | (prog2 (setq cc-imenu-objc-generic-expression-objc-base-index 9) "") |
| 239 | "") ; -> index += 0 | 238 | "") ; -> index += 0 |
| 240 | (prog2 (setq cc-imenu-objc-generic-expression-proto-index 8) "") | 239 | (prog2 (setq cc-imenu-objc-generic-expression-proto-index 9) "") |
| 241 | ;; | 240 | ;; |
| 242 | ;; For Objective-C | 241 | ;; For Objective-C |
| 243 | ;; Pick a token by (match-string 8 or 9) | 242 | ;; Pick a token by (match-string 8 or 9) |
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 07393c6954d..ed8eb81932e 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el | |||
| @@ -1356,8 +1356,12 @@ if ARG is omitted or nil." | |||
| 1356 | (setq flymake-timer | 1356 | (setq flymake-timer |
| 1357 | (run-at-time nil 1 'flymake-on-timer-event (current-buffer))) | 1357 | (run-at-time nil 1 'flymake-on-timer-event (current-buffer))) |
| 1358 | 1358 | ||
| 1359 | (when flymake-start-syntax-check-on-find-file | 1359 | (when (and flymake-start-syntax-check-on-find-file |
| 1360 | (flymake-start-syntax-check))))) | 1360 | ;; Since we write temp files in current dir, there's no point |
| 1361 | ;; trying if the directory is read-only (bug#8954). | ||
| 1362 | (file-writable-p (file-name-directory buffer-file-name))) | ||
| 1363 | (with-demoted-errors | ||
| 1364 | (flymake-start-syntax-check)))))) | ||
| 1361 | 1365 | ||
| 1362 | ;; Turning the mode OFF. | 1366 | ;; Turning the mode OFF. |
| 1363 | (t | 1367 | (t |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index d41364547f2..569e864a1c6 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -1024,7 +1024,8 @@ to specify a command to run." | |||
| 1024 | (shell-quote-argument ")") | 1024 | (shell-quote-argument ")") |
| 1025 | " -prune -o ")) | 1025 | " -prune -o ")) |
| 1026 | (and grep-find-ignored-files | 1026 | (and grep-find-ignored-files |
| 1027 | (concat (shell-quote-argument "(") | 1027 | (concat (shell-quote-argument "!") " -type d " |
| 1028 | (shell-quote-argument "(") | ||
| 1028 | ;; we should use shell-quote-argument here | 1029 | ;; we should use shell-quote-argument here |
| 1029 | " -name " | 1030 | " -name " |
| 1030 | (mapconcat | 1031 | (mapconcat |
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index e2016e206a8..b6d2b5e319c 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el | |||
| @@ -802,12 +802,15 @@ If `hs-hide-comments-when-hiding-all' is non-nil, also hide the comments." | |||
| 802 | (forward-comment (point-max))) | 802 | (forward-comment (point-max))) |
| 803 | (re-search-forward re (point-max) t)) | 803 | (re-search-forward re (point-max) t)) |
| 804 | (if (match-beginning 1) | 804 | (if (match-beginning 1) |
| 805 | ;; we have found a block beginning | 805 | ;; We have found a block beginning. |
| 806 | (progn | 806 | (progn |
| 807 | (goto-char (match-beginning 1)) | 807 | (goto-char (match-beginning 1)) |
| 808 | (if hs-hide-all-non-comment-function | 808 | (unless (if hs-hide-all-non-comment-function |
| 809 | (funcall hs-hide-all-non-comment-function) | 809 | (funcall hs-hide-all-non-comment-function) |
| 810 | (hs-hide-block-at-point t))) | 810 | (hs-hide-block-at-point t)) |
| 811 | ;; Go to end of matched data to prevent from getting stuck | ||
| 812 | ;; with an endless loop. | ||
| 813 | (goto-char (match-end 0)))) | ||
| 811 | ;; found a comment, probably | 814 | ;; found a comment, probably |
| 812 | (let ((c-reg (hs-inside-comment-p))) | 815 | (let ((c-reg (hs-inside-comment-p))) |
| 813 | (when (and c-reg (car c-reg)) | 816 | (when (and c-reg (car c-reg)) |
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 721c610517a..bacc542a388 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; which-func.el --- print current function in mode line | 1 | ;;; which-func.el --- print current function in mode line |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1994, 1997-1998, 2001-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1994, 1997-1998, 2001-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Alex Rezinsky <alexr@msil.sps.mot.com> | 5 | ;; Author: Alex Rezinsky <alexr@msil.sps.mot.com> |
| 6 | ;; (doesn't seem to be responsive any more) | 6 | ;; (doesn't seem to be responsive any more) |
| @@ -72,14 +72,15 @@ | |||
| 72 | :group 'tools | 72 | :group 'tools |
| 73 | :version "20.3") | 73 | :version "20.3") |
| 74 | 74 | ||
| 75 | (defcustom which-func-modes | 75 | (defcustom which-func-modes t |
| 76 | '(emacs-lisp-mode c-mode c++-mode perl-mode cperl-mode python-mode | 76 | ;; '(emacs-lisp-mode c-mode c++-mode objc-mode perl-mode cperl-mode python-mode |
| 77 | makefile-mode sh-mode fortran-mode f90-mode ada-mode | 77 | ;; makefile-mode sh-mode fortran-mode f90-mode ada-mode |
| 78 | diff-mode) | 78 | ;; diff-mode) |
| 79 | "List of major modes for which Which Function mode should be used. | 79 | "List of major modes for which Which Function mode should be used. |
| 80 | For other modes it is disabled. If this is equal to t, | 80 | For other modes it is disabled. If this is equal to t, |
| 81 | then Which Function mode is enabled in any major mode that supports it." | 81 | then Which Function mode is enabled in any major mode that supports it." |
| 82 | :group 'which-func | 82 | :group 'which-func |
| 83 | :version "24.2" ; added objc-mode | ||
| 83 | :type '(choice (const :tag "All modes" t) | 84 | :type '(choice (const :tag "All modes" t) |
| 84 | (repeat (symbol :tag "Major mode")))) | 85 | (repeat (symbol :tag "Major mode")))) |
| 85 | 86 | ||