diff options
| author | Joakim Verona | 2013-04-17 21:56:43 +0200 |
|---|---|---|
| committer | Joakim Verona | 2013-04-17 21:56:43 +0200 |
| commit | 7ae411e3bef9f3bb49502614067b301944b775bf (patch) | |
| tree | 2a7ca825644b8c83cd1dbf17f810bc9d3c3fd7f6 | |
| parent | 1083adac63284cf1f81676c6adc801c9ceb283a8 (diff) | |
| parent | 86dfe9dc6768ae0e932b4a29ce7da5ceb613855a (diff) | |
| download | emacs-7ae411e3bef9f3bb49502614067b301944b775bf.tar.gz emacs-7ae411e3bef9f3bb49502614067b301944b775bf.zip | |
upstream
35 files changed, 716 insertions, 174 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index f65c2e85461..31e4f791350 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-04-15 Christopher Schmidt <christopher@ch.ristopher.com> | ||
| 2 | |||
| 3 | * tips.texi (Coding Conventions): Mention separation of package | ||
| 4 | descriptor and name of internal symbols by two hyphens. | ||
| 5 | |||
| 1 | 2013-04-13 Stephen Berman <stephen.berman@gmx.net> | 6 | 2013-04-13 Stephen Berman <stephen.berman@gmx.net> |
| 2 | 7 | ||
| 3 | * windows.texi (Splitting Windows): Change category of | 8 | * windows.texi (Splitting Windows): Change category of |
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index 4c443da3af8..c40ae408f7f 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi | |||
| @@ -51,13 +51,15 @@ don't postpone it. | |||
| 51 | 51 | ||
| 52 | @item | 52 | @item |
| 53 | You should choose a short word to distinguish your program from other | 53 | You should choose a short word to distinguish your program from other |
| 54 | Lisp programs. The names of all global variables, constants, and | 54 | Lisp programs. The names of all global symbols in your program, that |
| 55 | functions in your program should begin with that chosen prefix. | 55 | is the names of variables, constants, and functions, should begin with |
| 56 | Separate the prefix from the rest of the name with a hyphen, @samp{-}. | 56 | that chosen prefix. Separate the prefix from the rest of the name |
| 57 | This practice helps avoid name conflicts, since all global variables | 57 | with a hyphen, @samp{-}. Use two hyphens if the symbol is not meant |
| 58 | in Emacs Lisp share the same name space, and all functions share | 58 | to be used by other packages. This practice helps avoid name |
| 59 | another name space@footnote{The benefits of a Common Lisp-style | 59 | conflicts, since all global variables in Emacs Lisp share the same |
| 60 | package system are considered not to outweigh the costs.}. | 60 | name space, and all functions share another name space@footnote{The |
| 61 | benefits of a Common Lisp-style package system are considered not to | ||
| 62 | outweigh the costs.}. | ||
| 61 | 63 | ||
| 62 | Occasionally, for a command name intended for users to use, it is more | 64 | Occasionally, for a command name intended for users to use, it is more |
| 63 | convenient if some words come before the package's name prefix. And | 65 | convenient if some words come before the package's name prefix. And |
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 285097c5553..5e9840a86b7 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2013-04-16 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * tramp.texi (Frequently Asked Questions): Precise, how to define | ||
| 4 | an own ControlPath. | ||
| 5 | |||
| 6 | 2013-04-15 Michael Albinus <michael.albinus@gmx.de> | ||
| 7 | |||
| 8 | * tramp.texi (Frequently Asked Questions): New item for | ||
| 9 | ControlPath settings. | ||
| 10 | |||
| 1 | 2013-03-31 Jay Belanger <jay.p.belanger@gmail.com> | 11 | 2013-03-31 Jay Belanger <jay.p.belanger@gmail.com> |
| 2 | 12 | ||
| 3 | * calc.texi: (Basic Operations on Units): Streamline some | 13 | * calc.texi: (Basic Operations on Units): Streamline some |
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 4837b4456be..4c3740f02f7 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi | |||
| @@ -3124,6 +3124,45 @@ Host * | |||
| 3124 | 3124 | ||
| 3125 | 3125 | ||
| 3126 | @item | 3126 | @item |
| 3127 | @value{tramp} does not use my @command{ssh} @code{ControlPath} | ||
| 3128 | |||
| 3129 | Your @code{ControlPath} setting will be overwritten by @command{ssh} | ||
| 3130 | sessions initiated by @value{tramp}. This is because a master | ||
| 3131 | session, initiated outside @value{emacsname}, could be closed, which | ||
| 3132 | would stall all other @command{ssh} sessions for that host inside | ||
| 3133 | @value{emacsname}. | ||
| 3134 | |||
| 3135 | Consequently, if you connect to a remote host via @value{tramp}, you | ||
| 3136 | might be prompted for a password again, even if you have established | ||
| 3137 | already an @command{ssh} connection to that host. Further | ||
| 3138 | @value{tramp} connections to that host, for example in order to run a | ||
| 3139 | process on that host, will reuse that initial @command{ssh} | ||
| 3140 | connection. | ||
| 3141 | |||
| 3142 | If your @command{ssh} version supports the @code{ControlPersist} | ||
| 3143 | option, you could customize the variable | ||
| 3144 | @code{tramp-ssh-controlmaster-options} to use your @code{ControlPath}, | ||
| 3145 | for example: | ||
| 3146 | |||
| 3147 | @lisp | ||
| 3148 | (setq tramp-ssh-controlmaster-options | ||
| 3149 | (concat | ||
| 3150 | "-o ControlPath=/tmp/ssh-ControlPath-%%r@@%%h:%%p " | ||
| 3151 | "-o ControlMaster=auto -o ControlPersist=yes")) | ||
| 3152 | @end lisp | ||
| 3153 | |||
| 3154 | Note, that "%r", "%h" and "%p" must be encoded as "%%r", "%%h" and | ||
| 3155 | "%%p", respectively. The entries of @code{ControlPath}, | ||
| 3156 | @code{ControlMaster} and @code{ControlPersist} can be removed from | ||
| 3157 | this setting, if they are configured properly in your | ||
| 3158 | @file{~/.ssh/config}: | ||
| 3159 | |||
| 3160 | @lisp | ||
| 3161 | (setq tramp-ssh-controlmaster-options "") | ||
| 3162 | @end lisp | ||
| 3163 | |||
| 3164 | |||
| 3165 | @item | ||
| 3127 | File name completion does not work with @value{tramp} | 3166 | File name completion does not work with @value{tramp} |
| 3128 | 3167 | ||
| 3129 | When you log in to the remote machine, do you see the output of | 3168 | When you log in to the remote machine, do you see the output of |
diff --git a/etc/ChangeLog b/etc/ChangeLog index 31d14b96d94..2b7534dc1e7 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-04-15 Christopher Schmidt <christopher@ch.ristopher.com> | ||
| 2 | |||
| 3 | * NEWS: Mention separation of package descriptor and name of | ||
| 4 | internal symbols by two hyphens. | ||
| 5 | |||
| 1 | 2013-04-13 Stephen Berman <stephen.berman@gmx.net> | 6 | 2013-04-13 Stephen Berman <stephen.berman@gmx.net> |
| 2 | 7 | ||
| 3 | * NEWS: Mention fixing `split-window' to be non-interactive. | 8 | * NEWS: Mention fixing `split-window' to be non-interactive. |
| @@ -409,6 +409,12 @@ used in place of the 9th element of `file-attributes'. | |||
| 409 | `preserve-extended-attributes' as it now handles both SELinux context | 409 | `preserve-extended-attributes' as it now handles both SELinux context |
| 410 | and ACL entries. | 410 | and ACL entries. |
| 411 | 411 | ||
| 412 | ** Changes to the Emacs Lisp Coding Conventions in Emacs 24.4 | ||
| 413 | |||
| 414 | *** The package descriptor and name of global variables, constants, | ||
| 415 | and functions should be separated by two hypens if the symbol is not | ||
| 416 | meant to be used by other packages. | ||
| 417 | |||
| 412 | 418 | ||
| 413 | * Changes in Emacs 24.4 on Non-Free Operating Systems | 419 | * Changes in Emacs 24.4 on Non-Free Operating Systems |
| 414 | 420 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b0997a307f5..11666c60c74 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,130 @@ | |||
| 1 | 2013-04-17 Fabián Ezequiel Gallina <fgallina@gnu.org> | ||
| 2 | |||
| 3 | New defun movement commands. | ||
| 4 | * progmodes/python.el (python-nav--syntactically) | ||
| 5 | (python-nav--forward-defun, python-nav-backward-defun) | ||
| 6 | (python-nav-forward-defun): New functions. | ||
| 7 | |||
| 8 | 2013-04-17 Fabián Ezequiel Gallina <fgallina@gnu.org> | ||
| 9 | |||
| 10 | * progmodes/python.el (python-syntax--context-compiler-macro): New defun. | ||
| 11 | (python-syntax-context): Use named compiler-macro for backwards | ||
| 12 | compatibility with Emacs 24.x. | ||
| 13 | |||
| 14 | 2013-04-17 Leo Liu <sdl.web@gmail.com> | ||
| 15 | |||
| 16 | * progmodes/octave-mod.el (octave-mode-map): Fix key binding to | ||
| 17 | octave-hide-process-buffer. | ||
| 18 | |||
| 19 | 2013-04-17 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 20 | |||
| 21 | * vc/vc-hg.el (vc-hg-annotate-re): Disallow ": " in file names | ||
| 22 | (bug#14216). | ||
| 23 | |||
| 24 | 2013-04-17 Jean-Philippe Gravel <jpgravel@gmail.com> | ||
| 25 | |||
| 26 | * progmodes/gdb-mi.el (gdbmi-bnf-incomplete-record-result): | ||
| 27 | Fix adjustment of offset when receiving incomplete responses from GDB | ||
| 28 | (bug#14129). | ||
| 29 | |||
| 30 | 2013-04-16 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 31 | |||
| 32 | * progmodes/python.el (python-mode-skeleton-abbrev-table): Rename from | ||
| 33 | python-mode-abbrev-table. | ||
| 34 | (python-skeleton-define): Adjust accordingly. | ||
| 35 | (python-mode-abbrev-table): New table that inherits from it so that | ||
| 36 | python-skeleton-autoinsert does not affect non-skeleton abbrevs. | ||
| 37 | |||
| 38 | * abbrev.el (abbrev--symbol): New function, extracted from abbrev-symbol. | ||
| 39 | (abbrev-symbol): Use it. | ||
| 40 | (abbrev--before-point): Use it since we already handle inheritance. | ||
| 41 | |||
| 42 | 2013-04-16 Leo Liu <sdl.web@gmail.com> | ||
| 43 | |||
| 44 | * progmodes/octave-mod.el (octave-mode-map): Remove redundant key | ||
| 45 | binding to info-lookup-symbol. | ||
| 46 | |||
| 47 | 2013-04-16 Juanma Barranquero <lekktu@gmail.com> | ||
| 48 | |||
| 49 | * minibuffer.el (completion--twq-all): | ||
| 50 | * term/ns-win.el (ns-initialize-window-system): | ||
| 51 | * term/w32-win.el (w32-initialize-window-system): Silence byte-compiler. | ||
| 52 | |||
| 53 | 2013-04-16 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 54 | |||
| 55 | * emacs-lisp/nadvice.el (add-function): Default simple vars to their | ||
| 56 | global bindings. | ||
| 57 | |||
| 58 | * doc-view.el (doc-view-start-process): Handle url-handler directories. | ||
| 59 | |||
| 60 | 2013-04-15 Dmitry Gutov <dgutov@yandex.ru> | ||
| 61 | |||
| 62 | * progmodes/ruby-mode.el (ruby-beginning-of-defun) | ||
| 63 | (ruby-end-of-defun, ruby-move-to-block): Bind `case-fold-search' | ||
| 64 | to nil. | ||
| 65 | (ruby-end-of-defun): Remove the unused arg, change the docstring | ||
| 66 | to reflect that this function is only used as the value of | ||
| 67 | `end-of-defun-function'. | ||
| 68 | (ruby-beginning-of-defun): Remove "top-level" from the docstring, | ||
| 69 | to reflect an earlier change that beginning/end-of-defun functions | ||
| 70 | jump between methods in a class definition, as well as top-level | ||
| 71 | functions. | ||
| 72 | |||
| 73 | 2013-04-15 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 74 | |||
| 75 | * minibuffer.el (minibuffer-complete): Don't just scroll | ||
| 76 | a *Completions* that's been iconified. | ||
| 77 | (minibuffer-force-complete): Make sure repetitions do cycle when going | ||
| 78 | through completion-in-region -> minibuffer-complete. | ||
| 79 | |||
| 80 | 2013-04-15 Alan Mackenzie <acm@muc.de> | ||
| 81 | |||
| 82 | Correct the placement of c-cpp-delimiters when there're #s not at | ||
| 83 | col 0. | ||
| 84 | |||
| 85 | * progmodes/cc-langs.el (c-anchored-cpp-prefix): Reformulate and | ||
| 86 | place a submatch around the #. | ||
| 87 | * progmodes/cc-mode.el(c-neutralize-syntax-in-and-mark-CPP): | ||
| 88 | Start a search at BOL. Put the c-cpp-delimiter category text propertiy | ||
| 89 | on the #, not BOL. | ||
| 90 | |||
| 91 | 2013-04-15 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 92 | |||
| 93 | * emacs-lisp/nadvice.el: Properly test names when adding advice. | ||
| 94 | (advice--member-p): New arg `name'. | ||
| 95 | (advice--add-function, advice-member-p): Use it (bug#14202). | ||
| 96 | |||
| 97 | 2013-04-15 Filipp Gunbin <fgunbin@fastmail.fm> | ||
| 98 | |||
| 99 | Reformulate java imenu-generic-expression. | ||
| 100 | The old expression contained ill formed regexps. | ||
| 101 | |||
| 102 | * progmodes/cc-menus.el (cc-imenu-java-ellipsis-regexp) | ||
| 103 | (cc-imenu-java-type-spec-regexp, cc-imenu-java-comment-regexp) | ||
| 104 | (cc-imenu-java-method-arg-regexp): New defconsts. | ||
| 105 | (cc-imenu-java-build-type-args-regex): New defun. | ||
| 106 | (cc-imenu-java-generic-expression): Fix, to remove "ambiguous" | ||
| 107 | handling of spaces in the regexp. | ||
| 108 | |||
| 109 | 2013-03-15 Agustín Martín Domingo <agustin.martin@hispalinux.es> | ||
| 110 | |||
| 111 | * textmodes/ispell.el (ispell-command-loop): Remove | ||
| 112 | flyspell highlight of a word when ispell accepts it (bug #14178). | ||
| 113 | |||
| 114 | 2013-04-15 Michael Albinus <michael.albinus@gmx.de> | ||
| 115 | |||
| 116 | * net/ange-ftp.el (ange-ftp-run-real-handler-orig): New defun, | ||
| 117 | uses code from the previous `ange-ftp-run-real-handler'. | ||
| 118 | (ange-ftp-run-real-handler): Set it to `tramp-run-real-handler' | ||
| 119 | only in case that function exist. This is needed for proper | ||
| 120 | unloading of Tramp. | ||
| 121 | |||
| 122 | 2013-04-15 Tassilo Horn <tsdh@gnu.org> | ||
| 123 | |||
| 124 | * textmodes/reftex-vars.el (reftex-label-regexps): New defcustom. | ||
| 125 | |||
| 126 | * textmodes/reftex.el (reftex-compile-variables): Use it. | ||
| 127 | |||
| 1 | 2013-04-14 Stefan Monnier <monnier@iro.umontreal.ca> | 128 | 2013-04-14 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 129 | ||
| 3 | * files.el (normal-mode): Only use default major-mode if no other mode | 130 | * files.el (normal-mode): Only use default major-mode if no other mode |
| @@ -131,7 +258,7 @@ | |||
| 131 | * whitespace.el (whitespace-color-on, whitespace-color-off): | 258 | * whitespace.el (whitespace-color-on, whitespace-color-off): |
| 132 | Only call `font-lock-fontify-buffer' when `font-lock-mode' is on. | 259 | Only call `font-lock-fontify-buffer' when `font-lock-mode' is on. |
| 133 | 260 | ||
| 134 | 2013-04-05 Jacek Chrząszcz <chrzaszcz@mimuw.edu.pl> (tiny change) | 261 | 2013-04-05 Jacek Chrząszcz <chrzaszcz@mimuw.edu.pl> (tiny change) |
| 135 | 262 | ||
| 136 | * ispell.el (ispell-set-spellchecker-params): | 263 | * ispell.el (ispell-set-spellchecker-params): |
| 137 | Really set `ispell-args' for all equivs. | 264 | Really set `ispell-args' for all equivs. |
| @@ -308,7 +435,7 @@ | |||
| 308 | 2013-03-27 Aidan Gauland <aidalgol@no8wireless.co.nz> | 435 | 2013-03-27 Aidan Gauland <aidalgol@no8wireless.co.nz> |
| 309 | 436 | ||
| 310 | * eshell/em-unix.el: Move su and sudo to... | 437 | * eshell/em-unix.el: Move su and sudo to... |
| 311 | * eshell/em-tramp.el: ...Eshell tramp module | 438 | * eshell/em-tramp.el: ...Eshell tramp module. |
| 312 | 439 | ||
| 313 | 2013-03-26 Stefan Monnier <monnier@iro.umontreal.ca> | 440 | 2013-03-26 Stefan Monnier <monnier@iro.umontreal.ca> |
| 314 | 441 | ||
| @@ -1303,7 +1430,6 @@ | |||
| 1303 | * emacs-lisp/eieio-opt.el (eieio-class-button, eieio-describe-generic) | 1430 | * emacs-lisp/eieio-opt.el (eieio-class-button, eieio-describe-generic) |
| 1304 | (eieio-browse-tree, eieio-browse): Use eieio--check-type. | 1431 | (eieio-browse-tree, eieio-browse): Use eieio--check-type. |
| 1305 | 1432 | ||
| 1306 | |||
| 1307 | 2013-02-18 Aidan Gauland <aidalgol@no8wireless.co.nz> | 1433 | 2013-02-18 Aidan Gauland <aidalgol@no8wireless.co.nz> |
| 1308 | 1434 | ||
| 1309 | * eshell/em-cmpl.el: Correct "context-related help" keybinding in | 1435 | * eshell/em-cmpl.el: Correct "context-related help" keybinding in |
| @@ -1510,7 +1636,7 @@ | |||
| 1510 | [scpc, rsyncc]: Remove methods. | 1636 | [scpc, rsyncc]: Remove methods. |
| 1511 | (top): Remove completion functions for "scpc", "rsyncc", "ssh1_old" | 1637 | (top): Remove completion functions for "scpc", "rsyncc", "ssh1_old" |
| 1512 | and "ssh2_old". | 1638 | and "ssh2_old". |
| 1513 | (tramp-do-copy-or-rename-file-out-of-band): Change trace level. | 1639 | (tramp-do-copy-or-rename-file-out-of-band): Change trace level. |
| 1514 | (tramp-maybe-open-connection): Reuse tmpfile for ControlPath. | 1640 | (tramp-maybe-open-connection): Reuse tmpfile for ControlPath. |
| 1515 | 1641 | ||
| 1516 | 2013-02-13 Stefan Monnier <monnier@iro.umontreal.ca> | 1642 | 2013-02-13 Stefan Monnier <monnier@iro.umontreal.ca> |
| @@ -1519,7 +1645,7 @@ | |||
| 1519 | 1645 | ||
| 1520 | 2013-02-13 Jambunathan K <kjambunathan@gmail.com> | 1646 | 2013-02-13 Jambunathan K <kjambunathan@gmail.com> |
| 1521 | 1647 | ||
| 1522 | * icomplete.el (icomplete-hide-common-prefix): New user option. | 1648 | * icomplete.el (icomplete-hide-common-prefix): New user option. |
| 1523 | (icomplete-first-match): New face. | 1649 | (icomplete-first-match): New face. |
| 1524 | (icomplete-completions): Correct handling of "complete but not | 1650 | (icomplete-completions): Correct handling of "complete but not |
| 1525 | unique" (Bug#12638). | 1651 | unique" (Bug#12638). |
| @@ -1802,7 +1928,7 @@ | |||
| 1802 | instead passing extra parameter HERE to several functions. | 1928 | instead passing extra parameter HERE to several functions. |
| 1803 | Remove 'BOD strategy. | 1929 | Remove 'BOD strategy. |
| 1804 | 1930 | ||
| 1805 | 2013-02-06 Nicolas Richard <theonewiththeevillook@yahoo.fr> (tiny change) | 1931 | 2013-02-06 Nicolas Richard <theonewiththeevillook@yahoo.fr> (tiny change) |
| 1806 | 1932 | ||
| 1807 | * emacs-lisp/package.el (describe-package-1): Tell what archive is | 1933 | * emacs-lisp/package.el (describe-package-1): Tell what archive is |
| 1808 | used to install the package. | 1934 | used to install the package. |
| @@ -2194,7 +2320,7 @@ | |||
| 2194 | 2320 | ||
| 2195 | * xml.el (xml-entity-or-char-ref-re): Fix regexp. | 2321 | * xml.el (xml-entity-or-char-ref-re): Fix regexp. |
| 2196 | 2322 | ||
| 2197 | 2013-01-24 Aaron Ecay <aaronecay@gmail.com> (tiny change) | 2323 | 2013-01-24 Aaron Ecay <aaronecay@gmail.com> (tiny change) |
| 2198 | 2324 | ||
| 2199 | * paren.el (show-paren-function): Make sure to set 'priority and | 2325 | * paren.el (show-paren-function): Make sure to set 'priority and |
| 2200 | 'face only if the overlay does exist. | 2326 | 'face only if the overlay does exist. |
| @@ -2354,7 +2480,7 @@ | |||
| 2354 | 2480 | ||
| 2355 | 2013-01-15 Michael R. Mauger <mmaug@yahoo.com> | 2481 | 2013-01-15 Michael R. Mauger <mmaug@yahoo.com> |
| 2356 | 2482 | ||
| 2357 | * progmodes/sql.el: (sql-imenu-generic-expression): | 2483 | * progmodes/sql.el (sql-imenu-generic-expression): |
| 2358 | (sql-mode-font-lock-object-name): Match schema qualified names. | 2484 | (sql-mode-font-lock-object-name): Match schema qualified names. |
| 2359 | (sql-connect): Use string keys. | 2485 | (sql-connect): Use string keys. |
| 2360 | (sql-product-interactive): Wait for interpreter prompt. | 2486 | (sql-product-interactive): Wait for interpreter prompt. |
| @@ -2973,7 +3099,7 @@ | |||
| 2973 | * calc/calc-forms.el (math-parse-date): Try using | 3099 | * calc/calc-forms.el (math-parse-date): Try using |
| 2974 | `math-parse-iso-date' when it looks like it might be needed. | 3100 | `math-parse-iso-date' when it looks like it might be needed. |
| 2975 | Allow times of 24:00. | 3101 | Allow times of 24:00. |
| 2976 | (math-parse-date-validate, math-parse-iso-date-validate): Allow times | 3102 | (math-parse-date-validate, math-parse-iso-date-validate): Allow times |
| 2977 | of 24:00. | 3103 | of 24:00. |
| 2978 | 3104 | ||
| 2979 | 2012-12-30 Glenn Morris <rgm@gnu.org> | 3105 | 2012-12-30 Glenn Morris <rgm@gnu.org> |
| @@ -3136,7 +3262,7 @@ | |||
| 3136 | (tramp-adb-get-toolbox): New defun. Check for remote shell | 3262 | (tramp-adb-get-toolbox): New defun. Check for remote shell |
| 3137 | implementation (BusyBox or Toolbox). | 3263 | implementation (BusyBox or Toolbox). |
| 3138 | 3264 | ||
| 3139 | 2012-12-24 Constantin Kulikov <zxnotdead@gmail.com> (tiny change) | 3265 | 2012-12-24 Constantin Kulikov <zxnotdead@gmail.com> (tiny change) |
| 3140 | 3266 | ||
| 3141 | * startup.el (initial-buffer-choice): Allow function as value | 3267 | * startup.el (initial-buffer-choice): Allow function as value |
| 3142 | (Bug#13251). | 3268 | (Bug#13251). |
| @@ -3283,7 +3409,7 @@ | |||
| 3283 | Add `file-acl' and `set-file-acl' handlers. | 3409 | Add `file-acl' and `set-file-acl' handlers. |
| 3284 | (tramp-smb-handle-copy-file): Handle PRESERVE-EXTENDED-ATTRIBUTES. | 3410 | (tramp-smb-handle-copy-file): Handle PRESERVE-EXTENDED-ATTRIBUTES. |
| 3285 | 3411 | ||
| 3286 | 2012-12-17 Kelly Dean <kellydeanch@yahoo.com> (tiny change) | 3412 | 2012-12-17 Kelly Dean <kellydeanch@yahoo.com> (tiny change) |
| 3287 | 3413 | ||
| 3288 | * help-macro.el (make-help-screen): Instead of switch-to-buffer | 3414 | * help-macro.el (make-help-screen): Instead of switch-to-buffer |
| 3289 | use pop-to-buffer with NORECORD argument t. As buffer name, use | 3415 | use pop-to-buffer with NORECORD argument t. As buffer name, use |
| @@ -3484,7 +3610,7 @@ | |||
| 3484 | 3610 | ||
| 3485 | 2012-12-11 Jay Belanger <jay.p.belanger@gmail.com> | 3611 | 2012-12-11 Jay Belanger <jay.p.belanger@gmail.com> |
| 3486 | 3612 | ||
| 3487 | * calc/calc.el (calc-standard-date-formats): Add more date | 3613 | * calc/calc.el (calc-standard-date-formats): Add more date |
| 3488 | formats. | 3614 | formats. |
| 3489 | * calc/calc-forms.el (math-parse-iso-date): New function. | 3615 | * calc/calc-forms.el (math-parse-iso-date): New function. |
| 3490 | (math-parse-date): Use `math-parse-iso-date' when appropriate. | 3616 | (math-parse-date): Use `math-parse-iso-date' when appropriate. |
| @@ -3518,7 +3644,7 @@ | |||
| 3518 | 3644 | ||
| 3519 | * subr.el (inotify-event-p, inotify-handle-event): New functions. | 3645 | * subr.el (inotify-event-p, inotify-handle-event): New functions. |
| 3520 | 3646 | ||
| 3521 | 2012-12-10 Dani Moncayo <dmoncayo@gmail.com> | 3647 | 2012-12-10 Dani Moncayo <dmoncayo@gmail.com> |
| 3522 | 3648 | ||
| 3523 | * simple.el (just-one-space): Doc fix. | 3649 | * simple.el (just-one-space): Doc fix. |
| 3524 | 3650 | ||
| @@ -4356,7 +4482,7 @@ | |||
| 4356 | 4482 | ||
| 4357 | 2012-11-19 Jay Belanger <jay.p.belanger@gmail.com> | 4483 | 2012-11-19 Jay Belanger <jay.p.belanger@gmail.com> |
| 4358 | 4484 | ||
| 4359 | * calc/calc-forms.el (math-leap-year-p): Fix formula for negative | 4485 | * calc/calc-forms.el (math-leap-year-p): Fix formula for negative |
| 4360 | year numbers. | 4486 | year numbers. |
| 4361 | (math-date-to-julian-dt): Adjust the initial approximation for the | 4487 | (math-date-to-julian-dt): Adjust the initial approximation for the |
| 4362 | year to deal with the new definition of the DATE. | 4488 | year to deal with the new definition of the DATE. |
| @@ -5441,7 +5567,7 @@ | |||
| 5441 | Recover input meta mode when the new coding system doesn not use 8-bit. | 5567 | Recover input meta mode when the new coding system doesn not use 8-bit. |
| 5442 | Supply TERMINAL arg to set-input-meta-mode. | 5568 | Supply TERMINAL arg to set-input-meta-mode. |
| 5443 | 5569 | ||
| 5444 | 2012-10-17 Michael Heerdegen <michael_heerdegen@web.de> | 5570 | 2012-10-17 Michael Heerdegen <michael_heerdegen@web.de> |
| 5445 | 5571 | ||
| 5446 | * wdired.el (wdired-old-marks): New variable. | 5572 | * wdired.el (wdired-old-marks): New variable. |
| 5447 | (wdired-change-to-wdired-mode): Locally set wdired-old-marks. | 5573 | (wdired-change-to-wdired-mode): Locally set wdired-old-marks. |
diff --git a/lisp/abbrev.el b/lisp/abbrev.el index bd09653103f..cc7ebe489f7 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el | |||
| @@ -669,6 +669,26 @@ either a single abbrev table or a list of abbrev tables." | |||
| 669 | tables)))) | 669 | tables)))) |
| 670 | 670 | ||
| 671 | 671 | ||
| 672 | (defun abbrev--symbol (abbrev table) | ||
| 673 | "Return the symbol representing abbrev named ABBREV in TABLE. | ||
| 674 | This symbol's name is ABBREV, but it is not the canonical symbol of that name; | ||
| 675 | it is interned in the abbrev-table TABLE rather than the normal obarray. | ||
| 676 | The value is nil if that abbrev is not defined." | ||
| 677 | (let* ((case-fold (not (abbrev-table-get table :case-fixed))) | ||
| 678 | ;; In case the table doesn't set :case-fixed but some of the | ||
| 679 | ;; abbrevs do, we have to be careful. | ||
| 680 | (sym | ||
| 681 | ;; First try without case-folding. | ||
| 682 | (or (intern-soft abbrev table) | ||
| 683 | (when case-fold | ||
| 684 | ;; We didn't find any abbrev, try case-folding. | ||
| 685 | (let ((sym (intern-soft (downcase abbrev) table))) | ||
| 686 | ;; Only use it if it doesn't require :case-fixed. | ||
| 687 | (and sym (not (abbrev-get sym :case-fixed)) | ||
| 688 | sym)))))) | ||
| 689 | (if (symbol-value sym) | ||
| 690 | sym))) | ||
| 691 | |||
| 672 | (defun abbrev-symbol (abbrev &optional table) | 692 | (defun abbrev-symbol (abbrev &optional table) |
| 673 | "Return the symbol representing abbrev named ABBREV. | 693 | "Return the symbol representing abbrev named ABBREV. |
| 674 | This symbol's name is ABBREV, but it is not the canonical symbol of that name; | 694 | This symbol's name is ABBREV, but it is not the canonical symbol of that name; |
| @@ -678,23 +698,11 @@ Optional second arg TABLE is abbrev table to look it up in. | |||
| 678 | The default is to try buffer's mode-specific abbrev table, then global table." | 698 | The default is to try buffer's mode-specific abbrev table, then global table." |
| 679 | (let ((tables (abbrev--active-tables table)) | 699 | (let ((tables (abbrev--active-tables table)) |
| 680 | sym) | 700 | sym) |
| 681 | (while (and tables (not (symbol-value sym))) | 701 | (while (and tables (not sym)) |
| 682 | (let* ((table (pop tables)) | 702 | (let* ((table (pop tables))) |
| 683 | (case-fold (not (abbrev-table-get table :case-fixed)))) | ||
| 684 | (setq tables (append (abbrev-table-get table :parents) tables)) | 703 | (setq tables (append (abbrev-table-get table :parents) tables)) |
| 685 | ;; In case the table doesn't set :case-fixed but some of the | 704 | (setq sym (abbrev--symbol abbrev table)))) |
| 686 | ;; abbrevs do, we have to be careful. | 705 | sym)) |
| 687 | (setq sym | ||
| 688 | ;; First try without case-folding. | ||
| 689 | (or (intern-soft abbrev table) | ||
| 690 | (when case-fold | ||
| 691 | ;; We didn't find any abbrev, try case-folding. | ||
| 692 | (let ((sym (intern-soft (downcase abbrev) table))) | ||
| 693 | ;; Only use it if it doesn't require :case-fixed. | ||
| 694 | (and sym (not (abbrev-get sym :case-fixed)) | ||
| 695 | sym))))))) | ||
| 696 | (if (symbol-value sym) | ||
| 697 | sym))) | ||
| 698 | 706 | ||
| 699 | 707 | ||
| 700 | (defun abbrev-expansion (abbrev &optional table) | 708 | (defun abbrev-expansion (abbrev &optional table) |
| @@ -748,7 +756,7 @@ then ABBREV is looked up in that table only." | |||
| 748 | (setq start (match-beginning 1)) | 756 | (setq start (match-beginning 1)) |
| 749 | (setq end (match-end 1))))) | 757 | (setq end (match-end 1))))) |
| 750 | (setq name (buffer-substring start end)) | 758 | (setq name (buffer-substring start end)) |
| 751 | (let ((abbrev (abbrev-symbol name table))) | 759 | (let ((abbrev (abbrev--symbol name table))) |
| 752 | (when abbrev | 760 | (when abbrev |
| 753 | (setq enable-fun (abbrev-get abbrev :enable-function)) | 761 | (setq enable-fun (abbrev-get abbrev :enable-function)) |
| 754 | (and (or (not enable-fun) (funcall enable-fun)) | 762 | (and (or (not enable-fun) (funcall enable-fun)) |
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 6217f5d0a3f..b1f399d5b73 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el | |||
| @@ -881,8 +881,8 @@ Should be invoked when the cached images aren't up-to-date." | |||
| 881 | (defun doc-view-start-process (name program args callback) | 881 | (defun doc-view-start-process (name program args callback) |
| 882 | ;; Make sure the process is started in an existing directory, (rather than | 882 | ;; Make sure the process is started in an existing directory, (rather than |
| 883 | ;; some file-name-handler-managed dir, for example). | 883 | ;; some file-name-handler-managed dir, for example). |
| 884 | (let* ((default-directory (if (file-readable-p default-directory) | 884 | (let* ((default-directory (or (unhandled-file-name-directory |
| 885 | default-directory | 885 | default-directory) |
| 886 | (expand-file-name "~/"))) | 886 | (expand-file-name "~/"))) |
| 887 | (proc (apply 'start-process name doc-view-conversion-buffer | 887 | (proc (apply 'start-process name doc-view-conversion-buffer |
| 888 | program args))) | 888 | program args))) |
diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el index 0632c7d2fc0..6c09ddfb8cf 100644 --- a/lisp/emacs-lisp/nadvice.el +++ b/lisp/emacs-lisp/nadvice.el | |||
| @@ -158,11 +158,12 @@ WHERE is a symbol to select an entry in `advice--where-alist'." | |||
| 158 | (advice--make-1 (nth 1 desc) (nth 2 desc) | 158 | (advice--make-1 (nth 1 desc) (nth 2 desc) |
| 159 | function main props))) | 159 | function main props))) |
| 160 | 160 | ||
| 161 | (defun advice--member-p (function definition) | 161 | (defun advice--member-p (function name definition) |
| 162 | (let ((found nil)) | 162 | (let ((found nil)) |
| 163 | (while (and (not found) (advice--p definition)) | 163 | (while (and (not found) (advice--p definition)) |
| 164 | (if (or (equal function (advice--car definition)) | 164 | (if (or (equal function (advice--car definition)) |
| 165 | (equal function (cdr (assq 'name (advice--props definition))))) | 165 | (when name |
| 166 | (equal name (cdr (assq 'name (advice--props definition)))))) | ||
| 166 | (setq found t) | 167 | (setq found t) |
| 167 | (setq definition (advice--cdr definition)))) | 168 | (setq definition (advice--cdr definition)))) |
| 168 | found)) | 169 | found)) |
| @@ -235,9 +236,8 @@ PROPS is an alist of additional properties, among which the following have | |||
| 235 | a special meaning: | 236 | a special meaning: |
| 236 | - `name': a string or symbol. It can be used to refer to this piece of advice. | 237 | - `name': a string or symbol. It can be used to refer to this piece of advice. |
| 237 | 238 | ||
| 238 | PLACE cannot be a simple variable. Instead it should either be | 239 | If PLACE is a simple variable, only its global value will be affected. |
| 239 | \(default-value 'VAR) or (local 'VAR) depending on whether FUNCTION | 240 | Use (local 'VAR) if you want to apply FUNCTION to VAR buffer-locally. |
| 240 | should be applied to VAR buffer-locally or globally. | ||
| 241 | 241 | ||
| 242 | If one of FUNCTION or OLDFUN is interactive, then the resulting function | 242 | If one of FUNCTION or OLDFUN is interactive, then the resulting function |
| 243 | is also interactive. There are 3 cases: | 243 | is also interactive. There are 3 cases: |
| @@ -250,12 +250,13 @@ is also interactive. There are 3 cases: | |||
| 250 | (cond ((eq 'local (car-safe place)) | 250 | (cond ((eq 'local (car-safe place)) |
| 251 | (setq place `(advice--buffer-local ,@(cdr place)))) | 251 | (setq place `(advice--buffer-local ,@(cdr place)))) |
| 252 | ((symbolp place) | 252 | ((symbolp place) |
| 253 | (error "Use (default-value '%S) or (local '%S)" place place))) | 253 | (setq place `(default-value ',place)))) |
| 254 | `(advice--add-function ,where (gv-ref ,place) ,function ,props)) | 254 | `(advice--add-function ,where (gv-ref ,place) ,function ,props)) |
| 255 | 255 | ||
| 256 | ;;;###autoload | 256 | ;;;###autoload |
| 257 | (defun advice--add-function (where ref function props) | 257 | (defun advice--add-function (where ref function props) |
| 258 | (unless (advice--member-p function (gv-deref ref)) | 258 | (unless (advice--member-p function (cdr (assq 'name props)) |
| 259 | (gv-deref ref)) | ||
| 259 | (setf (gv-deref ref) | 260 | (setf (gv-deref ref) |
| 260 | (advice--make where function (gv-deref ref) props)))) | 261 | (advice--make where function (gv-deref ref) props)))) |
| 261 | 262 | ||
| @@ -396,7 +397,7 @@ of the piece of advice." | |||
| 396 | "Return non-nil if ADVICE has been added to FUNCTION-NAME. | 397 | "Return non-nil if ADVICE has been added to FUNCTION-NAME. |
| 397 | Instead of ADVICE being the actual function, it can also be the `name' | 398 | Instead of ADVICE being the actual function, it can also be the `name' |
| 398 | of the piece of advice." | 399 | of the piece of advice." |
| 399 | (advice--member-p advice | 400 | (advice--member-p advice advice |
| 400 | (or (get function-name 'advice--pending) | 401 | (or (get function-name 'advice--pending) |
| 401 | (advice--strip-macro | 402 | (advice--strip-macro |
| 402 | (if (fboundp function-name) | 403 | (if (fboundp function-name) |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index cc7897accb6..144b6482b9d 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2013-04-16 David Edmondson <dme@dme.org> | ||
| 2 | |||
| 3 | Support <img src="data:...">. | ||
| 4 | |||
| 5 | * shr.el (shr-image-from-data): New function. | ||
| 6 | (shr-tag-img): Use it. | ||
| 7 | |||
| 1 | 2013-04-14 Andrew Cohen <cohen@bu.edu> | 8 | 2013-04-14 Andrew Cohen <cohen@bu.edu> |
| 2 | 9 | ||
| 3 | * nnir.el (nnir-request-set-mark): Make sure we are in the right | 10 | * nnir.el (nnir-request-set-mark): Make sure we are in the right |
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index 5df5297ba8a..293ba2445e9 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el | |||
| @@ -593,6 +593,17 @@ size, and full-buffer size." | |||
| 593 | (put-text-property start (point) type value)))))))))) | 593 | (put-text-property start (point) type value)))))))))) |
| 594 | (kill-buffer image-buffer))) | 594 | (kill-buffer image-buffer))) |
| 595 | 595 | ||
| 596 | (defun shr-image-from-data (data) | ||
| 597 | "Return an image from the data: URI content DATA." | ||
| 598 | (when (string-match | ||
| 599 | "\\(\\([^/;,]+\\(/[^;,]+\\)?\\)\\(;[^;,]+\\)*\\)?,\\(.*\\)" | ||
| 600 | data) | ||
| 601 | (let ((param (match-string 4 data)) | ||
| 602 | (payload (url-unhex-string (match-string 5 data)))) | ||
| 603 | (when (string-match "^.*\\(;[ \t]*base64\\)$" param) | ||
| 604 | (setq payload (base64-decode-string payload))) | ||
| 605 | payload))) | ||
| 606 | |||
| 596 | (defun shr-put-image (data alt &optional flags) | 607 | (defun shr-put-image (data alt &optional flags) |
| 597 | "Put image DATA with a string ALT. Return image." | 608 | "Put image DATA with a string ALT. Return image." |
| 598 | (if (display-graphic-p) | 609 | (if (display-graphic-p) |
| @@ -983,6 +994,12 @@ ones, in case fg and bg are nil." | |||
| 983 | ;; Ignore zero-sized or single-pixel images. | 994 | ;; Ignore zero-sized or single-pixel images. |
| 984 | ) | 995 | ) |
| 985 | ((and (not shr-inhibit-images) | 996 | ((and (not shr-inhibit-images) |
| 997 | (string-match "\\`data:" url)) | ||
| 998 | (let ((image (shr-image-from-data (substring url (match-end 0))))) | ||
| 999 | (if image | ||
| 1000 | (funcall shr-put-image-function image alt) | ||
| 1001 | (insert alt)))) | ||
| 1002 | ((and (not shr-inhibit-images) | ||
| 986 | (string-match "\\`cid:" url)) | 1003 | (string-match "\\`cid:" url)) |
| 987 | (let ((url (substring url (match-end 0))) | 1004 | (let ((url (substring url (match-end 0))) |
| 988 | image) | 1005 | image) |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 016b16d0740..06ac7a91bea 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -525,7 +525,7 @@ for use at QPOS." | |||
| 525 | (eq t (compare-strings s1 nil nil s2 nil nil 'ignore-case))) | 525 | (eq t (compare-strings s1 nil nil s2 nil nil 'ignore-case))) |
| 526 | 526 | ||
| 527 | (defun completion--twq-all (string ustring completions boundary | 527 | (defun completion--twq-all (string ustring completions boundary |
| 528 | unquote requote) | 528 | _unquote requote) |
| 529 | (when completions | 529 | (when completions |
| 530 | (pcase-let* | 530 | (pcase-let* |
| 531 | ((prefix | 531 | ((prefix |
| @@ -1043,7 +1043,8 @@ scroll the window of possible completions." | |||
| 1043 | (cond | 1043 | (cond |
| 1044 | ;; If there's a fresh completion window with a live buffer, | 1044 | ;; If there's a fresh completion window with a live buffer, |
| 1045 | ;; and this command is repeated, scroll that window. | 1045 | ;; and this command is repeated, scroll that window. |
| 1046 | ((window-live-p minibuffer-scroll-window) | 1046 | ((and (window-live-p minibuffer-scroll-window) |
| 1047 | (eq t (frame-visible-p (window-frame minibuffer-scroll-window)))) | ||
| 1047 | (let ((window minibuffer-scroll-window)) | 1048 | (let ((window minibuffer-scroll-window)) |
| 1048 | (with-current-buffer (window-buffer window) | 1049 | (with-current-buffer (window-buffer window) |
| 1049 | (if (pos-visible-in-window-p (point-max) window) | 1050 | (if (pos-visible-in-window-p (point-max) window) |
| @@ -1140,6 +1141,7 @@ scroll the window of possible completions." | |||
| 1140 | "Complete the minibuffer to an exact match. | 1141 | "Complete the minibuffer to an exact match. |
| 1141 | Repeated uses step through the possible completions." | 1142 | Repeated uses step through the possible completions." |
| 1142 | (interactive) | 1143 | (interactive) |
| 1144 | (setq minibuffer-scroll-window nil) | ||
| 1143 | ;; FIXME: Need to deal with the extra-size issue here as well. | 1145 | ;; FIXME: Need to deal with the extra-size issue here as well. |
| 1144 | ;; FIXME: ~/src/emacs/t<M-TAB>/lisp/minibuffer.el completes to | 1146 | ;; FIXME: ~/src/emacs/t<M-TAB>/lisp/minibuffer.el completes to |
| 1145 | ;; ~/src/emacs/trunk/ and throws away lisp/minibuffer.el. | 1147 | ;; ~/src/emacs/trunk/ and throws away lisp/minibuffer.el. |
| @@ -1162,6 +1164,7 @@ Repeated uses step through the possible completions." | |||
| 1162 | (completion--done (buffer-substring-no-properties start (point)) 'sole) | 1164 | (completion--done (buffer-substring-no-properties start (point)) 'sole) |
| 1163 | ;; Set cycling after modifying the buffer since the flush hook resets it. | 1165 | ;; Set cycling after modifying the buffer since the flush hook resets it. |
| 1164 | (setq completion-cycling t) | 1166 | (setq completion-cycling t) |
| 1167 | (setq this-command 'completion-at-point) ;For minibuffer-complete. | ||
| 1165 | ;; If completing file names, (car all) may be a directory, so we'd now | 1168 | ;; If completing file names, (car all) may be a directory, so we'd now |
| 1166 | ;; have a new set of possible completions and might want to reset | 1169 | ;; have a new set of possible completions and might want to reset |
| 1167 | ;; completion-all-sorted-completions to nil, but we prefer not to, | 1170 | ;; completion-all-sorted-completions to nil, but we prefer not to, |
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 2b8c7ae145b..f6efc56023a 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el | |||
| @@ -4437,16 +4437,18 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") | |||
| 4437 | ;;; Define ways of getting at unmodified Emacs primitives, | 4437 | ;;; Define ways of getting at unmodified Emacs primitives, |
| 4438 | ;;; turning off our handler. | 4438 | ;;; turning off our handler. |
| 4439 | 4439 | ||
| 4440 | ;(defun ange-ftp-run-real-handler (operation args) | 4440 | (defun ange-ftp-run-real-handler-orig (operation args) |
| 4441 | ; (let ((inhibit-file-name-handlers | 4441 | (let ((inhibit-file-name-handlers |
| 4442 | ; (cons 'ange-ftp-hook-function | 4442 | (cons 'ange-ftp-hook-function |
| 4443 | ; (cons 'ange-ftp-completion-hook-function | 4443 | (cons 'ange-ftp-completion-hook-function |
| 4444 | ; (and (eq inhibit-file-name-operation operation) | 4444 | (and (eq inhibit-file-name-operation operation) |
| 4445 | ; inhibit-file-name-handlers)))) | 4445 | inhibit-file-name-handlers)))) |
| 4446 | ; (inhibit-file-name-operation operation)) | 4446 | (inhibit-file-name-operation operation)) |
| 4447 | ; (apply operation args))) | 4447 | (apply operation args))) |
| 4448 | 4448 | ||
| 4449 | (defalias 'ange-ftp-run-real-handler 'tramp-run-real-handler) | 4449 | (defalias 'ange-ftp-run-real-handler |
| 4450 | (if (fboundp 'tramp-run-real-handler) | ||
| 4451 | 'tramp-run-real-handler 'ange-ftp-run-real-handler-orig)) | ||
| 4450 | 4452 | ||
| 4451 | (defun ange-ftp-real-file-name-directory (&rest args) | 4453 | (defun ange-ftp-real-file-name-directory (&rest args) |
| 4452 | (ange-ftp-run-real-handler 'file-name-directory args)) | 4454 | (ange-ftp-run-real-handler 'file-name-directory args)) |
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index ba9c42e4c89..af52ad53aad 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el | |||
| @@ -812,8 +812,8 @@ Assumed to not contain any submatches or \\| operators." | |||
| 812 | (c-lang-defconst c-anchored-cpp-prefix | 812 | (c-lang-defconst c-anchored-cpp-prefix |
| 813 | "Regexp matching the prefix of a cpp directive anchored to BOL, | 813 | "Regexp matching the prefix of a cpp directive anchored to BOL, |
| 814 | in the languages that have a macro preprocessor." | 814 | in the languages that have a macro preprocessor." |
| 815 | t (if (c-lang-const c-opt-cpp-prefix) | 815 | t "^\\s *\\(#\\)\\s *" |
| 816 | (concat "^" (c-lang-const c-opt-cpp-prefix)))) | 816 | (java awk) nil) |
| 817 | (c-lang-defvar c-anchored-cpp-prefix (c-lang-const c-anchored-cpp-prefix)) | 817 | (c-lang-defvar c-anchored-cpp-prefix (c-lang-const c-anchored-cpp-prefix)) |
| 818 | 818 | ||
| 819 | (c-lang-defconst c-opt-cpp-start | 819 | (c-lang-defconst c-opt-cpp-start |
diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el index a06eaf566d8..067a4df13dd 100644 --- a/lisp/progmodes/cc-menus.el +++ b/lisp/progmodes/cc-menus.el | |||
| @@ -161,49 +161,132 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") | |||
| 161 | cc-imenu-c++-generic-expression | 161 | cc-imenu-c++-generic-expression |
| 162 | "Imenu generic expression for C mode. See `imenu-generic-expression'.") | 162 | "Imenu generic expression for C mode. See `imenu-generic-expression'.") |
| 163 | 163 | ||
| 164 | (defvar cc-imenu-java-generic-expression | 164 | |
| 165 | ;; Auxiliary regexps for Java try to match their trailing whitespace where | ||
| 166 | ;; appropriate, but _not_ starting whitespace. | ||
| 167 | |||
| 168 | (defconst cc-imenu-java-ellipsis-regexp | ||
| 169 | (concat | ||
| 170 | "\\.\\{3\\}" | ||
| 171 | "[ \t\n\r]*")) | ||
| 172 | |||
| 173 | (defun cc-imenu-java-build-type-args-regex (depth) | ||
| 174 | "Builds regexp for type arguments list with DEPTH allowed | ||
| 175 | nested angle brackets constructs." | ||
| 176 | (if (> depth 0) | ||
| 177 | (concat "<" | ||
| 178 | "[][.," c-alnum "_? \t\n\r]+" | ||
| 179 | (if (> depth 1) | ||
| 180 | "\\(") | ||
| 181 | (cc-imenu-java-build-type-args-regex (1- depth)) | ||
| 182 | (if (> depth 1) | ||
| 183 | (concat "[][.," c-alnum "_? \t\n\r]*" | ||
| 184 | "\\)*")) | ||
| 185 | ">"))) | ||
| 186 | |||
| 187 | (defconst cc-imenu-java-type-spec-regexp | ||
| 188 | (concat | ||
| 189 | ;; zero or more identifiers followed by a dot | ||
| 190 | "\\(" | ||
| 191 | "[" c-alpha "_][" c-alnum "_]*\\." | ||
| 192 | "\\)*" | ||
| 193 | ;; a single mandatory identifier without a dot | ||
| 194 | "[" c-alpha "_][" c-alnum "_]*" | ||
| 195 | ;; then choice: | ||
| 196 | "\\(" | ||
| 197 | ;; (option 1) type arguments list which _may_ be followed with brackets | ||
| 198 | ;; and/or spaces, then optional variable arity | ||
| 199 | "[ \t\n\r]*" | ||
| 200 | (cc-imenu-java-build-type-args-regex 3) | ||
| 201 | "[][ \t\n\r]*" | ||
| 202 | "\\(" cc-imenu-java-ellipsis-regexp "\\)?" | ||
| 203 | "\\|" | ||
| 204 | ;; (option 2) just brackets and/or spaces (there should be at least one), | ||
| 205 | ;; then optional variable arity | ||
| 206 | "[][ \t\n\r]+" | ||
| 207 | "\\(" cc-imenu-java-ellipsis-regexp "\\)?" | ||
| 208 | "\\|" | ||
| 209 | ;; (option 3) just variable arity | ||
| 210 | cc-imenu-java-ellipsis-regexp | ||
| 211 | "\\)")) | ||
| 212 | |||
| 213 | (defconst cc-imenu-java-comment-regexp | ||
| 214 | (concat | ||
| 215 | "/" | ||
| 216 | "\\(" | ||
| 217 | ;; a traditional comment | ||
| 218 | "\\*" | ||
| 219 | "\\(" | ||
| 220 | "[^*]" | ||
| 221 | "\\|" | ||
| 222 | "\\*+[^/*]" | ||
| 223 | "\\)*" | ||
| 224 | "\\*+/" | ||
| 225 | "\\|" | ||
| 226 | ;; an end-of-line comment | ||
| 227 | "/[^\n\r]*[\n\r]" | ||
| 228 | "\\)" | ||
| 229 | "[ \t\n\r]*" | ||
| 230 | )) | ||
| 231 | |||
| 232 | ;; Comments are allowed before the argument, after any of the | ||
| 233 | ;; modifiers and after the identifier. | ||
| 234 | (defconst cc-imenu-java-method-arg-regexp | ||
| 235 | (concat | ||
| 236 | "\\(" cc-imenu-java-comment-regexp "\\)*" | ||
| 237 | ;; optional modifiers | ||
| 238 | "\\(" | ||
| 239 | ;; a modifier is either an annotation or "final" | ||
| 240 | "\\(" | ||
| 241 | "@[" c-alpha "_]" | ||
| 242 | "[" c-alnum "._]*" | ||
| 243 | ;; TODO support element-value pairs! | ||
| 244 | "\\|" | ||
| 245 | "final" | ||
| 246 | "\\)" | ||
| 247 | ;; a modifier ends with comments and/or ws | ||
| 248 | "\\(" | ||
| 249 | "\\(" cc-imenu-java-comment-regexp "\\)+" | ||
| 250 | "\\|" | ||
| 251 | "[ \t\n\r]+" | ||
| 252 | "\\(" cc-imenu-java-comment-regexp "\\)*" | ||
| 253 | "\\)" | ||
| 254 | "\\)*" | ||
| 255 | ;; type spec | ||
| 256 | cc-imenu-java-type-spec-regexp | ||
| 257 | ;; identifier | ||
| 258 | "[" c-alpha "_]" | ||
| 259 | "[" c-alnum "_]*" | ||
| 260 | ;; optional comments and/or ws | ||
| 261 | "[ \t\n\r]*" | ||
| 262 | "\\(" cc-imenu-java-comment-regexp "\\)*" | ||
| 263 | )) | ||
| 264 | |||
| 265 | (defconst cc-imenu-java-generic-expression | ||
| 165 | `((nil | 266 | `((nil |
| 166 | ,(concat | 267 | ,(concat |
| 167 | "[" c-alpha "_][\]\[." c-alnum "_<> ]+[ \t\n\r]+" ; type spec | 268 | cc-imenu-java-type-spec-regexp |
| 168 | "\\([" c-alpha "_][" c-alnum "_]*\\)" ; method name | 269 | "\\(" ; method name which gets captured |
| 270 | ; into index | ||
| 271 | "[" c-alpha "_]" | ||
| 272 | "[" c-alnum "_]*" | ||
| 273 | "\\)" | ||
| 169 | "[ \t\n\r]*" | 274 | "[ \t\n\r]*" |
| 170 | ;; An argument list htat is either empty or contains any number | 275 | ;; An argument list that contains zero or more arguments. |
| 171 | ;; of arguments. An argument is any number of annotations | 276 | (concat |
| 172 | ;; followed by a type spec followed by a word. A word is an | 277 | "(" |
| 173 | ;; identifier. A type spec is an identifier, possibly followed | 278 | "[ \t\n\r]*" |
| 174 | ;; by < typespec > possibly followed by []. | 279 | "\\(" |
| 175 | (concat "(" | 280 | "\\(" cc-imenu-java-method-arg-regexp ",[ \t\n\r]*\\)*" |
| 176 | "\\(" | 281 | cc-imenu-java-method-arg-regexp |
| 177 | "[ \t\n\r]*" | 282 | "\\)?" |
| 178 | "\\(" | 283 | ")" |
| 179 | "@" | 284 | "[.,_" c-alnum " \t\n\r]*" ; throws etc. |
| 180 | "[" c-alpha "_]" | 285 | "{" |
| 181 | "[" c-alnum "._]""*" | 286 | )) 7)) |
| 182 | "[ \t\n\r]+" | ||
| 183 | "\\)*" | ||
| 184 | "\\(" | ||
| 185 | "[" c-alpha "_]" | ||
| 186 | "[\]\[" c-alnum "_.]*" | ||
| 187 | "\\(" | ||
| 188 | |||
| 189 | "<" | ||
| 190 | "[ \t\n\r]*" | ||
| 191 | "[\]\[.," c-alnum "_<> \t\n\r]*" | ||
| 192 | ">" | ||
| 193 | "\\)?" | ||
| 194 | "\\(\\[\\]\\)?" | ||
| 195 | "[ \t\n\r]+" | ||
| 196 | "\\)" | ||
| 197 | "[" c-alpha "_]" | ||
| 198 | "[" c-alnum "_]*" | ||
| 199 | "[ \t\n\r,]*" | ||
| 200 | "\\)*" | ||
| 201 | ")" | ||
| 202 | "[.," c-alnum " \t\n\r]*" | ||
| 203 | "{" | ||
| 204 | )) 1)) | ||
| 205 | "Imenu generic expression for Java mode. See `imenu-generic-expression'.") | 287 | "Imenu generic expression for Java mode. See `imenu-generic-expression'.") |
| 206 | 288 | ||
| 289 | |||
| 207 | ;; Internal variables | 290 | ;; Internal variables |
| 208 | (defvar cc-imenu-objc-generic-expression-noreturn-index nil) | 291 | (defvar cc-imenu-objc-generic-expression-noreturn-index nil) |
| 209 | (defvar cc-imenu-objc-generic-expression-general-func-index nil) | 292 | (defvar cc-imenu-objc-generic-expression-general-func-index nil) |
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 3c3a5766582..17e80b8b25b 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -936,7 +936,8 @@ Note that the style variables are always made local to the buffer." | |||
| 936 | 936 | ||
| 937 | ;; Add needed properties to each CPP construct in the region. | 937 | ;; Add needed properties to each CPP construct in the region. |
| 938 | (goto-char c-new-BEG) | 938 | (goto-char c-new-BEG) |
| 939 | (let ((pps-position c-new-BEG) pps-state mbeg) | 939 | (skip-chars-backward " \t") |
| 940 | (let ((pps-position (point)) pps-state mbeg) | ||
| 940 | (while (and (< (point) c-new-END) | 941 | (while (and (< (point) c-new-END) |
| 941 | (search-forward-regexp c-anchored-cpp-prefix c-new-END t)) | 942 | (search-forward-regexp c-anchored-cpp-prefix c-new-END t)) |
| 942 | ;; If we've found a "#" inside a string/comment, ignore it. | 943 | ;; If we've found a "#" inside a string/comment, ignore it. |
| @@ -945,14 +946,12 @@ Note that the style variables are always made local to the buffer." | |||
| 945 | pps-position (point)) | 946 | pps-position (point)) |
| 946 | (unless (or (nth 3 pps-state) ; in a string? | 947 | (unless (or (nth 3 pps-state) ; in a string? |
| 947 | (nth 4 pps-state)) ; in a comment? | 948 | (nth 4 pps-state)) ; in a comment? |
| 948 | (goto-char (match-beginning 0)) | 949 | (goto-char (match-beginning 1)) |
| 949 | (setq mbeg (point)) | 950 | (setq mbeg (point)) |
| 950 | (if (> (c-syntactic-end-of-macro) mbeg) | 951 | (if (> (c-syntactic-end-of-macro) mbeg) |
| 951 | (progn | 952 | (progn |
| 952 | (c-neutralize-CPP-line mbeg (point)) | 953 | (c-neutralize-CPP-line mbeg (point)) |
| 953 | (c-set-cpp-delimiters mbeg (point)) | 954 | (c-set-cpp-delimiters mbeg (point))) |
| 954 | ;(setq pps-position (point)) | ||
| 955 | ) | ||
| 956 | (forward-line)) ; no infinite loop with, e.g., "#//" | 955 | (forward-line)) ; no infinite loop with, e.g., "#//" |
| 957 | ))))) | 956 | ))))) |
| 958 | 957 | ||
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 8ba2822c3a3..f5e1abdd546 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -2149,19 +2149,23 @@ the end of the current result or async record is reached." | |||
| 2149 | ;; Search the data stream for the end of the current record: | 2149 | ;; Search the data stream for the end of the current record: |
| 2150 | (let* ((newline-pos (string-match "\n" gud-marker-acc gdbmi-bnf-offset)) | 2150 | (let* ((newline-pos (string-match "\n" gud-marker-acc gdbmi-bnf-offset)) |
| 2151 | (is-progressive (equal (cdr class-command) 'progressive)) | 2151 | (is-progressive (equal (cdr class-command) 'progressive)) |
| 2152 | (is-complete (not (null newline-pos))) | 2152 | (is-complete (not (null newline-pos))) |
| 2153 | result-str) | 2153 | result-str) |
| 2154 | |||
| 2155 | (when gdbmi-debug-mode | ||
| 2156 | (message "gdbmi-bnf-incomplete-record-result: %s" | ||
| 2157 | (substring gud-marker-acc gdbmi-bnf-offset newline-pos))) | ||
| 2154 | 2158 | ||
| 2155 | ;; Update the gdbmi-bnf-offset only if the current chunk of data can | 2159 | ;; Update the gdbmi-bnf-offset only if the current chunk of data can |
| 2156 | ;; be processed by the class-command handler: | 2160 | ;; be processed by the class-command handler: |
| 2157 | (when (or is-complete is-progressive) | 2161 | (when (or is-complete is-progressive) |
| 2158 | (setq result-str | 2162 | (setq result-str |
| 2159 | (substring gud-marker-acc gdbmi-bnf-offset newline-pos)) | 2163 | (substring gud-marker-acc gdbmi-bnf-offset newline-pos)) |
| 2160 | (setq gdbmi-bnf-offset (+ 1 newline-pos))) | ||
| 2161 | 2164 | ||
| 2162 | (if gdbmi-debug-mode | 2165 | ;; Move gdbmi-bnf-offset past the end of the chunk. |
| 2163 | (message "gdbmi-bnf-incomplete-record-result: %s" | 2166 | (setq gdbmi-bnf-offset (+ gdbmi-bnf-offset (length result-str))) |
| 2164 | (substring gud-marker-acc gdbmi-bnf-offset newline-pos))) | 2167 | (when newline-pos |
| 2168 | (setq gdbmi-bnf-offset (1+ gdbmi-bnf-offset)))) | ||
| 2165 | 2169 | ||
| 2166 | ;; Update the parsing state before invoking the handler in class-command | 2170 | ;; Update the parsing state before invoking the handler in class-command |
| 2167 | ;; to make sure it's not left in an invalid state if the handler was | 2171 | ;; to make sure it's not left in an invalid state if the handler was |
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index 806afe5a537..4683186e603 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el | |||
| @@ -223,22 +223,19 @@ parenthetical grouping.") | |||
| 223 | (define-key map "\C-c]" 'smie-close-block) | 223 | (define-key map "\C-c]" 'smie-close-block) |
| 224 | (define-key map "\C-c/" 'smie-close-block) | 224 | (define-key map "\C-c/" 'smie-close-block) |
| 225 | (define-key map "\C-c\C-f" 'octave-insert-defun) | 225 | (define-key map "\C-c\C-f" 'octave-insert-defun) |
| 226 | ;; FIXME: free C-h so it can do the describe-prefix-bindings. | ||
| 227 | (define-key map "\C-c\C-h" 'info-lookup-symbol) | ||
| 228 | (define-key map "\C-c\C-il" 'octave-send-line) | 226 | (define-key map "\C-c\C-il" 'octave-send-line) |
| 229 | (define-key map "\C-c\C-ib" 'octave-send-block) | 227 | (define-key map "\C-c\C-ib" 'octave-send-block) |
| 230 | (define-key map "\C-c\C-if" 'octave-send-defun) | 228 | (define-key map "\C-c\C-if" 'octave-send-defun) |
| 231 | (define-key map "\C-c\C-ir" 'octave-send-region) | 229 | (define-key map "\C-c\C-ir" 'octave-send-region) |
| 232 | (define-key map "\C-c\C-is" 'octave-show-process-buffer) | 230 | (define-key map "\C-c\C-is" 'octave-show-process-buffer) |
| 233 | (define-key map "\C-c\C-ih" 'octave-hide-process-buffer) | 231 | (define-key map "\C-c\C-iq" 'octave-hide-process-buffer) |
| 234 | (define-key map "\C-c\C-ik" 'octave-kill-process) | 232 | (define-key map "\C-c\C-ik" 'octave-kill-process) |
| 235 | (define-key map "\C-c\C-i\C-l" 'octave-send-line) | 233 | (define-key map "\C-c\C-i\C-l" 'octave-send-line) |
| 236 | (define-key map "\C-c\C-i\C-b" 'octave-send-block) | 234 | (define-key map "\C-c\C-i\C-b" 'octave-send-block) |
| 237 | (define-key map "\C-c\C-i\C-f" 'octave-send-defun) | 235 | (define-key map "\C-c\C-i\C-f" 'octave-send-defun) |
| 238 | (define-key map "\C-c\C-i\C-r" 'octave-send-region) | 236 | (define-key map "\C-c\C-i\C-r" 'octave-send-region) |
| 239 | (define-key map "\C-c\C-i\C-s" 'octave-show-process-buffer) | 237 | (define-key map "\C-c\C-i\C-s" 'octave-show-process-buffer) |
| 240 | ;; FIXME: free C-h so it can do the describe-prefix-bindings. | 238 | (define-key map "\C-c\C-i\C-q" 'octave-hide-process-buffer) |
| 241 | (define-key map "\C-c\C-i\C-h" 'octave-hide-process-buffer) | ||
| 242 | (define-key map "\C-c\C-i\C-k" 'octave-kill-process) | 239 | (define-key map "\C-c\C-i\C-k" 'octave-kill-process) |
| 243 | map) | 240 | map) |
| 244 | "Keymap used in Octave mode.") | 241 | "Keymap used in Octave mode.") |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index d1009534e49..1d7cf02ca5a 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -368,22 +368,24 @@ This variant of `rx' supports common python named REGEXPS." | |||
| 368 | 368 | ||
| 369 | ;;; Font-lock and syntax | 369 | ;;; Font-lock and syntax |
| 370 | 370 | ||
| 371 | (eval-when-compile | ||
| 372 | (defun python-syntax--context-compiler-macro (form type &optional syntax-ppss) | ||
| 373 | (pcase type | ||
| 374 | (`'comment | ||
| 375 | `(let ((ppss (or ,syntax-ppss (syntax-ppss)))) | ||
| 376 | (and (nth 4 ppss) (nth 8 ppss)))) | ||
| 377 | (`'string | ||
| 378 | `(let ((ppss (or ,syntax-ppss (syntax-ppss)))) | ||
| 379 | (and (nth 3 ppss) (nth 8 ppss)))) | ||
| 380 | (`'paren | ||
| 381 | `(nth 1 (or ,syntax-ppss (syntax-ppss)))) | ||
| 382 | (_ form)))) | ||
| 383 | |||
| 371 | (defun python-syntax-context (type &optional syntax-ppss) | 384 | (defun python-syntax-context (type &optional syntax-ppss) |
| 372 | "Return non-nil if point is on TYPE using SYNTAX-PPSS. | 385 | "Return non-nil if point is on TYPE using SYNTAX-PPSS. |
| 373 | TYPE can be `comment', `string' or `paren'. It returns the start | 386 | TYPE can be `comment', `string' or `paren'. It returns the start |
| 374 | character address of the specified TYPE." | 387 | character address of the specified TYPE." |
| 375 | (declare (compiler-macro | 388 | (declare (compiler-macro python-syntax--context-compiler-macro)) |
| 376 | (lambda (form) | ||
| 377 | (pcase type | ||
| 378 | (`'comment | ||
| 379 | `(let ((ppss (or ,syntax-ppss (syntax-ppss)))) | ||
| 380 | (and (nth 4 ppss) (nth 8 ppss)))) | ||
| 381 | (`'string | ||
| 382 | `(let ((ppss (or ,syntax-ppss (syntax-ppss)))) | ||
| 383 | (and (nth 3 ppss) (nth 8 ppss)))) | ||
| 384 | (`'paren | ||
| 385 | `(nth 1 (or ,syntax-ppss (syntax-ppss)))) | ||
| 386 | (_ form))))) | ||
| 387 | (let ((ppss (or syntax-ppss (syntax-ppss)))) | 389 | (let ((ppss (or syntax-ppss (syntax-ppss)))) |
| 388 | (pcase type | 390 | (pcase type |
| 389 | (`comment (and (nth 4 ppss) (nth 8 ppss))) | 391 | (`comment (and (nth 4 ppss) (nth 8 ppss))) |
| @@ -1190,6 +1192,66 @@ Returns nil if point is not in a def or class." | |||
| 1190 | ;; Ensure point moves forward. | 1192 | ;; Ensure point moves forward. |
| 1191 | (and (> beg-pos (point)) (goto-char beg-pos))))) | 1193 | (and (> beg-pos (point)) (goto-char beg-pos))))) |
| 1192 | 1194 | ||
| 1195 | (defun python-nav--syntactically (fn poscompfn &optional pos) | ||
| 1196 | "Move to point using FN ignoring non-code or paren context. | ||
| 1197 | FN must take no arguments and could be used to set match-data. | ||
| 1198 | POSCOMPFN is a two arguments function used to compare current and | ||
| 1199 | previous point after it is moved using FN, this is normally a | ||
| 1200 | less-than or greater-than comparison. Optional argument POS is | ||
| 1201 | internally used in recursive calls and should not be explicitly | ||
| 1202 | passed." | ||
| 1203 | (let* ((newpos | ||
| 1204 | (and (funcall fn) | ||
| 1205 | (save-match-data | ||
| 1206 | (and | ||
| 1207 | (not (python-syntax-context-type)) | ||
| 1208 | (point-marker))))) | ||
| 1209 | (current-match-data (match-data))) | ||
| 1210 | (cond ((or (and (not pos) newpos) | ||
| 1211 | (and pos newpos (funcall poscompfn newpos pos))) | ||
| 1212 | (set-match-data current-match-data) | ||
| 1213 | (point-marker)) | ||
| 1214 | ((and (not pos) (not newpos)) nil) | ||
| 1215 | (t (python-nav--syntactically | ||
| 1216 | fn poscompfn (point-marker)))))) | ||
| 1217 | |||
| 1218 | (defun python-nav--forward-defun (arg) | ||
| 1219 | "Internal implementation of python-nav-{backward,forward}-defun. | ||
| 1220 | Uses ARG to define which function to call, and how many times | ||
| 1221 | repeat it." | ||
| 1222 | (let ((found)) | ||
| 1223 | (while (and (> arg 0) | ||
| 1224 | (setq found | ||
| 1225 | (python-nav--syntactically | ||
| 1226 | (lambda () | ||
| 1227 | (re-search-forward | ||
| 1228 | python-nav-beginning-of-defun-regexp nil t)) | ||
| 1229 | '>))) | ||
| 1230 | (setq arg (1- arg))) | ||
| 1231 | (while (and (< arg 0) | ||
| 1232 | (setq found | ||
| 1233 | (python-nav--syntactically | ||
| 1234 | (lambda () | ||
| 1235 | (re-search-backward | ||
| 1236 | python-nav-beginning-of-defun-regexp nil t)) | ||
| 1237 | '<))) | ||
| 1238 | (setq arg (1+ arg))) | ||
| 1239 | found)) | ||
| 1240 | |||
| 1241 | (defun python-nav-backward-defun (&optional arg) | ||
| 1242 | "Navigate to closer defun backward ARG times. | ||
| 1243 | Unlikely `python-nav-beginning-of-defun' this doesn't care about | ||
| 1244 | nested definitions." | ||
| 1245 | (interactive "^p") | ||
| 1246 | (python-nav--forward-defun (- (or arg 1)))) | ||
| 1247 | |||
| 1248 | (defun python-nav-forward-defun (&optional arg) | ||
| 1249 | "Navigate to closer defun forward ARG times. | ||
| 1250 | Unlikely `python-nav-beginning-of-defun' this doesn't care about | ||
| 1251 | nested definitions." | ||
| 1252 | (interactive "^p") | ||
| 1253 | (python-nav--forward-defun (or arg 1))) | ||
| 1254 | |||
| 1193 | (defun python-nav-beginning-of-statement () | 1255 | (defun python-nav-beginning-of-statement () |
| 1194 | "Move to start of current statement." | 1256 | "Move to start of current statement." |
| 1195 | (interactive "^") | 1257 | (interactive "^") |
| @@ -2654,8 +2716,8 @@ the if condition." | |||
| 2654 | (defvar python-skeleton-available '() | 2716 | (defvar python-skeleton-available '() |
| 2655 | "Internal list of available skeletons.") | 2717 | "Internal list of available skeletons.") |
| 2656 | 2718 | ||
| 2657 | (define-abbrev-table 'python-mode-abbrev-table () | 2719 | (define-abbrev-table 'python-mode-skeleton-abbrev-table () |
| 2658 | "Abbrev table for Python mode." | 2720 | "Abbrev table for Python mode skeletons." |
| 2659 | :case-fixed t | 2721 | :case-fixed t |
| 2660 | ;; Allow / inside abbrevs. | 2722 | ;; Allow / inside abbrevs. |
| 2661 | :regexp "\\(?:^\\|[^/]\\)\\<\\([[:word:]/]+\\)\\W*" | 2723 | :regexp "\\(?:^\\|[^/]\\)\\<\\([[:word:]/]+\\)\\W*" |
| @@ -2668,13 +2730,13 @@ the if condition." | |||
| 2668 | (defmacro python-skeleton-define (name doc &rest skel) | 2730 | (defmacro python-skeleton-define (name doc &rest skel) |
| 2669 | "Define a `python-mode' skeleton using NAME DOC and SKEL. | 2731 | "Define a `python-mode' skeleton using NAME DOC and SKEL. |
| 2670 | The skeleton will be bound to python-skeleton-NAME and will | 2732 | The skeleton will be bound to python-skeleton-NAME and will |
| 2671 | be added to `python-mode-abbrev-table'." | 2733 | be added to `python-mode-skeleton-abbrev-table'." |
| 2672 | (declare (indent 2)) | 2734 | (declare (indent 2)) |
| 2673 | (let* ((name (symbol-name name)) | 2735 | (let* ((name (symbol-name name)) |
| 2674 | (function-name (intern (concat "python-skeleton-" name)))) | 2736 | (function-name (intern (concat "python-skeleton-" name)))) |
| 2675 | `(progn | 2737 | `(progn |
| 2676 | (define-abbrev python-mode-abbrev-table ,name "" ',function-name | 2738 | (define-abbrev python-mode-skeleton-abbrev-table |
| 2677 | :system t) | 2739 | ,name "" ',function-name :system t) |
| 2678 | (setq python-skeleton-available | 2740 | (setq python-skeleton-available |
| 2679 | (cons ',function-name python-skeleton-available)) | 2741 | (cons ',function-name python-skeleton-available)) |
| 2680 | (define-skeleton ,function-name | 2742 | (define-skeleton ,function-name |
| @@ -2682,6 +2744,10 @@ be added to `python-mode-abbrev-table'." | |||
| 2682 | (format "Insert %s statement." name)) | 2744 | (format "Insert %s statement." name)) |
| 2683 | ,@skel)))) | 2745 | ,@skel)))) |
| 2684 | 2746 | ||
| 2747 | (define-abbrev-table 'python-mode-abbrev-table () | ||
| 2748 | "Abbrev table for Python mode." | ||
| 2749 | :parents (list python-mode-skeleton-abbrev-table)) | ||
| 2750 | |||
| 2685 | (defmacro python-define-auxiliary-skeleton (name doc &optional &rest skel) | 2751 | (defmacro python-define-auxiliary-skeleton (name doc &optional &rest skel) |
| 2686 | "Define a `python-mode' auxiliary skeleton using NAME DOC and SKEL. | 2752 | "Define a `python-mode' auxiliary skeleton using NAME DOC and SKEL. |
| 2687 | The skeleton will be bound to python-skeleton-NAME." | 2753 | The skeleton will be bound to python-skeleton-NAME." |
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 6e471d1aa2a..631badac34c 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -847,22 +847,24 @@ Can be one of `heredoc', `modifier', `expr-qstr', `expr-re'." | |||
| 847 | indent)))) | 847 | indent)))) |
| 848 | 848 | ||
| 849 | (defun ruby-beginning-of-defun (&optional arg) | 849 | (defun ruby-beginning-of-defun (&optional arg) |
| 850 | "Move backward to the beginning of the current top-level defun. | 850 | "Move backward to the beginning of the current defun. |
| 851 | With ARG, move backward multiple defuns. Negative ARG means | 851 | With ARG, move backward multiple defuns. Negative ARG means |
| 852 | move forward." | 852 | move forward." |
| 853 | (interactive "p") | 853 | (interactive "p") |
| 854 | (and (re-search-backward (concat "^\\s *" ruby-defun-beg-re "\\_>") | 854 | (let (case-fold-search) |
| 855 | nil t (or arg 1)) | 855 | (and (re-search-backward (concat "^\\s *" ruby-defun-beg-re "\\_>") |
| 856 | (beginning-of-line))) | 856 | nil t (or arg 1)) |
| 857 | 857 | (beginning-of-line)))) | |
| 858 | (defun ruby-end-of-defun (&optional arg) | 858 | |
| 859 | "Move forward to the end of the current top-level defun. | 859 | (defun ruby-end-of-defun () |
| 860 | With ARG, move forward multiple defuns. Negative ARG means | 860 | "Move point to the end of the current defun. |
| 861 | move backward." | 861 | The defun begins at or after the point. This function is called |
| 862 | by `end-of-defun'." | ||
| 862 | (interactive "p") | 863 | (interactive "p") |
| 863 | (ruby-forward-sexp) | 864 | (ruby-forward-sexp) |
| 864 | (when (looking-back (concat "^\\s *" ruby-block-end-re)) | 865 | (let (case-fold-search) |
| 865 | (forward-line 1))) | 866 | (when (looking-back (concat "^\\s *" ruby-block-end-re)) |
| 867 | (forward-line 1)))) | ||
| 866 | 868 | ||
| 867 | (defun ruby-beginning-of-indent () | 869 | (defun ruby-beginning-of-indent () |
| 868 | "Backtrack to a line which can be used as a reference for | 870 | "Backtrack to a line which can be used as a reference for |
| @@ -881,6 +883,7 @@ current block, a sibling block, or an outer block. Do that (abs N) times." | |||
| 881 | (depth (or (nth 2 (ruby-parse-region (line-beginning-position) | 883 | (depth (or (nth 2 (ruby-parse-region (line-beginning-position) |
| 882 | (line-end-position))) | 884 | (line-end-position))) |
| 883 | 0)) | 885 | 0)) |
| 886 | case-fold-search | ||
| 884 | down done) | 887 | down done) |
| 885 | (when (< (* depth signum) 0) | 888 | (when (< (* depth signum) 0) |
| 886 | ;; Moving end -> end or beginning -> beginning. | 889 | ;; Moving end -> end or beginning -> beginning. |
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index 5617c31beff..0d4d3aaa26b 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el | |||
| @@ -895,7 +895,7 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") | |||
| 895 | 895 | ||
| 896 | ;; Do the actual Nextstep Windows setup here; the above code just | 896 | ;; Do the actual Nextstep Windows setup here; the above code just |
| 897 | ;; defines functions and variables that we use now. | 897 | ;; defines functions and variables that we use now. |
| 898 | (defun ns-initialize-window-system (&optional display) | 898 | (defun ns-initialize-window-system (&optional _display) |
| 899 | "Initialize Emacs for Nextstep (Cocoa / GNUstep) windowing." | 899 | "Initialize Emacs for Nextstep (Cocoa / GNUstep) windowing." |
| 900 | (cl-assert (not ns-initialized)) | 900 | (cl-assert (not ns-initialized)) |
| 901 | 901 | ||
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index b0f65812eab..acadb0fad43 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el | |||
| @@ -246,7 +246,7 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") | |||
| 246 | (declare-function x-parse-geometry "frame.c" (string)) | 246 | (declare-function x-parse-geometry "frame.c" (string)) |
| 247 | (defvar x-command-line-resources) | 247 | (defvar x-command-line-resources) |
| 248 | 248 | ||
| 249 | (defun w32-initialize-window-system (&optional display) | 249 | (defun w32-initialize-window-system (&optional _display) |
| 250 | "Initialize Emacs for W32 GUI frames." | 250 | "Initialize Emacs for W32 GUI frames." |
| 251 | (cl-assert (not w32-initialized)) | 251 | (cl-assert (not w32-initialized)) |
| 252 | 252 | ||
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index a56554f5b66..06c3cc68664 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -2329,10 +2329,14 @@ Global `ispell-quit' set to start location to continue spell session." | |||
| 2329 | ((= char ?i) ; accept and insert word into pers dict | 2329 | ((= char ?i) ; accept and insert word into pers dict |
| 2330 | (ispell-send-string (concat "*" word "\n")) | 2330 | (ispell-send-string (concat "*" word "\n")) |
| 2331 | (setq ispell-pdict-modified-p '(t)) ; dictionary modified! | 2331 | (setq ispell-pdict-modified-p '(t)) ; dictionary modified! |
| 2332 | (and (fboundp 'flyspell-unhighlight-at) | ||
| 2333 | (flyspell-unhighlight-at start)) | ||
| 2332 | nil) | 2334 | nil) |
| 2333 | ((or (= char ?a) (= char ?A)) ; accept word without insert | 2335 | ((or (= char ?a) (= char ?A)) ; accept word without insert |
| 2334 | (ispell-send-string (concat "@" word "\n")) | 2336 | (ispell-send-string (concat "@" word "\n")) |
| 2335 | (add-to-list 'ispell-buffer-session-localwords word) | 2337 | (add-to-list 'ispell-buffer-session-localwords word) |
| 2338 | (and (fboundp 'flyspell-unhighlight-at) | ||
| 2339 | (flyspell-unhighlight-at start)) | ||
| 2336 | (or ispell-buffer-local-name ; session localwords might conflict | 2340 | (or ispell-buffer-local-name ; session localwords might conflict |
| 2337 | (setq ispell-buffer-local-name (buffer-name))) | 2341 | (setq ispell-buffer-local-name (buffer-name))) |
| 2338 | (if (null ispell-pdict-modified-p) | 2342 | (if (null ispell-pdict-modified-p) |
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index 2a5c9c55866..c00cf36c79e 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el | |||
| @@ -863,6 +863,20 @@ DOWNCASE t: Downcase words before using them." | |||
| 863 | (string :tag "")) | 863 | (string :tag "")) |
| 864 | (option (boolean :tag "Downcase words ")))) | 864 | (option (boolean :tag "Downcase words ")))) |
| 865 | 865 | ||
| 866 | (defcustom reftex-label-regexps | ||
| 867 | '(;; Normal \\label{foo} labels | ||
| 868 | "\\\\label{\\(?1:[^}]*\\)}" | ||
| 869 | ;; keyvals [..., label = {foo}, ...] forms used by ctable, | ||
| 870 | ;; listings, minted, ... | ||
| 871 | "\\[[^]]*\\<label[[:space:]]*=[[:space:]]*{?\\(?1:[^],}]+\\)}?") | ||
| 872 | "List of regexps matching \\label definitions. | ||
| 873 | The default value matches usual \\label{...} definitions and | ||
| 874 | keyval style [..., label = {...}, ...] label definitions. It is | ||
| 875 | assumed that the regexp group 1 matches the label text, so you | ||
| 876 | have to define it using \\(?1:...\\) when adding new regexps." | ||
| 877 | :group 'reftex-defining-label-environments | ||
| 878 | :type '(repeat (regexp :tag "Regular Expression"))) | ||
| 879 | |||
| 866 | (defcustom reftex-label-illegal-re "[^-a-zA-Z0-9_+=:;,.]" | 880 | (defcustom reftex-label-illegal-re "[^-a-zA-Z0-9_+=:;,.]" |
| 867 | "Regexp matching characters not valid in labels." | 881 | "Regexp matching characters not valid in labels." |
| 868 | :group 'reftex-making-and-inserting-labels | 882 | :group 'reftex-making-and-inserting-labels |
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index d5bb0170cd9..21083fd188a 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el | |||
| @@ -1081,13 +1081,7 @@ This enforces rescanning the buffer on next use." | |||
| 1081 | (wbol "\\(^\\)[ \t]*") ; Need to keep the empty group because | 1081 | (wbol "\\(^\\)[ \t]*") ; Need to keep the empty group because |
| 1082 | ; match numbers are hard coded | 1082 | ; match numbers are hard coded |
| 1083 | (label-re (concat "\\(?:" | 1083 | (label-re (concat "\\(?:" |
| 1084 | ;; Normal \label{...} | 1084 | (mapconcat 'identity reftex-label-regexps "\\|") |
| 1085 | "\\\\label{\\([^}]*\\)}" | ||
| 1086 | "\\|" | ||
| 1087 | ;; keyvals [..., label = {foo}, ...] | ||
| 1088 | ;; forms used by ctable, listings, | ||
| 1089 | ;; minted, ... | ||
| 1090 | "\\[[^]]*label[[:space:]]*=[[:space:]]*{?\\(?1:[^],}]+\\)}?" | ||
| 1091 | "\\)")) | 1085 | "\\)")) |
| 1092 | (include-re (concat wbol | 1086 | (include-re (concat wbol |
| 1093 | "\\\\\\(" | 1087 | "\\\\\\(" |
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index f39ef568e8b..033e78c20cd 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el | |||
| @@ -357,7 +357,7 @@ Optional arg REVISION is a revision to annotate from." | |||
| 357 | ;;215 Wed Jun 20 21:22:58 2007 -0700 foo.c: CONTENTS | 357 | ;;215 Wed Jun 20 21:22:58 2007 -0700 foo.c: CONTENTS |
| 358 | ;; i.e. VERSION_NUMBER DATE FILENAME: CONTENTS | 358 | ;; i.e. VERSION_NUMBER DATE FILENAME: CONTENTS |
| 359 | (defconst vc-hg-annotate-re | 359 | (defconst vc-hg-annotate-re |
| 360 | "^[ \t]*\\([0-9]+\\) \\(.\\{30\\}\\)\\(?:\\(: \\)\\|\\(?: +\\(.+\\): \\)\\)") | 360 | "^[ \t]*\\([0-9]+\\) \\(.\\{30\\}\\)\\(?:\\(: \\)\\|\\(?: +\\([^:\n]+\\(?::\\(?:[^: \n][^:\n]*\\)?\\)*\\): \\)\\)") |
| 361 | 361 | ||
| 362 | (defun vc-hg-annotate-time () | 362 | (defun vc-hg-annotate-time () |
| 363 | (when (looking-at vc-hg-annotate-re) | 363 | (when (looking-at vc-hg-annotate-re) |
diff --git a/src/ChangeLog b/src/ChangeLog index 5c0e26760c7..04a6c353619 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,20 @@ | |||
| 1 | 2013-04-16 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * minibuf.c (Ftest_completion): Silence compiler warning. | ||
| 4 | |||
| 5 | 2013-04-15 Eli Zaretskii <eliz@gnu.org> | ||
| 6 | |||
| 7 | * w32fns.c (w32_wnd_proc): Add more assertions to investigate | ||
| 8 | bug#14062. | ||
| 9 | |||
| 10 | * frame.h (WINDOW_FRAME): Protect macro and its argument with | ||
| 11 | parentheses. | ||
| 12 | |||
| 13 | * dispextern.h (CURRENT_MODE_LINE_HEIGHT) | ||
| 14 | (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P) | ||
| 15 | (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with | ||
| 16 | parentheses where appropriate. | ||
| 17 | |||
| 1 | 2013-04-14 Paul Eggert <eggert@cs.ucla.edu> | 18 | 2013-04-14 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 19 | ||
| 3 | * keyboard.c (timer_start_idle): Remove no-longer-used local. | 20 | * keyboard.c (timer_start_idle): Remove no-longer-used local. |
| @@ -1244,7 +1261,7 @@ | |||
| 1244 | (Fcommand_execute): Remove, replace by an Elisp implementation. | 1261 | (Fcommand_execute): Remove, replace by an Elisp implementation. |
| 1245 | (syms_of_keyboard): Adjust accordingly. | 1262 | (syms_of_keyboard): Adjust accordingly. |
| 1246 | 1263 | ||
| 1247 | 2013-02-19 Daniel Colascione <dancol@dancol.org> | 1264 | 2013-02-19 Daniel Colascione <dancol@dancol.org> |
| 1248 | 1265 | ||
| 1249 | * sheap.c (report_sheap_usage): Use message, not message1, so | 1266 | * sheap.c (report_sheap_usage): Use message, not message1, so |
| 1250 | that we don't try to create a buffer while we're in the middle | 1267 | that we don't try to create a buffer while we're in the middle |
| @@ -12068,9 +12085,9 @@ | |||
| 12068 | to denote vector blocks. Adjust users (live_vector_p, | 12085 | to denote vector blocks. Adjust users (live_vector_p, |
| 12069 | mark_maybe_pointer, valid_lisp_object_p) accordingly. | 12086 | mark_maybe_pointer, valid_lisp_object_p) accordingly. |
| 12070 | (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG. | 12087 | (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG. |
| 12071 | (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES), | 12088 | (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES) |
| 12072 | (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX), | 12089 | (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX) |
| 12073 | (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST), | 12090 | (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST) |
| 12074 | (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros. | 12091 | (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros. |
| 12075 | (roundup_size): New constant. | 12092 | (roundup_size): New constant. |
| 12076 | (struct vector_block): New data type. | 12093 | (struct vector_block): New data type. |
diff --git a/src/dispextern.h b/src/dispextern.h index 0c35aff8285..70a5ba27b8d 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -1394,7 +1394,7 @@ struct glyph_string | |||
| 1394 | ? current_mode_line_height \ | 1394 | ? current_mode_line_height \ |
| 1395 | : (MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \ | 1395 | : (MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \ |
| 1396 | ? MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \ | 1396 | ? MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix) \ |
| 1397 | : estimate_mode_line_height (XFRAME (W->frame), \ | 1397 | : estimate_mode_line_height (XFRAME ((W)->frame), \ |
| 1398 | CURRENT_MODE_LINE_FACE_ID (W)))) | 1398 | CURRENT_MODE_LINE_FACE_ID (W)))) |
| 1399 | 1399 | ||
| 1400 | /* Return the current height of the header line of window W. If not | 1400 | /* Return the current height of the header line of window W. If not |
| @@ -1407,7 +1407,7 @@ struct glyph_string | |||
| 1407 | ? current_header_line_height \ | 1407 | ? current_header_line_height \ |
| 1408 | : (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \ | 1408 | : (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \ |
| 1409 | ? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \ | 1409 | ? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \ |
| 1410 | : estimate_mode_line_height (XFRAME (W->frame),\ | 1410 | : estimate_mode_line_height (XFRAME ((W)->frame), \ |
| 1411 | HEADER_LINE_FACE_ID))) | 1411 | HEADER_LINE_FACE_ID))) |
| 1412 | 1412 | ||
| 1413 | /* Return the height of the desired mode line of window W. */ | 1413 | /* Return the height of the desired mode line of window W. */ |
| @@ -1426,20 +1426,20 @@ struct glyph_string | |||
| 1426 | (!MINI_WINDOW_P ((W)) \ | 1426 | (!MINI_WINDOW_P ((W)) \ |
| 1427 | && !(W)->pseudo_window_p \ | 1427 | && !(W)->pseudo_window_p \ |
| 1428 | && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \ | 1428 | && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \ |
| 1429 | && BUFFERP (W->contents) \ | 1429 | && BUFFERP ((W)->contents) \ |
| 1430 | && !NILP (BVAR (XBUFFER (W->contents), mode_line_format)) \ | 1430 | && !NILP (BVAR (XBUFFER ((W)->contents), mode_line_format)) \ |
| 1431 | && WINDOW_TOTAL_LINES (W) > 1) | 1431 | && WINDOW_TOTAL_LINES (W) > 1) |
| 1432 | 1432 | ||
| 1433 | /* Value is true if window W wants a header line. */ | 1433 | /* Value is true if window W wants a header line. */ |
| 1434 | 1434 | ||
| 1435 | #define WINDOW_WANTS_HEADER_LINE_P(W) \ | 1435 | #define WINDOW_WANTS_HEADER_LINE_P(W) \ |
| 1436 | (!MINI_WINDOW_P ((W)) \ | 1436 | (!MINI_WINDOW_P ((W)) \ |
| 1437 | && !(W)->pseudo_window_p \ | 1437 | && !(W)->pseudo_window_p \ |
| 1438 | && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \ | 1438 | && FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \ |
| 1439 | && BUFFERP (W->contents) \ | 1439 | && BUFFERP ((W)->contents) \ |
| 1440 | && !NILP (BVAR (XBUFFER (W->contents), header_line_format)) \ | 1440 | && !NILP (BVAR (XBUFFER ((W)->contents), header_line_format)) \ |
| 1441 | && WINDOW_TOTAL_LINES (W) > 1 \ | 1441 | && WINDOW_TOTAL_LINES (W) > 1 \ |
| 1442 | + !NILP (BVAR (XBUFFER (W->contents), mode_line_format))) | 1442 | + !NILP (BVAR (XBUFFER ((W)->contents), mode_line_format))) |
| 1443 | 1443 | ||
| 1444 | /* Return proper value to be used as baseline offset of font that has | 1444 | /* Return proper value to be used as baseline offset of font that has |
| 1445 | ASCENT and DESCENT to draw characters by the font at the vertical | 1445 | ASCENT and DESCENT to draw characters by the font at the vertical |
diff --git a/src/frame.h b/src/frame.h index b69f19b7ef8..fc0a1dc828b 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -598,7 +598,7 @@ typedef struct frame *FRAME_PTR; | |||
| 598 | #define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME)) | 598 | #define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME)) |
| 599 | 599 | ||
| 600 | /* Given a window, return its frame as a Lisp_Object. */ | 600 | /* Given a window, return its frame as a Lisp_Object. */ |
| 601 | #define WINDOW_FRAME(w) w->frame | 601 | #define WINDOW_FRAME(w) ((w)->frame) |
| 602 | 602 | ||
| 603 | /* Test a frame for particular kinds of display methods. */ | 603 | /* Test a frame for particular kinds of display methods. */ |
| 604 | #define FRAME_INITIAL_P(f) ((f)->output_method == output_initial) | 604 | #define FRAME_INITIAL_P(f) ((f)->output_method == output_initial) |
diff --git a/src/minibuf.c b/src/minibuf.c index 4cc1f8d435a..b96d27e0742 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -1799,8 +1799,8 @@ the values STRING, PREDICATE and `lambda'. */) | |||
| 1799 | else if (HASH_TABLE_P (collection)) | 1799 | else if (HASH_TABLE_P (collection)) |
| 1800 | { | 1800 | { |
| 1801 | struct Lisp_Hash_Table *h = XHASH_TABLE (collection); | 1801 | struct Lisp_Hash_Table *h = XHASH_TABLE (collection); |
| 1802 | i = hash_lookup (h, string, NULL); | ||
| 1803 | Lisp_Object key = Qnil; | 1802 | Lisp_Object key = Qnil; |
| 1803 | i = hash_lookup (h, string, NULL); | ||
| 1804 | if (i >= 0) | 1804 | if (i >= 0) |
| 1805 | tem = HASH_KEY (h, i); | 1805 | tem = HASH_KEY (h, i); |
| 1806 | else | 1806 | else |
diff --git a/src/w32fns.c b/src/w32fns.c index 5d3a78f8b95..de52ff144e3 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -3123,6 +3123,8 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |||
| 3123 | 3123 | ||
| 3124 | #ifdef ENABLE_CHECKING | 3124 | #ifdef ENABLE_CHECKING |
| 3125 | /* Temporary code to catch crashes in computing form.rcArea.top. */ | 3125 | /* Temporary code to catch crashes in computing form.rcArea.top. */ |
| 3126 | eassert (FRAMEP (w->frame)); | ||
| 3127 | eassert (BUFFERP (w->contents)); | ||
| 3126 | { | 3128 | { |
| 3127 | int wmbp = WINDOW_MENU_BAR_P (w); | 3129 | int wmbp = WINDOW_MENU_BAR_P (w); |
| 3128 | int wtbp = WINDOW_TOOL_BAR_P (w); | 3130 | int wtbp = WINDOW_TOOL_BAR_P (w); |
diff --git a/test/ChangeLog b/test/ChangeLog index bf68984e9e8..7c25ad1a804 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-04-17 Fabián Ezequiel Gallina <fgallina@gnu.org> | ||
| 2 | |||
| 3 | * automated/python-tests.el (python-nav-backward-defun-1) | ||
| 4 | (python-nav-forward-defun-1): New tests. | ||
| 5 | |||
| 1 | 2013-04-09 Masatake YAMATO <yamato@redhat.com> | 6 | 2013-04-09 Masatake YAMATO <yamato@redhat.com> |
| 2 | 7 | ||
| 3 | * automated/add-log-tests.el: New file. (Bug#14112) | 8 | * automated/add-log-tests.el: New file. (Bug#14112) |
diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index 1a741b45d81..a7c7aab6464 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el | |||
| @@ -674,6 +674,93 @@ def decoratorFunctionWithArguments(arg1, arg2, arg3): | |||
| 674 | (python-tests-look-at "return wrapped_f") | 674 | (python-tests-look-at "return wrapped_f") |
| 675 | (line-beginning-position)))))) | 675 | (line-beginning-position)))))) |
| 676 | 676 | ||
| 677 | (ert-deftest python-nav-backward-defun-1 () | ||
| 678 | (python-tests-with-temp-buffer | ||
| 679 | " | ||
| 680 | class A(object): # A | ||
| 681 | |||
| 682 | def a(self): # a | ||
| 683 | pass | ||
| 684 | |||
| 685 | def b(self): # b | ||
| 686 | pass | ||
| 687 | |||
| 688 | class B(object): # B | ||
| 689 | |||
| 690 | class C(object): # C | ||
| 691 | |||
| 692 | def d(self): # d | ||
| 693 | pass | ||
| 694 | |||
| 695 | # def e(self): # e | ||
| 696 | # pass | ||
| 697 | |||
| 698 | def c(self): # c | ||
| 699 | pass | ||
| 700 | |||
| 701 | # def d(self): # d | ||
| 702 | # pass | ||
| 703 | " | ||
| 704 | (goto-char (point-max)) | ||
| 705 | (should (= (save-excursion (python-nav-backward-defun)) | ||
| 706 | (python-tests-look-at " def c(self): # c" -1))) | ||
| 707 | (should (= (save-excursion (python-nav-backward-defun)) | ||
| 708 | (python-tests-look-at " def d(self): # d" -1))) | ||
| 709 | (should (= (save-excursion (python-nav-backward-defun)) | ||
| 710 | (python-tests-look-at " class C(object): # C" -1))) | ||
| 711 | (should (= (save-excursion (python-nav-backward-defun)) | ||
| 712 | (python-tests-look-at " class B(object): # B" -1))) | ||
| 713 | (should (= (save-excursion (python-nav-backward-defun)) | ||
| 714 | (python-tests-look-at " def b(self): # b" -1))) | ||
| 715 | (should (= (save-excursion (python-nav-backward-defun)) | ||
| 716 | (python-tests-look-at " def a(self): # a" -1))) | ||
| 717 | (should (= (save-excursion (python-nav-backward-defun)) | ||
| 718 | (python-tests-look-at "class A(object): # A" -1))) | ||
| 719 | (should (not (python-nav-backward-defun))))) | ||
| 720 | |||
| 721 | (ert-deftest python-nav-forward-defun-1 () | ||
| 722 | (python-tests-with-temp-buffer | ||
| 723 | " | ||
| 724 | class A(object): # A | ||
| 725 | |||
| 726 | def a(self): # a | ||
| 727 | pass | ||
| 728 | |||
| 729 | def b(self): # b | ||
| 730 | pass | ||
| 731 | |||
| 732 | class B(object): # B | ||
| 733 | |||
| 734 | class C(object): # C | ||
| 735 | |||
| 736 | def d(self): # d | ||
| 737 | pass | ||
| 738 | |||
| 739 | # def e(self): # e | ||
| 740 | # pass | ||
| 741 | |||
| 742 | def c(self): # c | ||
| 743 | pass | ||
| 744 | |||
| 745 | # def d(self): # d | ||
| 746 | # pass | ||
| 747 | " | ||
| 748 | (goto-char (point-min)) | ||
| 749 | (should (= (save-excursion (python-nav-forward-defun)) | ||
| 750 | (python-tests-look-at "(object): # A"))) | ||
| 751 | (should (= (save-excursion (python-nav-forward-defun)) | ||
| 752 | (python-tests-look-at "(self): # a"))) | ||
| 753 | (should (= (save-excursion (python-nav-forward-defun)) | ||
| 754 | (python-tests-look-at "(self): # b"))) | ||
| 755 | (should (= (save-excursion (python-nav-forward-defun)) | ||
| 756 | (python-tests-look-at "(object): # B"))) | ||
| 757 | (should (= (save-excursion (python-nav-forward-defun)) | ||
| 758 | (python-tests-look-at "(object): # C"))) | ||
| 759 | (should (= (save-excursion (python-nav-forward-defun)) | ||
| 760 | (python-tests-look-at "(self): # d"))) | ||
| 761 | (should (= (save-excursion (python-nav-forward-defun)) | ||
| 762 | (python-tests-look-at "(self): # c"))) | ||
| 763 | (should (not (python-nav-forward-defun))))) | ||
| 677 | 764 | ||
| 678 | (ert-deftest python-nav-beginning-of-statement-1 () | 765 | (ert-deftest python-nav-beginning-of-statement-1 () |
| 679 | (python-tests-with-temp-buffer | 766 | (python-tests-with-temp-buffer |
diff --git a/test/automated/ruby-mode-tests.el b/test/automated/ruby-mode-tests.el index 0ebe6d44e34..23dc45ad509 100644 --- a/test/automated/ruby-mode-tests.el +++ b/test/automated/ruby-mode-tests.el | |||
| @@ -487,6 +487,42 @@ VALUES-PLIST is a list with alternating index and value elements." | |||
| 487 | (ruby-beginning-of-block) | 487 | (ruby-beginning-of-block) |
| 488 | (should (= 1 (line-number-at-pos))))) | 488 | (should (= 1 (line-number-at-pos))))) |
| 489 | 489 | ||
| 490 | (ert-deftest ruby-move-to-block-does-not-fold-case () | ||
| 491 | (ruby-with-temp-buffer | ||
| 492 | (ruby-test-string | ||
| 493 | "foo do | ||
| 494 | | Module.to_s | ||
| 495 | |end") | ||
| 496 | (end-of-buffer) | ||
| 497 | (let ((case-fold-search t)) | ||
| 498 | (ruby-beginning-of-block)) | ||
| 499 | (should (= 1 (line-number-at-pos))))) | ||
| 500 | |||
| 501 | (ert-deftest ruby-beginning-of-defun-does-not-fold-case () | ||
| 502 | (ruby-with-temp-buffer | ||
| 503 | (ruby-test-string | ||
| 504 | "class C | ||
| 505 | | def bar | ||
| 506 | | Class.to_s | ||
| 507 | | end | ||
| 508 | |end") | ||
| 509 | (goto-line 4) | ||
| 510 | (let ((case-fold-search t)) | ||
| 511 | (beginning-of-defun)) | ||
| 512 | (should (= 2 (line-number-at-pos))))) | ||
| 513 | |||
| 514 | (ert-deftest ruby-end-of-defun-skips-to-next-line-after-the-method () | ||
| 515 | (ruby-with-temp-buffer | ||
| 516 | (ruby-test-string | ||
| 517 | "class D | ||
| 518 | | def tee | ||
| 519 | | 'ho hum' | ||
| 520 | | end | ||
| 521 | |end") | ||
| 522 | (goto-line 2) | ||
| 523 | (end-of-defun) | ||
| 524 | (should (= 5 (line-number-at-pos))))) | ||
| 525 | |||
| 490 | (provide 'ruby-mode-tests) | 526 | (provide 'ruby-mode-tests) |
| 491 | 527 | ||
| 492 | ;;; ruby-mode-tests.el ends here | 528 | ;;; ruby-mode-tests.el ends here |