diff options
| author | Xue Fuqiao | 2013-09-04 08:39:34 +0800 |
|---|---|---|
| committer | Xue Fuqiao | 2013-09-04 08:39:34 +0800 |
| commit | adf2fc4a01efe77d73cd52bc9173914ed56ff531 (patch) | |
| tree | a5a280a5554a7bffeaf94fccae29fa3ac1a5d066 /lisp | |
| parent | 63191d9f2043d2e67657e85a7b3842805dd1dad6 (diff) | |
| parent | 38726039b77db432989fed106c88e9f1aa463281 (diff) | |
| download | emacs-adf2fc4a01efe77d73cd52bc9173914ed56ff531.tar.gz emacs-adf2fc4a01efe77d73cd52bc9173914ed56ff531.zip | |
Merge from mainline.
Diffstat (limited to 'lisp')
227 files changed, 6504 insertions, 4287 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9292732dc4c..bc34cbdcf0b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -9,6 +9,1265 @@ | |||
| 9 | * vc/vc-hg.el (vc-hg-ignore, vc-hg-ignore-completion-table): | 9 | * vc/vc-hg.el (vc-hg-ignore, vc-hg-ignore-completion-table): |
| 10 | Remove. Most code moved to vc.el. | 10 | Remove. Most code moved to vc.el. |
| 11 | 11 | ||
| 12 | 2013-09-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 13 | |||
| 14 | * net/tramp-gvfs.el (tramp-gvfs-mount-spec, tramp-synce-list-devices): | ||
| 15 | * net/tramp-smb.el (tramp-smb-get-file-entries): | ||
| 16 | * net/tramp-sh.el (tramp-sh-handle-insert-directory) | ||
| 17 | (tramp-compute-multi-hops): Fix misuses of `add-to-list'. | ||
| 18 | |||
| 19 | * net/eww.el (eww-display-raw): Remove unused argument `charset'. | ||
| 20 | Update call to it. | ||
| 21 | (eww-change-select): Remove unused var `properties'. | ||
| 22 | (eww-make-unique-file-name): Remove unused var `base'. | ||
| 23 | |||
| 24 | * finder.el (finder-compile-keywords): Don't mess with windows. | ||
| 25 | |||
| 26 | * calculator.el (calculator-funcall): Fix typo in last change. | ||
| 27 | |||
| 28 | * vc/vc-git.el (vc-git-checkin): Make it possible to commit a merge. | ||
| 29 | |||
| 30 | * emacs-lisp/package.el (package-activate-1): Don't let a missing | ||
| 31 | <pkg>-autoloads.el file stop us. | ||
| 32 | |||
| 33 | * net/tramp.el (with-parsed-tramp-file-name): Silence compiler | ||
| 34 | warnings, and factor out common code. | ||
| 35 | |||
| 36 | 2013-09-03 Dmitry Gutov <dgutov@yandex.ru> | ||
| 37 | |||
| 38 | * progmodes/ruby-mode.el (ruby-calculate-indent): Consider | ||
| 39 | two-character operators and whether the character preceding them | ||
| 40 | changes their meaning (Bug#15208). | ||
| 41 | |||
| 42 | 2013-09-02 Fabián Ezequiel Gallina <fgallina@gnu.org> | ||
| 43 | |||
| 44 | Format code sent to Python shell for robustness. | ||
| 45 | * progmodes/python.el (python-shell-buffer-substring): | ||
| 46 | New function. | ||
| 47 | (python-shell-send-region, python-shell-send-buffer): Use it. | ||
| 48 | |||
| 49 | 2013-09-02 Michael Albinus <michael.albinus@gmx.de> | ||
| 50 | |||
| 51 | * net/tramp-compat.el (tramp-compat-user-error): Move it ... | ||
| 52 | * net/tramp.el (tramp-user-error): ... here. | ||
| 53 | (tramp-find-method, tramp-check-proper-host) | ||
| 54 | (tramp-dissect-file-name, tramp-debug-message) | ||
| 55 | (tramp-handle-shell-command): | ||
| 56 | * net/tramp-adb.el (tramp-adb-handle-shell-command): | ||
| 57 | * net/tramp-gvfs.el (tramp-gvfs-file-name-handler): Adapt callees. | ||
| 58 | |||
| 59 | * net/tramp-cache.el (tramp-cache-print): Don't print text properties. | ||
| 60 | |||
| 61 | 2013-09-02 Martin Rudalics <rudalics@gmx.at> | ||
| 62 | |||
| 63 | * avoid.el (mouse-avoidance-point-position) | ||
| 64 | (mouse-avoidance-too-close-p): Handle case where posn-at-point | ||
| 65 | returns nil. | ||
| 66 | |||
| 67 | 2013-09-02 Fabián Ezequiel Gallina <fgallina@gnu.org> | ||
| 68 | |||
| 69 | * progmodes/python.el (python-shell-completion-get-completions): | ||
| 70 | Drop use of deleted `comint-last-prompt-overlay'. | ||
| 71 | (python-nav-if-name-main): New command. | ||
| 72 | |||
| 73 | 2013-09-01 Glenn Morris <rgm@gnu.org> | ||
| 74 | |||
| 75 | * Makefile.in (setwins, setwins_almost, setwins_for_subdirs): | ||
| 76 | Avoid leading space in $wins. Otherwise the sed command used by | ||
| 77 | eg compile-main ends up containing "/*.el". (Bug#15170) | ||
| 78 | |||
| 79 | * frame.el (frame-background-mode): Doc fix. (Bug#15226) | ||
| 80 | |||
| 81 | 2013-08-30 Glenn Morris <rgm@gnu.org> | ||
| 82 | |||
| 83 | * emacs-lisp/bytecomp.el (byte-recompile-directory): | ||
| 84 | Fix is-this-a-directory logic. (Bug#15220) | ||
| 85 | |||
| 86 | 2013-08-29 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 87 | |||
| 88 | * textmodes/css-mode.el: Use SMIE. | ||
| 89 | (css-smie-grammar): New var. | ||
| 90 | (css-smie--forward-token, css-smie--backward-token) | ||
| 91 | (css-smie-rules): New functions. | ||
| 92 | (css-mode): Use them. | ||
| 93 | (css-navigation-syntax-table): Remove var. | ||
| 94 | (css-backward-sexp, css-forward-sexp, css-indent-calculate-virtual) | ||
| 95 | (css-indent-calculate, css-indent-line): Remove functions. | ||
| 96 | |||
| 97 | Misc changes to reduce use of `(lambda...); and other cleanups. | ||
| 98 | * cus-edit.el: Use lexical-binding. | ||
| 99 | (customize-push-and-save, customize-apropos) | ||
| 100 | (custom-buffer-create-internal): Use closures. | ||
| 101 | * progmodes/bat-mode.el (bat-mode-syntax-table): "..." are strings. | ||
| 102 | * progmodes/ada-xref.el: Use setq. | ||
| 103 | * net/tramp.el (with-tramp-progress-reporter): Avoid setq. | ||
| 104 | * dframe.el: Use lexical-binding. | ||
| 105 | (dframe-frame-mode): Fix calling convention for hooks. Use a closure. | ||
| 106 | * speedbar.el (speedbar-frame-mode): Adjust call accordingly. | ||
| 107 | * descr-text.el: Use lexical-binding. | ||
| 108 | (describe-text-widget, describe-text-sexp, describe-property-list): | ||
| 109 | Use closures. | ||
| 110 | * comint.el (comint-history-isearch-push-state): Use a closure. | ||
| 111 | * calculator.el: Use lexical-binding. | ||
| 112 | (calculator-number-to-string): Make it work with lexical-binding. | ||
| 113 | (calculator-funcall): Same and use cl-letf. | ||
| 114 | |||
| 115 | * emacs-lisp/lisp.el (lisp--company-doc-buffer) | ||
| 116 | (lisp--company-doc-string, lisp--company-location): New functions. | ||
| 117 | (lisp-completion-at-point): Use them to improve Company support. | ||
| 118 | |||
| 119 | * progmodes/ruby-mode.el (ruby-smie-grammar): Add rule for formal | ||
| 120 | params of lambda expressions. | ||
| 121 | (ruby-smie--implicit-semi-p): Refine rule (bug#15208). | ||
| 122 | (ruby-smie--opening-pipe-p): New function. | ||
| 123 | (ruby-smie--forward-token, ruby-smie--backward-token): Handle Ruby | ||
| 124 | symbols and matched |...| for formal params. | ||
| 125 | (ruby-smie-rules): Don't let the formal params of a "do" prevent it | ||
| 126 | from being treated as hanging. Handle "rescue". | ||
| 127 | |||
| 128 | 2013-08-29 Glenn Morris <rgm@gnu.org> | ||
| 129 | |||
| 130 | * progmodes/cc-engine.el (c-pull-open-brace): | ||
| 131 | Move definition before use. | ||
| 132 | |||
| 133 | 2013-08-29 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 134 | |||
| 135 | * emacs-lisp/cl-macs.el (cl-defsubst): Make it clear that args | ||
| 136 | are immutable. Don't use `unsafe' any more. | ||
| 137 | (cl--defsubst-expand): Don't substitute at the same time as keeping | ||
| 138 | a residual unused let-binding. Don't use `unsafe' any more. | ||
| 139 | |||
| 140 | 2013-08-29 Glenn Morris <rgm@gnu.org> | ||
| 141 | |||
| 142 | * calendar/cal-china.el (calendar-chinese-year-cache): | ||
| 143 | Recenter on 2015. | ||
| 144 | |||
| 145 | * nxml/nxml-util.el (nxml-debug-clear-inside): | ||
| 146 | Use cl-loop rather than loop. | ||
| 147 | |||
| 148 | * net/eww.el (eww-mode-map): Lower-case menu bar entries look bad. | ||
| 149 | |||
| 150 | * progmodes/sh-script.el (sh-builtins) <bash>: Add some bash4-isms. | ||
| 151 | |||
| 152 | 2013-08-28 Glenn Morris <rgm@gnu.org> | ||
| 153 | |||
| 154 | * progmodes/antlr-mode.el: No need to require cc-mode twice. | ||
| 155 | |||
| 156 | * progmodes/cc-bytecomp.el (cc-require): Handle uncompiled case. | ||
| 157 | |||
| 158 | * progmodes/cc-mode.el (c-define-abbrev-table): Handle NAME unbound. | ||
| 159 | |||
| 160 | 2013-08-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 161 | |||
| 162 | * simple.el (repeat-complex-command--called-interactively-skip): | ||
| 163 | New function. | ||
| 164 | (repeat-complex-command): Use it (bug#14136). | ||
| 165 | |||
| 166 | * progmodes/cc-mode.el: Minor cleanup of var declarations. | ||
| 167 | (c-define-abbrev-table): Add `doc' argument. | ||
| 168 | (c-mode-abbrev-table, c++-mode-abbrev-table) | ||
| 169 | (objc-mode-abbrev-table, java-mode-abbrev-table) | ||
| 170 | (idl-mode-abbrev-table, pike-mode-abbrev-table) | ||
| 171 | (awk-mode-abbrev-table): Use it. | ||
| 172 | (c-mode-syntax-table, c-mode-map, c++-mode-syntax-table) | ||
| 173 | (c++-mode-map, objc-mode-syntax-table, objc-mode-map) | ||
| 174 | (java-mode-syntax-table, java-mode-map, idl-mode-syntax-table) | ||
| 175 | (idl-mode-map, pike-mode-syntax-table, pike-mode-map, awk-mode-map): | ||
| 176 | Move initialization into the declaration; and remove any | ||
| 177 | autoload cookie. | ||
| 178 | |||
| 179 | * epg.el (epg--process-filter): Use with-current-buffer, save-excursion | ||
| 180 | and dynamic let binding. | ||
| 181 | |||
| 182 | * vc/smerge-mode.el: Remove redundant :group args. | ||
| 183 | |||
| 184 | * emacs-lisp/package.el (package-activate-1): Don't add unnecessarily | ||
| 185 | to load-path. | ||
| 186 | |||
| 187 | 2013-08-28 Juri Linkov <juri@jurta.org> | ||
| 188 | |||
| 189 | * isearch.el (isearch-reread-key-sequence-naturally): Use non-nil | ||
| 190 | arg DONT-DOWNCASE-LAST of `read-key-sequence'. | ||
| 191 | (isearch-other-meta-char): Handle an undefined shifted printing | ||
| 192 | character by downshifting it. (Bug#15200) | ||
| 193 | |||
| 194 | 2013-08-28 Juri Linkov <juri@jurta.org> | ||
| 195 | |||
| 196 | * isearch.el (isearch-search): Change regexp error message for | ||
| 197 | non-regexp searches. (Bug#15166) | ||
| 198 | |||
| 199 | 2013-08-28 Paul Eggert <eggert@cs.ucla.edu> | ||
| 200 | |||
| 201 | * Makefile.in (SHELL): Now @SHELL@, not /bin/sh, | ||
| 202 | for portability to hosts where /bin/sh has problems. | ||
| 203 | |||
| 204 | 2013-08-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 205 | |||
| 206 | * emacs-lisp/cconv.el (cconv--analyse-function): Improve warning. | ||
| 207 | |||
| 208 | 2013-08-27 Juri Linkov <juri@jurta.org> | ||
| 209 | |||
| 210 | * isearch.el (isearch-other-meta-char): Don't store kmacro commands | ||
| 211 | in the keyboard macro. (Bug#15126) | ||
| 212 | |||
| 213 | 2013-08-27 Juri Linkov <juri@jurta.org> | ||
| 214 | |||
| 215 | * isearch.el (isearch-quote-char): Comment out converting unibyte | ||
| 216 | to multibyte, thus syncing with its `quoted-insert' counterpart. | ||
| 217 | (Bug#15166) | ||
| 218 | |||
| 219 | 2013-08-27 Martin Rudalics <rudalics@gmx.at> | ||
| 220 | |||
| 221 | * window.el (display-buffer-use-some-window): Add missing | ||
| 222 | argument in call of get-largest-window (Bug#15185). | ||
| 223 | Reported by Stephen Leake. | ||
| 224 | |||
| 225 | 2013-08-27 Glenn Morris <rgm@gnu.org> | ||
| 226 | |||
| 227 | * emacs-lisp/package.el (package-buffer-info): Fix message typo. | ||
| 228 | |||
| 229 | 2013-08-27 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 230 | |||
| 231 | * progmodes/python.el (python-font-lock-keywords): Don't return nil | ||
| 232 | from a matcher-function unless there's no more matches (bug#15161). | ||
| 233 | |||
| 234 | 2013-08-26 Michael Albinus <michael.albinus@gmx.de> | ||
| 235 | |||
| 236 | * minibuffer.el: Revert change from 2013-08-20. | ||
| 237 | |||
| 238 | * net/tramp.el (tramp-find-method, tramp-find-user): Mark result | ||
| 239 | with text property `tramp-default', if appropriate. | ||
| 240 | (tramp-check-proper-host): New defun. | ||
| 241 | (tramp-dissect-file-name): Do not check hostname. Revert change | ||
| 242 | of 2013-03-18. | ||
| 243 | (tramp-backtrace): Make VEC-OR-PROC optional. | ||
| 244 | |||
| 245 | * net/tramp-adb.el (tramp-adb-maybe-open-connection): | ||
| 246 | * net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection): | ||
| 247 | * net/tramp-sh.el (tramp-maybe-open-connection): | ||
| 248 | * net/tramp-smb.el (tramp-smb-maybe-open-connection): | ||
| 249 | Apply `tramp-check-proper-host'. | ||
| 250 | |||
| 251 | 2013-08-26 Tassilo Horn <tsdh@gnu.org> | ||
| 252 | |||
| 253 | * epa-hook.el (epa-file-encrypt-to): Quote `safe-local-variable' | ||
| 254 | lambda expression in order to have `describe-variable' display it. | ||
| 255 | |||
| 256 | 2013-08-26 Michael Albinus <michael.albinus@gmx.de> | ||
| 257 | |||
| 258 | * net/tramp-sh.el (tramp-sh-handle-verify-visited-file-modtime): | ||
| 259 | BUF can be optional. (Bug#15186) | ||
| 260 | |||
| 261 | 2013-08-25 Xue Fuqiao <xfq.free@gmail.com> | ||
| 262 | |||
| 263 | * progmodes/flymake.el (flymake-get-real-file-name-function): | ||
| 264 | Fix broken customization. (Bug#15184) | ||
| 265 | |||
| 266 | 2013-08-25 Alan Mackenzie <acm@muc.de> | ||
| 267 | |||
| 268 | Improve indentation of bracelists defined by macros (without "="). | ||
| 269 | |||
| 270 | * progmodes/cc-engine.el (c-inside-bracelist-p): When a macro | ||
| 271 | expansion begins with "{", regard it as bracelist when it doesn't | ||
| 272 | contain a ";". | ||
| 273 | |||
| 274 | Parse C++ inher-intro when there's a template split over 2 lines. | ||
| 275 | |||
| 276 | * progmodes/cc-engine.el (c-guess-basic-syntax CASE 5C): Code more | ||
| 277 | rigorously the search for "class" etc. followed by ":". | ||
| 278 | |||
| 279 | * progmodes/cc-langs.el (c-opt-<>-sexp-key): Make the value for | ||
| 280 | random languages a regexp which never matches rather than nil. | ||
| 281 | |||
| 282 | Handle "/"s more accurately in test for virtual semicolons (AWK Mode). | ||
| 283 | |||
| 284 | * progmodes/cc-awk.el (c-awk-one-line-possibly-open-string-re) | ||
| 285 | (c-awk-regexp-one-line-possibly-open-char-list-re) | ||
| 286 | (c-awk-one-line-possibly-open-regexp-re) | ||
| 287 | (c-awk-one-line-non-syn-ws*-re): Remove. | ||
| 288 | (c-awk-possibly-open-string-re, c-awk-non-/-syn-ws*-re) | ||
| 289 | (c-awk-space*-/-re, c-awk-space*-regexp-/-re) | ||
| 290 | (c-awk-space*-unclosed-regexp-/-re): New constants. | ||
| 291 | (c-awk-at-vsemi-p): Reformulate better to recognize "/"s which | ||
| 292 | aren't regexp delimiters. | ||
| 293 | |||
| 294 | * progmodes/cc-engine.el (c-crosses-statement-barrier-p): Add in | ||
| 295 | handling for a rare situation in AWK Mode involving unterminated | ||
| 296 | strings/regexps. | ||
| 297 | |||
| 298 | 2013-08-23 Glenn Morris <rgm@gnu.org> | ||
| 299 | |||
| 300 | * files.el (auto-mode-alist): Use sh-mode for .bash_history. | ||
| 301 | |||
| 302 | * files.el (interpreter-mode-alist): Use tcl-mode for expect scripts. | ||
| 303 | |||
| 304 | * files.el (create-file-buffer): If the result would begin with | ||
| 305 | spaces, prepend a "|" instead of removing them. (Bug#15162) | ||
| 306 | |||
| 307 | 2013-08-23 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 308 | |||
| 309 | * textmodes/fill.el (fill-match-adaptive-prefix): Don't throw away | ||
| 310 | text-properties (bug#15155). | ||
| 311 | |||
| 312 | * calc/calc-keypd.el (calc-keypad-execute): `x-flush-mouse-queue' doesn't | ||
| 313 | exist any more. | ||
| 314 | (calc-keypad-redraw): Remove unused var `pad'. | ||
| 315 | (calc-keypad-press): Remove unused var `menu'. | ||
| 316 | |||
| 317 | 2013-08-23 Martin Rudalics <rudalics@gmx.at> | ||
| 318 | |||
| 319 | * window.el (display-buffer-pop-up-frame): | ||
| 320 | Call pop-up-frame-function with BUFFER current so `make-frame' will | ||
| 321 | use it as the new frame's buffer (Bug#15133). | ||
| 322 | |||
| 323 | 2013-08-22 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 324 | |||
| 325 | * calendar/timeclock.el: Minor cleanups. | ||
| 326 | (timeclock-ask-before-exiting, timeclock-use-display-time): | ||
| 327 | Use `symbol'. | ||
| 328 | (timeclock-modeline-display): Define as alias before the | ||
| 329 | actual definition. | ||
| 330 | (timeclock-mode-line-display): Use define-minor-mode. | ||
| 331 | (timeclock-day-list-template): Make it a function, add an argument. | ||
| 332 | (timeclock-day-list-required, timeclock-day-list-length) | ||
| 333 | (timeclock-day-list-debt, timeclock-day-list-span) | ||
| 334 | (timeclock-day-list-break): Adjust calls accordingly. | ||
| 335 | |||
| 336 | 2013-08-21 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 337 | |||
| 338 | * emacs-lisp/pp.el (pp-eval-expression, pp-macroexpand-expression): | ||
| 339 | Use read--expression so that completion works again. | ||
| 340 | |||
| 341 | 2013-08-21 Sam Steingold <sds@gnu.org> | ||
| 342 | |||
| 343 | Add rudimentary inferior shell interaction | ||
| 344 | * progmodes/sh-script.el (sh-shell-process): New buffer-local variable. | ||
| 345 | (sh-set-shell): Reset it. | ||
| 346 | (sh-show-shell, sh-cd-here, sh-send-line-or-region-and-step): | ||
| 347 | New commands (bound to C-c C-z, C-c C-d, and C-c C-n). | ||
| 348 | |||
| 349 | 2013-08-20 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 350 | |||
| 351 | * align.el: Use lexical-binding. | ||
| 352 | (align-region): Simplify accordingly. | ||
| 353 | |||
| 354 | 2013-08-20 Michael Albinus <michael.albinus@gmx.de> | ||
| 355 | |||
| 356 | * minibuffer.el (completion--sifn-requote): Bind `non-essential'. | ||
| 357 | |||
| 358 | * rfn-eshadow.el (rfn-eshadow-update-overlay): Move binding of | ||
| 359 | `non-essential' up. | ||
| 360 | |||
| 361 | 2013-08-17 Michael Albinus <michael.albinus@gmx.de> | ||
| 362 | |||
| 363 | * net/tramp.el: | ||
| 364 | * net/tramp-adb.el: | ||
| 365 | * net/tramp-cmds.el: | ||
| 366 | * net/tramp-ftp.el: | ||
| 367 | * net/tramp-gvfs.el: | ||
| 368 | * net/tramp-gw.el: | ||
| 369 | * net/tramp-sh.el: Don't wrap external variable declarations by | ||
| 370 | `eval-when-compile'. | ||
| 371 | |||
| 372 | 2013-08-16 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 373 | |||
| 374 | * net/shr.el (shr-rescale-image): Use ImageMagick even for GIFs | ||
| 375 | now that Emacs supports ImageMagick animations. | ||
| 376 | |||
| 377 | 2013-08-16 Michael Albinus <michael.albinus@gmx.de> | ||
| 378 | |||
| 379 | * net/tramp-cmds.el (top): Don't declare `buffer-name'. | ||
| 380 | (tramp-append-tramp-buffers): Rewrite buffer local variables part. | ||
| 381 | |||
| 382 | 2013-08-16 Martin Rudalics <rudalics@gmx.at> | ||
| 383 | |||
| 384 | * window.el (mouse-autoselect-window-select): Do autoselect when | ||
| 385 | mouse pointer is on margin. | ||
| 386 | |||
| 387 | 2013-08-16 William Parsons <wbparsons@alum.mit.edu> (tiny change) | ||
| 388 | |||
| 389 | * net/ange-ftp.el (ange-ftp-skip-msgs): Add 500 EPSV. (Bug#1972) | ||
| 390 | |||
| 391 | 2013-08-16 Glenn Morris <rgm@gnu.org> | ||
| 392 | |||
| 393 | * net/ange-ftp.el (ange-ftp-good-msgs, ange-ftp-get-pwd): | ||
| 394 | Handle "Remote Directory" response of some clients. (Bug#15058) | ||
| 395 | |||
| 396 | * emacs-lisp/bytecomp.el (byte-compile-make-variable-buffer-local): | ||
| 397 | Tweak warning. (Bug#14926) | ||
| 398 | |||
| 399 | * menu-bar.el (send-mail-item-name, read-mail-item-name): Remove. | ||
| 400 | (menu-bar-tools-menu): Simplify news and mail items. (Bug#15095) | ||
| 401 | |||
| 402 | * image-mode.el (image-mode-map): Add menu items to reverse, | ||
| 403 | increase, decrease, reset animation speed. | ||
| 404 | (image--set-speed, image-increase-speed, image-decrease-speed) | ||
| 405 | (image-reverse-speed, image-reset-speed): New functions. | ||
| 406 | (image-mode-map): Add bindings for speed commands. | ||
| 407 | |||
| 408 | * image.el (image-animate-get-speed, image-animate-set-speed): | ||
| 409 | New functions. | ||
| 410 | (image-animate-timeout): Respect image :speed property. | ||
| 411 | |||
| 412 | 2013-08-15 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 413 | |||
| 414 | * emacs-lisp/debug.el (debugger-setup-buffer): Put point on the | ||
| 415 | previous line (bug#15101). | ||
| 416 | (debugger-eval-expression, debugger-record-expression): | ||
| 417 | Use read--expression (bug#15102). | ||
| 418 | |||
| 419 | 2013-08-15 Michael Albinus <michael.albinus@gmx.de> | ||
| 420 | |||
| 421 | Remove byte compiler warnings, visible when compiling with | ||
| 422 | `byte-compile-force-lexical-warnings' set to t. | ||
| 423 | |||
| 424 | * net/tramp.el (tramp-debug-message, tramp-message, tramp-error) | ||
| 425 | (tramp-error-with-buffer): Rename ARGS to ARGUMENTS and BUFFER to BUF. | ||
| 426 | (tramp-handle-unhandled-file-name-directory) | ||
| 427 | (tramp-handle-file-notify-add-watch, tramp-action-login) | ||
| 428 | (tramp-action-succeed, tramp-action-permission-denied) | ||
| 429 | (tramp-action-terminal, tramp-action-process-alive): Prefix unused | ||
| 430 | arguments with "_". | ||
| 431 | |||
| 432 | * net/tramp-adb.el (tramp-adb-parse-device-names) | ||
| 433 | (tramp-adb-handle-insert-directory, tramp-adb-handle-delete-file) | ||
| 434 | (tramp-adb-handle-copy-file): Prefix unused arguments with "_". | ||
| 435 | (tramp-adb-handle-file-truename): Remove unused arguments. | ||
| 436 | |||
| 437 | * net/tramp-cache.el (tramp-flush-directory-property) | ||
| 438 | (tramp-flush-connection-property, tramp-list-connections) | ||
| 439 | (tramp-parse-connection-properties): Prefix unused arguments with "_". | ||
| 440 | |||
| 441 | * net/tramp-compat.el (tramp-compat-make-temp-file): | ||
| 442 | Rename FILENAME to F. | ||
| 443 | |||
| 444 | * net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch) | ||
| 445 | (tramp-gvfs-handle-write-region, tramp-bluez-parse-device-names) | ||
| 446 | (tramp-zeroconf-parse-workstation-device-names) | ||
| 447 | (tramp-zeroconf-parse-webdav-device-names) | ||
| 448 | (tramp-synce-parse-device-names): Prefix unused arguments with "_". | ||
| 449 | |||
| 450 | * net/tramp-gw.el (tramp-gw-gw-proc-sentinel) | ||
| 451 | (tramp-gw-aux-proc-sentinel): Prefix unused arguments with "_". | ||
| 452 | |||
| 453 | * net/tramp-sh.el (tramp-sh-handle-file-truename): Remove unused | ||
| 454 | arguments. | ||
| 455 | (tramp-sh-handle-copy-file, tramp-sh-handle-dired-compress-file) | ||
| 456 | (tramp-sh-handle-insert-file-contents-literally) | ||
| 457 | (tramp-sh-handle-file-notify-add-watch): Prefix unused arguments | ||
| 458 | with "_". | ||
| 459 | (tramp-do-copy-or-rename-file, tramp-barf-if-no-shell-prompt): | ||
| 460 | Remove unused variables. | ||
| 461 | |||
| 462 | * net/tramp-smb.el (tramp-smb-handle-copy-directory) | ||
| 463 | (tramp-smb-handle-copy-file, tramp-smb-handle-delete-file) | ||
| 464 | (tramp-smb-read-file-entry): Prefix unused arguments with "_". | ||
| 465 | |||
| 466 | * net/tramp-uu.el (tramp-uu-b64-alphabet, tramp-uu-b64-char-to-byte): | ||
| 467 | Make them a defconst. | ||
| 468 | (tramp-uuencode-region): Remove unused variable. | ||
| 469 | |||
| 470 | 2013-08-14 Juanma Barranquero <lekktu@gmail.com> | ||
| 471 | |||
| 472 | * frameset.el (frameset--prop-setter): New function. | ||
| 473 | (frameset-prop): Add gv-setter declaration. | ||
| 474 | (frameset-filter-minibuffer): Deal with the case that the minibuffer | ||
| 475 | parameter was already set in FILTERED. Doc fix. | ||
| 476 | (frameset--record-minibuffer-relationships): Allow saving a | ||
| 477 | minibufferless frame without its corresponding minibuffer frame. | ||
| 478 | (frameset--reuse-frame): Accept a match from an orphaned minibufferless | ||
| 479 | frame, if the frame id matches. | ||
| 480 | (frameset--minibufferless-last-p): Sort non-orphaned minibufferless | ||
| 481 | frames before orphaned ones. | ||
| 482 | (frameset-restore): Warn about orphaned windows, instead of error out. | ||
| 483 | |||
| 484 | 2013-08-14 Martin Rudalics <rudalics@gmx.at> | ||
| 485 | |||
| 486 | * window.el (window-make-atom): Don't overwrite parameter | ||
| 487 | already present. | ||
| 488 | (display-buffer-in-atom-window): Handle special case where we | ||
| 489 | split an already atomic window. | ||
| 490 | (window--major-non-side-window, display-buffer-in-side-window) | ||
| 491 | (window--side-check): Ignore minibuffer window when walking | ||
| 492 | window tree. | ||
| 493 | (window-deletable-p): Return 'frame only if no other frame uses | ||
| 494 | our minibuffer window. | ||
| 495 | (record-window-buffer): Run buffer-list-update-hook. | ||
| 496 | (split-window): Make sure window--check-frame won't destroy an | ||
| 497 | existing atomic window in case the new window gets nested | ||
| 498 | inside. | ||
| 499 | (display-buffer-at-bottom): Ignore minibuffer window when | ||
| 500 | walking window tree. Don't split a side window. | ||
| 501 | (pop-to-buffer): Don't set-buffer here, the select-window call | ||
| 502 | should do that. | ||
| 503 | (mouse-autoselect-window-select): Autoselect only if we are in the | ||
| 504 | text portion of the window. | ||
| 505 | |||
| 506 | 2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 507 | |||
| 508 | * net/shr.el (shr-parse-image-data): New function to grab both the | ||
| 509 | data itself and the Content-Type. | ||
| 510 | (shr-put-image): Use it. | ||
| 511 | |||
| 512 | * net/eww.el (eww-display-image): Ditto. | ||
| 513 | |||
| 514 | * image.el (image-content-type-suffixes): New variable. | ||
| 515 | |||
| 516 | 2013-08-13 Fabián Ezequiel Gallina <fgallina@gnu.org> | ||
| 517 | |||
| 518 | * progmodes/python.el (python-imenu--build-tree) | ||
| 519 | (python-imenu--put-parent): Simplify and Fix (GH bug 146). | ||
| 520 | |||
| 521 | 2013-08-13 Xue Fuqiao <xfq.free@gmail.com> | ||
| 522 | |||
| 523 | * simple.el (backward-word): Mention the optional argument. | ||
| 524 | |||
| 525 | 2013-08-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 526 | |||
| 527 | * frameset.el (frameset--make): Rename constructor from make-frameset. | ||
| 528 | (frameset-p, frameset-valid-p): Don't autoload. | ||
| 529 | (frameset-valid-p): Use normal accessors. | ||
| 530 | |||
| 531 | 2013-08-13 Glenn Morris <rgm@gnu.org> | ||
| 532 | |||
| 533 | * progmodes/compile.el (compile-command): Tweak example in doc. | ||
| 534 | * obsolete/scribe.el (scribe-mode): | ||
| 535 | * progmodes/mixal-mode.el (mixal-mode): Quote buffer name. (Bug#15053) | ||
| 536 | |||
| 537 | * mail/feedmail.el (feedmail-confirm-outgoing) | ||
| 538 | (feedmail-display-full-frame, feedmail-deduce-bcc-where): Fix types. | ||
| 539 | |||
| 540 | * cus-start.el (truncate-partial-width-windows): Fix type. | ||
| 541 | |||
| 542 | * emulation/viper-init.el (viper-search-scroll-threshold): Fix type. | ||
| 543 | |||
| 544 | * net/shr.el (shr-table-horizontal-line): Fix custom type. | ||
| 545 | |||
| 546 | 2013-08-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 547 | |||
| 548 | * emacs-lisp/timer.el (timer--time-setter): New function. | ||
| 549 | (timer--time): Use it as gv-setter. | ||
| 550 | |||
| 551 | * emacs-lisp/gv.el (gv-define-simple-setter): Output warning when | ||
| 552 | setter is not a symbol. | ||
| 553 | |||
| 554 | 2013-08-12 Grégoire Jadi <daimrod@gmail.com> | ||
| 555 | |||
| 556 | * mail/sendmail.el (sendmail-send-it): Don't kill the error buffer | ||
| 557 | if sending fails. This makes debugging easier. | ||
| 558 | |||
| 559 | 2013-08-12 Juanma Barranquero <lekktu@gmail.com> | ||
| 560 | |||
| 561 | * xml.el (xml-parse-tag-1): Use looking-at (this reverts change in | ||
| 562 | 2013-08-11T00:07:48Z!lekktu@gmail.com, which breaks the test suite). | ||
| 563 | https://lists.gnu.org/archive/html/emacs-devel/2013-08/msg00263.html | ||
| 564 | |||
| 565 | 2013-08-12 Eli Zaretskii <eliz@gnu.org> | ||
| 566 | |||
| 567 | * term/w32-win.el (dynamic-library-alist): Add DLLs for zlib. | ||
| 568 | |||
| 569 | 2013-08-12 Glenn Morris <rgm@gnu.org> | ||
| 570 | |||
| 571 | * format.el (format-annotate-function): | ||
| 572 | Handle read-only text properties in the source. (Bug#14887) | ||
| 573 | |||
| 574 | 2013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 575 | |||
| 576 | * net/eww.el (eww-display-html): Ignore coding system errors. | ||
| 577 | One web site uses "utf-8lias" as the coding system. | ||
| 578 | |||
| 579 | 2013-08-11 Juanma Barranquero <lekktu@gmail.com> | ||
| 580 | |||
| 581 | * frameset.el (frameset-valid-p): Fix check; STATES can indeed be nil. | ||
| 582 | |||
| 583 | 2013-08-10 Juanma Barranquero <lekktu@gmail.com> | ||
| 584 | |||
| 585 | * tutorial.el (tutorial--describe-nonstandard-key): Use string-match-p. | ||
| 586 | (tutorial--detailed-help): Remove unused local variables. | ||
| 587 | (tutorial--save-tutorial-to): Use ignore-errors. | ||
| 588 | (help-with-tutorial): Use looking-at-p. | ||
| 589 | |||
| 590 | * view.el (view-buffer-other-window, view-buffer-other-frame): | ||
| 591 | Mark unused arguments. | ||
| 592 | |||
| 593 | * woman.el (woman-parse-colon-path, woman-parse-colon-path) | ||
| 594 | (woman-select-symbol-fonts, woman, woman-find-file) | ||
| 595 | (woman-insert-file-contents, woman-non-underline-faces): | ||
| 596 | Use string-match-p. | ||
| 597 | (woman1-unquote): Move declaration. | ||
| 598 | |||
| 599 | * xml.el (xml-parse-tag-1, xml-parse-string): Use looking-at-p. | ||
| 600 | (xml-parse-dtd): Use looking-at-p, string-match-p. Mark unused | ||
| 601 | argument. Remove unused local variable. | ||
| 602 | (xml-parse-elem-type): Use string-match-p. | ||
| 603 | (xml-substitute-numeric-entities): Use ignore-errors. | ||
| 604 | |||
| 605 | * calculator.el (calculator): Mark unused argument. | ||
| 606 | (calculator-paste, calculator-quit, calculator-integer-p): | ||
| 607 | Use ignore-errors. | ||
| 608 | (calculator-string-to-number, calculator-decimal, calculator-exp) | ||
| 609 | (calculator-op-or-exp): Use string-match-p. | ||
| 610 | |||
| 611 | * dired.el (dired-buffer-more-recently-used-p): Declare. | ||
| 612 | (dired-insert-set-properties, dired-insert-old-subdirs): | ||
| 613 | Use ignore-errors. | ||
| 614 | |||
| 615 | * dired-aux.el (dired-compress): Use ignore-errors. | ||
| 616 | (dired-do-chxxx, dired-do-chmod, dired-trample-file-versions) | ||
| 617 | (dired-do-async-shell-command, dired-do-shell-command) | ||
| 618 | (dired-shell-stuff-it, dired-compress-file, dired-insert-subdir) | ||
| 619 | (dired-insert-subdir-validate): Use string-match-p. | ||
| 620 | (dired-map-dired-file-lines, dired-subdir-hidden-p): Use looking-at-p. | ||
| 621 | (dired-add-entry): Use string-match-p, looking-at-p. | ||
| 622 | (dired-insert-subdir-newpos): Remove unused local variable. | ||
| 623 | |||
| 624 | * filenotify.el (file-notify-callback): Remove unused local variable. | ||
| 625 | |||
| 626 | * filesets.el (filesets-error): Mark unused argument. | ||
| 627 | (filesets-which-command-p, filesets-filter-dir-names) | ||
| 628 | (filesets-directory-files, filesets-get-external-viewer) | ||
| 629 | (filesets-ingroup-get-data): Use string-match-p. | ||
| 630 | |||
| 631 | * find-file.el (ff-other-file-name, ff-other-file-name) | ||
| 632 | (ff-find-the-other-file, ff-cc-hh-converter): | ||
| 633 | Remove unused local variables. | ||
| 634 | (ff-get-file-name): Use string-match-p. | ||
| 635 | (ff-all-dirs-under): Use ignore-errors. | ||
| 636 | |||
| 637 | * follow.el (follow-comint-scroll-to-bottom): Mark unused argument. | ||
| 638 | (follow-select-if-visible): Remove unused local variable. | ||
| 639 | |||
| 640 | * forms.el (read-file-filter): Move declaration. | ||
| 641 | (forms--make-format, forms--make-parser, forms-insert-record): | ||
| 642 | Quote function with #'. | ||
| 643 | (forms--update): Use string-match-p. Quote function with #'. | ||
| 644 | |||
| 645 | * help-mode.el (help-dir-local-var-def): Mark unused argument. | ||
| 646 | (help-make-xrefs): Use looking-at-p. | ||
| 647 | (help-xref-on-pp): Use looking-at-p, ignore-errors. | ||
| 648 | |||
| 649 | * ibuffer.el (ibuffer-ext-visible-p): Declare. | ||
| 650 | (ibuffer-confirm-operation-on): Use string-match-p. | ||
| 651 | |||
| 652 | * msb.el (msb-item-handler, msb-dired-item-handler): | ||
| 653 | Mark unused arguments. | ||
| 654 | |||
| 655 | * ses.el (ses-decode-cell-symbol) | ||
| 656 | (ses-kill-override): Remove unused local variable. | ||
| 657 | (ses-create-cell-variable, ses-relocate-formula): Use string-match-p. | ||
| 658 | (ses-load): Use ignore-errors, looking-at-p. | ||
| 659 | (ses-jump-safe): Use ignore-errors. | ||
| 660 | (ses-export-tsv, ses-export-tsf, ses-unsafe): Mark unused arguments. | ||
| 661 | |||
| 662 | * tabify.el (untabify, tabify): Mark unused arguments. | ||
| 663 | |||
| 664 | * thingatpt.el (thing-at-point--bounds-of-well-formed-url): | ||
| 665 | Mark unused argument. | ||
| 666 | (bounds-of-thing-at-point, thing-at-point-bounds-of-list-at-point) | ||
| 667 | (thing-at-point-newsgroup-p, form-at-point): Use ignore-errors. | ||
| 668 | |||
| 669 | * emacs-lisp/timer.el (timer--time): Define setter with | ||
| 670 | gv-define-setter to avoid deprecation warning. | ||
| 671 | |||
| 672 | * completion.el: Remove stuff unused since revno:3176 (1993-05-27). | ||
| 673 | (*record-cmpl-statistics-p*): Remove (was commented out). | ||
| 674 | (cmpl-statistics-block): Remove (body was commented out). | ||
| 675 | All callers changed. | ||
| 676 | (add-completions-from-buffer, load-completions-from-file): | ||
| 677 | Remove unused variables. | ||
| 678 | |||
| 679 | 2013-08-09 Juanma Barranquero <lekktu@gmail.com> | ||
| 680 | |||
| 681 | * filecache.el (file-cache-delete-file-list): | ||
| 682 | Print message only when told so. | ||
| 683 | (file-cache-files-matching): Use #' in mapconcat argument. | ||
| 684 | |||
| 685 | * ffap.el (ffap-url-at-point): Fix reference to variable | ||
| 686 | thing-at-point-default-mail-uri-scheme. | ||
| 687 | |||
| 688 | 2013-08-09 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 689 | |||
| 690 | * subr.el (define-error): New function. | ||
| 691 | * progmodes/ada-xref.el (ada-error-file-not-found): Rename from | ||
| 692 | error-file-not-found and define with define-error. | ||
| 693 | * emacs-lisp/cl-lib.el (cl-assertion-failed): Move here from subr.el | ||
| 694 | and define with define-error. | ||
| 695 | * userlock.el (file-locked, file-supersession): | ||
| 696 | * simple.el (mark-inactive): | ||
| 697 | * progmodes/js.el (js-moz-bad-rpc, js-js-error): | ||
| 698 | * progmodes/ada-mode.el (ada-mode-errors): | ||
| 699 | * play/life.el (life-extinct): | ||
| 700 | * nxml/xsd-regexp.el (xsdre-invalid-regexp, xsdre-parse-error): | ||
| 701 | * nxml/xmltok.el (xmltok-markup-declaration-parse-error): | ||
| 702 | * nxml/rng-util.el (rng-error): | ||
| 703 | * nxml/rng-uri.el (rng-uri-error): | ||
| 704 | * nxml/rng-match.el (rng-compile-error): | ||
| 705 | * nxml/rng-cmpct.el (rng-c-incorrect-schema): | ||
| 706 | * nxml/nxml-util.el (nxml-error, nxml-file-parse-error): | ||
| 707 | * nxml/nxml-rap.el (nxml-scan-error): | ||
| 708 | * nxml/nxml-outln.el (nxml-outline-error): | ||
| 709 | * net/soap-client.el (soap-error): | ||
| 710 | * net/gnutls.el (gnutls-error): | ||
| 711 | * net/ange-ftp.el (ftp-error): | ||
| 712 | * mpc.el (mpc-proc-error): | ||
| 713 | * json.el (json-error, json-readtable-error, json-unknown-keyword) | ||
| 714 | (json-number-format, json-string-escape, json-string-format) | ||
| 715 | (json-key-format, json-object-format): | ||
| 716 | * jka-compr.el (compression-error): | ||
| 717 | * international/quail.el (quail-error): | ||
| 718 | * international/kkc.el (kkc-error): | ||
| 719 | * emacs-lisp/ert.el (ert-test-failed): | ||
| 720 | * calc/calc.el (calc-error, inexact-result, math-overflow) | ||
| 721 | (math-underflow): | ||
| 722 | * bookmark.el (bookmark-error-no-filename): | ||
| 723 | * epg.el (epg-error): Define with define-error. | ||
| 724 | |||
| 725 | * time.el (display-time-event-handler) | ||
| 726 | (display-time-next-load-average): Don't call sit-for since it seems | ||
| 727 | unnecessary (bug#15045). | ||
| 728 | |||
| 729 | * emacs-lisp/checkdoc.el: Remove redundant :group keywords. | ||
| 730 | Use #' instead of ' to quote functions. | ||
| 731 | (checkdoc-output-mode): Use setq-local. | ||
| 732 | (checkdoc-spellcheck-documentation-flag, checkdoc-ispell-lisp-words) | ||
| 733 | (checkdoc-verb-check-experimental-flag, checkdoc-proper-noun-regexp) | ||
| 734 | (checkdoc-common-verbs-regexp): Mark safe-local-variable (bug#15010). | ||
| 735 | (checkdoc-ispell, checkdoc-ispell-current-buffer) | ||
| 736 | (checkdoc-ispell-interactive, checkdoc-ispell-message-interactive) | ||
| 737 | (checkdoc-ispell-message-text, checkdoc-ispell-start) | ||
| 738 | (checkdoc-ispell-continue, checkdoc-ispell-comments) | ||
| 739 | (checkdoc-ispell-defun): Remove unused arg `take-notes'. | ||
| 740 | |||
| 741 | * ido.el (ido-completion-help): Fix up compiler warning. | ||
| 742 | |||
| 743 | 2013-08-09 Juanma Barranquero <lekktu@gmail.com> | ||
| 744 | |||
| 745 | * frameset.el (frameset-p): Add autoload cookie. | ||
| 746 | (frameset--jump-to-register): New function, based on code moved from | ||
| 747 | register.el. | ||
| 748 | (frameset-to-register): Move from register.el. Adapt to `registerv'. | ||
| 749 | |||
| 750 | * register.el (frameset-frame-id, frameset-frame-with-id, frameset-p) | ||
| 751 | (frameset-restore, frameset-save, frameset-session-filter-alist): | ||
| 752 | Remove declarations. | ||
| 753 | (register-alist): Doc fix. | ||
| 754 | (frameset-to-register): Move to frameset.el. | ||
| 755 | (jump-to-register, describe-register-1): Remove frameset-specific code. | ||
| 756 | |||
| 757 | 2013-08-08 Juanma Barranquero <lekktu@gmail.com> | ||
| 758 | |||
| 759 | * allout-widgets.el (allout-widgets-pre-command-business) | ||
| 760 | (allout-widgets-post-command-business) | ||
| 761 | (allout-widgets-after-change-handler) | ||
| 762 | (allout-decorate-item-and-context, allout-set-boundary-marker) | ||
| 763 | (allout-body-modification-handler) | ||
| 764 | (allout-graphics-modification-handler): Mark ignored arguments. | ||
| 765 | (allout-widgets-post-command-business) | ||
| 766 | (allout-widgets-exposure-change-processor) | ||
| 767 | (allout-widgets-exposure-undo-processor) | ||
| 768 | (allout-decorate-item-and-context, allout-redecorate-visible-subtree) | ||
| 769 | (allout-parse-item-at-point, allout-decorate-item-guides) | ||
| 770 | (allout-decorate-item-cue, allout-item-span): Remove unused variables. | ||
| 771 | * allout.el (epa-passphrase-callback-function): Declare. | ||
| 772 | (allout-overlay-insert-in-front-handler) | ||
| 773 | (allout-overlay-interior-modification-handler) | ||
| 774 | (allout-isearch-end-handler, allout-chart-siblings) | ||
| 775 | (allout-up-current-level, allout-end-of-level, allout-reindent-body) | ||
| 776 | (allout-yank-processing, allout-process-exposed) | ||
| 777 | (allout-latex-verb-quote, allout-latexify-one-item, outlineify-sticky) | ||
| 778 | (allout-latex-verbatim-quote-curr-line): Remove unused variables. | ||
| 779 | * emacs-lisp/lisp-mode.el (lisp-eval-defun, last-sexp-toggle-display) | ||
| 780 | (lisp-indent-defform): Mark ignored arguments. | ||
| 781 | (lisp-indent-line): Mark ignored arguments. Remove unused variables. | ||
| 782 | (calculate-lisp-indent): Remove unused variables. | ||
| 783 | * international/characters.el (indian-2-column, arabic-2-column) | ||
| 784 | (tibetan): Mark ignored arguments. | ||
| 785 | (use-cjk-char-width-table): Mark ignored arguments. | ||
| 786 | Remove unused variables. | ||
| 787 | * international/fontset.el (build-default-fontset-data) | ||
| 788 | (x-compose-font-name, create-fontset-from-fontset-spec): | ||
| 789 | Mark ignored arguments. | ||
| 790 | (fontset-plain-name): Remove unused variables. | ||
| 791 | * international/mule.el (charset-id, charset-bytes, generic-char-p) | ||
| 792 | (keyboard-coding-system): Mark ignored arguments. | ||
| 793 | (find-auto-coding): Remove unused variables. Use `ignore-errors'. | ||
| 794 | * help.el (resize-temp-buffer-window): | ||
| 795 | * window.el (display-buffer-in-major-side-window) | ||
| 796 | (display-buffer-in-side-window, display-buffer-in-previous-window): | ||
| 797 | Remove unused variables. | ||
| 798 | * isearch.el (isearch-forward-symbol): | ||
| 799 | * version.el (emacs-bzr-version-bzr): | ||
| 800 | * international/mule-cmds.el (current-language-environment): | ||
| 801 | * term/common-win.el (x-handle-iconic, x-handle-geometry) | ||
| 802 | (x-handle-display): | ||
| 803 | * term/pc-win.el (x-list-fonts, x-display-planes) | ||
| 804 | (x-display-color-cells, x-server-max-request-size, x-server-vendor) | ||
| 805 | (x-server-version, x-display-screens, x-display-mm-height) | ||
| 806 | (x-display-mm-width, x-display-backing-store, x-display-visual-class) | ||
| 807 | (x-selection-owner-p, x-own-selection-internal) | ||
| 808 | (x-disown-selection-internal, x-get-selection-internal) | ||
| 809 | (msdos-initialize-window-system): | ||
| 810 | * term/tty-colors.el (tty-color-alist, tty-color-clear): | ||
| 811 | * term/x-win.el (x-handle-no-bitmap-icon): | ||
| 812 | * vc/vc-hooks.el (vc-mode, vc-default-make-version-backups-p) | ||
| 813 | (vc-default-find-file-hook, vc-default-extra-menu): | ||
| 814 | Mark ignored arguments. | ||
| 815 | |||
| 816 | 2013-08-08 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 817 | |||
| 818 | * emacs-lisp/edebug.el (edebug-debugger): Use edebug-eval to run the | ||
| 819 | break-condition in the context of the debugged code (bug#12685). | ||
| 820 | |||
| 821 | 2013-08-08 Christopher Schmidt <christopher@ch.ristopher.com> | ||
| 822 | |||
| 823 | * comint.el: | ||
| 824 | Do not use an overlay to highlight the last prompt. (Bug#14744) | ||
| 825 | (comint-mode): Make comint-last-prompt buffer local. | ||
| 826 | (comint-last-prompt): New variable. | ||
| 827 | (comint-last-prompt-overlay): Remove. Superseded by | ||
| 828 | comint-last-prompt. | ||
| 829 | (comint-snapshot-last-prompt, comint-output-filter): | ||
| 830 | Use comint-last-prompt. | ||
| 831 | |||
| 832 | 2013-08-08 Juanma Barranquero <lekktu@gmail.com> | ||
| 833 | |||
| 834 | * frameset.el (frameset-valid-p): Check vector length. Doc fix. | ||
| 835 | (frameset-save): Check validity of the resulting frameset. | ||
| 836 | |||
| 837 | 2013-08-08 Xue Fuqiao <xfq.free@gmail.com> | ||
| 838 | |||
| 839 | * ido.el (ido-record-command): Add doc string. | ||
| 840 | |||
| 841 | 2013-08-08 Juanma Barranquero <lekktu@gmail.com> | ||
| 842 | |||
| 843 | * frameset.el (frameset): Do not disable creation of the default | ||
| 844 | frameset-p predicate. Doc fix. | ||
| 845 | (frameset-valid-p): New function, copied from the old predicate-p. | ||
| 846 | Add additional checks. | ||
| 847 | (frameset-restore): Check with frameset-valid-p. | ||
| 848 | (frameset-p, frameset-version, frameset-timestamp, frameset-app) | ||
| 849 | (frameset-name, frameset-description, frameset-properties) | ||
| 850 | (frameset-states): Add docstring. | ||
| 851 | (frameset-session-filter-alist, frameset-persistent-filter-alist) | ||
| 852 | (frameset-filter-alist): Doc fixes. | ||
| 853 | |||
| 854 | 2013-08-08 Juanma Barranquero <lekktu@gmail.com> | ||
| 855 | |||
| 856 | * frameset.el (frameset-p, frameset-prop): Doc fixes. | ||
| 857 | |||
| 858 | 2013-08-08 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 859 | |||
| 860 | * emacs-lisp/bytecomp.el (byte-compile-function-warn): New function, | ||
| 861 | extracted from byte-compile-callargs-warn and byte-compile-normal-call. | ||
| 862 | (byte-compile-callargs-warn, byte-compile-function-form): Use it. | ||
| 863 | (byte-compile-normal-call): Remove obsolescence check. | ||
| 864 | |||
| 865 | 2013-08-08 Juanma Barranquero <lekktu@gmail.com> | ||
| 866 | |||
| 867 | * frameset.el (frameset-restore): Doc fix. | ||
| 868 | |||
| 869 | * register.el (frameset-frame-id, frameset-frame-with-id) | ||
| 870 | (frameset-p, frameset-restore, frameset-save): Declare. | ||
| 871 | (register-alist): Document framesets. | ||
| 872 | (frameset-session-filter-alist): Declare. | ||
| 873 | (frameset-to-register): New function. | ||
| 874 | (jump-to-register): Implement jumping to framesets. Doc fix. | ||
| 875 | (describe-register-1): Describe framesets. | ||
| 876 | |||
| 877 | * bindings.el (ctl-x-r-map): Bind ?f to frameset-to-register. | ||
| 878 | |||
| 879 | 2013-08-07 Juanma Barranquero <lekktu@gmail.com> | ||
| 880 | |||
| 881 | * desktop.el (desktop-save-frameset): Use new frameset-save args. | ||
| 882 | Use lexical-binding. | ||
| 883 | |||
| 884 | * frameset.el (frameset): Use type vector, not list (incompatible | ||
| 885 | change). Do not declare a new constructor, use the default one. | ||
| 886 | Upgrade suggested properties `app', `name' and `desc' to slots `app', | ||
| 887 | `name' and `description', respectively, and add read-only slot | ||
| 888 | `timestamp'. Doc fixes. | ||
| 889 | (frameset-copy, frameset-persistent-filter-alist) | ||
| 890 | (frameset-filter-alist, frameset-switch-to-gui-p) | ||
| 891 | (frameset-switch-to-tty-p, frameset-filter-tty-to-GUI) | ||
| 892 | (frameset-filter-sanitize-color, frameset-filter-minibuffer) | ||
| 893 | (frameset-filter-iconified, frameset-keep-original-display-p): | ||
| 894 | Doc fixes. | ||
| 895 | (frameset-filter-shelve-param, frameset-filter-unshelve-param): | ||
| 896 | Rename from frameset-filter-(save|restore)-param. All callers changed. | ||
| 897 | Doc fix. | ||
| 898 | (frameset-p): Adapt to change to vector and be more thorough. | ||
| 899 | Change arg name to OBJECT. Doc fix. | ||
| 900 | (frameset-prop): Rename arg PROP to PROPERTY. Doc fix. | ||
| 901 | (frameset-session-filter-alist): Rename from frameset-live-filter-alist. | ||
| 902 | All callers changed. | ||
| 903 | (frameset-frame-with-id): Rename from frameset-locate-frame-id. | ||
| 904 | All callers changed. | ||
| 905 | (frameset--record-minibuffer-relationships): Rename from | ||
| 906 | frameset--process-minibuffer-frames. All callers changed. | ||
| 907 | (frameset-save): Add new keyword arguments APP, NAME and DESCRIPTION. | ||
| 908 | Use new default constructor (again). Doc fix. | ||
| 909 | (frameset--find-frame-if): Rename from `frameset--find-frame. | ||
| 910 | All callers changed. | ||
| 911 | (frameset--reuse-frame): Rename arg FRAME-CFG to PARAMETERS. | ||
| 912 | (frameset--initial-params): Rename arg FRAME-CFG to PARAMETERS. | ||
| 913 | Doc fix. | ||
| 914 | (frameset--restore-frame): Rename args FRAME-CFG and WINDOW-CFG to | ||
| 915 | PARAMETERS and WINDOW-STATE, respectively. | ||
| 916 | (frameset-restore): Add new keyword argument PREDICATE. | ||
| 917 | Reset frameset--target-display to nil. Doc fix. | ||
| 918 | |||
| 919 | 2013-08-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 920 | |||
| 921 | * progmodes/bat-mode.el (bat--syntax-propertize): New var. | ||
| 922 | (bat-mode): Use it. | ||
| 923 | (bat-mode-syntax-table): Mark \n as end-of-comment. | ||
| 924 | (bat-font-lock-keywords): Remove comment rule. | ||
| 925 | |||
| 926 | * progmodes/bat-mode.el: Rename from dos.el. Use "bat-" prefix. | ||
| 927 | (dos-mode-help): Remove. Use describe-mode (C-h m) instead. | ||
| 928 | |||
| 929 | * emacs-lisp/bytecomp.el: Check existence of f in #'f. | ||
| 930 | (byte-compile-callargs-warn): Use `push'. | ||
| 931 | (byte-compile-arglist-warn): Ignore higher-order "calls". | ||
| 932 | (byte-compile-file-form-autoload): Use `pcase'. | ||
| 933 | (byte-compile-function-form): If quoting a symbol, check that it exists. | ||
| 934 | |||
| 935 | 2013-08-07 Eli Zaretskii <eliz@gnu.org> | ||
| 936 | |||
| 937 | * progmodes/dos.el (dos-font-lock-keywords): Rename LINUX to UNIX | ||
| 938 | and add a few popular commands found in batch files. | ||
| 939 | (dos, dos-label-face, dos-cmd-help, dos-run, dos-run-args) | ||
| 940 | (dos-mode): Doc fixes. | ||
| 941 | |||
| 942 | 2013-08-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 943 | |||
| 944 | * progmodes/dos.el (auto-mode-alist): Add entries for dos-mode. | ||
| 945 | (dos-mode): Use setq-local. Add space after "rem". | ||
| 946 | (dos-mode-syntax-table): Don't use "w" for symbol chars. | ||
| 947 | (dos-font-lock-keywords): Try to adjust font-lock rules accordingly. | ||
| 948 | |||
| 949 | 2013-08-07 Arni Magnusson <arnima@hafro.is> | ||
| 950 | |||
| 951 | * progmodes/dos.el: New file. | ||
| 952 | * generic-x.el (bat-generic-mode): Redefine as an obsolete alias to | ||
| 953 | dos-mode. | ||
| 954 | |||
| 955 | 2013-08-06 Glenn Morris <rgm@gnu.org> | ||
| 956 | |||
| 957 | * calendar/calendar.el: Add new faces, and day-header-array. | ||
| 958 | (calendar-weekday-header, calendar-weekend-header) | ||
| 959 | (calendar-month-header): New faces. | ||
| 960 | (calendar-day-header-construct): New function. | ||
| 961 | (calendar-day-header-width): Also :set calendar-day-header-array. | ||
| 962 | (calendar-american-month-header, calendar-european-month-header) | ||
| 963 | (calendar-iso-month-header): Use calendar- faces. | ||
| 964 | (calendar-generate-month): | ||
| 965 | Use calendar-day-header-array for day headers; apply faces to them. | ||
| 966 | (calendar-mode): Check calendar-font-lock-keywords non-nil. | ||
| 967 | (calendar-abbrev-construct): Add optional maxlen argument. | ||
| 968 | (calendar-day-name-array): Doc fix. | ||
| 969 | (calendar-day-name-array, calendar-abbrev-length) | ||
| 970 | (calendar-day-abbrev-array): | ||
| 971 | Also :set calendar-day-header-array, and maybe redraw. | ||
| 972 | (calendar-day-header-array): New option. (Bug#15007) | ||
| 973 | (calendar-font-lock-keywords): Set to nil and make obsolete. | ||
| 974 | (calendar-day-name): Add option to use header array. | ||
| 975 | |||
| 976 | 2013-08-06 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 977 | |||
| 978 | * net/shr.el (shr-render-td): Remove debugging. | ||
| 979 | (shr-render-td): Make width computation consistent by defaulting | ||
| 980 | all zero-width columns to 10 characters. This may not be optimal, | ||
| 981 | but it's at least consistent. | ||
| 982 | (shr-make-table-1): Redo last change to fix the real problem in | ||
| 983 | colspan handling. | ||
| 984 | |||
| 985 | 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 986 | |||
| 987 | * files.el (cache-long-line-scans): | ||
| 988 | Make obsolete alias to `cache-long-scans'. | ||
| 989 | |||
| 990 | 2013-08-06 Juanma Barranquero <lekktu@gmail.com> | ||
| 991 | |||
| 992 | * frameset.el (frameset, frameset-filter-alist) | ||
| 993 | (frameset-filter-params, frameset-save, frameset--reuse-frame) | ||
| 994 | (frameset--minibufferless-last-p, frameset-restore): Doc fixes. | ||
| 995 | (frameset-compute-pos): Rename from frameset--compute-pos, | ||
| 996 | and add docstring. | ||
| 997 | (frameset-move-onscreen): Use frameset-compute-pos. | ||
| 998 | Most changes suggested by Drew Adams <drew.adams@oracle.com>. | ||
| 999 | |||
| 1000 | * find-lisp.el (find-lisp-line-indent, find-lisp-find-dired-filter): | ||
| 1001 | Fix typos in docstrings. | ||
| 1002 | |||
| 1003 | 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 1004 | |||
| 1005 | * frame.el (get-other-frame): Tiny cleanup. | ||
| 1006 | |||
| 1007 | 2013-08-06 Juanma Barranquero <lekktu@gmail.com> | ||
| 1008 | |||
| 1009 | * vc/vc.el (vc-default-ignore-completion-table): | ||
| 1010 | Silence byte-compiler warning. | ||
| 1011 | |||
| 1012 | * frameset.el (frameset-p): Don't check non-nullness of the `properties' | ||
| 1013 | slot , which can indeed be nil. | ||
| 1014 | (frameset-live-filter-alist, frameset-persistent-filter-alist): | ||
| 1015 | Move entry for `left' from persistent to live filter alist. | ||
| 1016 | (frameset-filter-alist, frameset--minibufferless-last-p, frameset-save): | ||
| 1017 | Doc fixes. | ||
| 1018 | (frameset-filter-params): When restoring a frame, copy items added to | ||
| 1019 | `filtered', to avoid unwittingly modifying the original parameters. | ||
| 1020 | (frameset-move-onscreen): Rename from frameset--move-onscreen. Doc fix. | ||
| 1021 | (frameset--restore-frame): Fix reference to frameset-move-onscreen. | ||
| 1022 | |||
| 1023 | * dired.el (dired-insert-directory): Revert change in 2013-06-21T12:24:37Z!lekktu@gmail.com | ||
| 1024 | to use looking-at-p instead of looking-at. (Bug#15028) | ||
| 1025 | |||
| 1026 | 2013-08-05 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 1027 | |||
| 1028 | Revert introduction of isearch-filter-predicates (bug#14714). | ||
| 1029 | Rely on add-function instead. | ||
| 1030 | * isearch.el (isearch-filter-predicates): Rename it back to | ||
| 1031 | isearch-filter-predicate. | ||
| 1032 | (isearch-message-prefix): Use advice-function-mapc and advice | ||
| 1033 | properties to get the isearch-message-prefix. | ||
| 1034 | (isearch-search, isearch-lazy-highlight-search): Revert to funcall | ||
| 1035 | instead of run-hook-with-args-until-failure. | ||
| 1036 | (isearch-filter-visible): Not obsolete any more. | ||
| 1037 | * loadup.el: Preload nadvice. | ||
| 1038 | * replace.el (perform-replace): Revert to funcall | ||
| 1039 | instead of run-hook-with-args-until-failure. | ||
| 1040 | * wdired.el (wdired-change-to-wdired-mode): Use add-function. | ||
| 1041 | * dired-aux.el (dired-isearch-filenames-mode): Rename from | ||
| 1042 | dired-isearch-filenames-toggle; make it into a proper minor mode. | ||
| 1043 | Use add/remove-function. | ||
| 1044 | (dired-isearch-filenames-setup, dired-isearch-filenames-end): | ||
| 1045 | Call the minor-mode rather than add/remove-hook. | ||
| 1046 | (dired-isearch-filter-filenames): | ||
| 1047 | Remove isearch-message-prefix property. | ||
| 1048 | * info.el (Info--search-loop): New function, extracted from Info-search. | ||
| 1049 | Funcall isearch-filter-predicate instead of | ||
| 1050 | run-hook-with-args-until-failure isearch-filter-predicates. | ||
| 1051 | (Info-search): Use it. | ||
| 1052 | (Info-mode): Use isearch-filter-predicate instead of | ||
| 1053 | isearch-filter-predicates. | ||
| 1054 | |||
| 1055 | 2013-08-05 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 1056 | |||
| 1057 | Do not call to `selected-window' where it is assumed by default. | ||
| 1058 | Affected functions are `window-minibuffer-p', `window-dedicated-p', | ||
| 1059 | `window-hscroll', `window-width', `window-height', `window-buffer', | ||
| 1060 | `window-frame', `window-start', `window-point', `next-window' | ||
| 1061 | and `window-display-table'. | ||
| 1062 | * abbrev.el (abbrev--default-expand): | ||
| 1063 | * bs.el (bs--show-with-configuration): | ||
| 1064 | * buff-menu.el (Buffer-menu-mouse-select): | ||
| 1065 | * calc/calc.el (calc): | ||
| 1066 | * calendar/calendar.el (calendar-generate-window): | ||
| 1067 | * calendar/diary-lib.el (diary-simple-display, diary-show-all-entries) | ||
| 1068 | (diary-make-entry): | ||
| 1069 | * comint.el (send-invisible, comint-dynamic-complete-filename) | ||
| 1070 | (comint-dynamic-simple-complete, comint-dynamic-list-completions): | ||
| 1071 | * completion.el (complete): | ||
| 1072 | * dabbrev.el (dabbrev-expand, dabbrev--make-friend-buffer-list): | ||
| 1073 | * disp-table.el (describe-current-display-table): | ||
| 1074 | * doc-view.el (doc-view-insert-image): | ||
| 1075 | * ebuff-menu.el (Electric-buffer-menu-mouse-select): | ||
| 1076 | * ehelp.el (with-electric-help): | ||
| 1077 | * emacs-lisp/easy-mmode.el (easy-mmode-define-navigation): | ||
| 1078 | * emacs-lisp/edebug.el (edebug-two-window-p, edebug-pop-to-buffer): | ||
| 1079 | * emacs-lisp/helper.el (Helper-help-scroller): | ||
| 1080 | * emulation/cua-base.el (cua--post-command-handler-1): | ||
| 1081 | * eshell/esh-mode.el (eshell-output-filter): | ||
| 1082 | * ffap.el (ffap-gnus-wrapper): | ||
| 1083 | * help-macro.el (make-help-screen): | ||
| 1084 | * hilit-chg.el (highlight-compare-buffers): | ||
| 1085 | * hippie-exp.el (hippie-expand, try-expand-dabbrev-visible): | ||
| 1086 | * hl-line.el (global-hl-line-highlight): | ||
| 1087 | * icomplete.el (icomplete-simple-completing-p): | ||
| 1088 | * isearch.el (isearch-done): | ||
| 1089 | * jit-lock.el (jit-lock-stealth-fontify): | ||
| 1090 | * mail/rmailsum.el (rmail-summary-scroll-msg-up): | ||
| 1091 | * lisp/mouse-drag.el (mouse-drag-should-do-col-scrolling): | ||
| 1092 | * mpc.el (mpc-tagbrowser, mpc): | ||
| 1093 | * net/rcirc.el (rcirc-any-buffer): | ||
| 1094 | * play/gomoku.el (gomoku-max-width, gomoku-max-height): | ||
| 1095 | * play/landmark.el (landmark-max-width, landmark-max-height): | ||
| 1096 | * play/zone.el (zone): | ||
| 1097 | * progmodes/compile.el (compilation-goto-locus): | ||
| 1098 | * progmodes/ebrowse.el (ebrowse-view/find-file-and-search-pattern): | ||
| 1099 | * progmodes/etags.el (find-tag-other-window): | ||
| 1100 | * progmodes/fortran.el (fortran-column-ruler): | ||
| 1101 | * progmodes/gdb-mi.el (gdb-mouse-toggle-breakpoint-fringe): | ||
| 1102 | * progmodes/verilog-mode.el (verilog-point-text): | ||
| 1103 | * reposition.el (reposition-window): | ||
| 1104 | * rot13.el (toggle-rot13-mode): | ||
| 1105 | * server.el (server-switch-buffer): | ||
| 1106 | * shell.el (shell-dynamic-complete-command) | ||
| 1107 | (shell-dynamic-complete-environment-variable): | ||
| 1108 | * simple.el (insert-buffer, set-selective-display) | ||
| 1109 | (delete-completion-window): | ||
| 1110 | * speedbar.el (speedbar-timer-fn, speedbar-center-buffer-smartly) | ||
| 1111 | (speedbar-recenter): | ||
| 1112 | * startup.el (fancy-splash-head): | ||
| 1113 | * textmodes/ispell.el (ispell-command-loop): | ||
| 1114 | * textmodes/makeinfo.el (makeinfo-compilation-sentinel-region): | ||
| 1115 | * tutorial.el (help-with-tutorial): | ||
| 1116 | * vc/add-log.el (add-change-log-entry): | ||
| 1117 | * vc/compare-w.el (compare-windows): | ||
| 1118 | * vc/ediff-help.el (ediff-indent-help-message): | ||
| 1119 | * vc/ediff-util.el (ediff-setup-control-buffer, ediff-position-region): | ||
| 1120 | * vc/ediff-wind.el (ediff-skip-unsuitable-frames) | ||
| 1121 | (ediff-setup-control-frame): | ||
| 1122 | * vc/emerge.el (emerge-position-region): | ||
| 1123 | * vc/pcvs-util.el (cvs-bury-buffer): | ||
| 1124 | * window.el (walk-windows, mouse-autoselect-window-select): | ||
| 1125 | * winner.el (winner-set-conf, winner-undo): Related users changed. | ||
| 1126 | |||
| 1127 | 2013-08-05 Juanma Barranquero <lekktu@gmail.com> | ||
| 1128 | |||
| 1129 | * frameset.el (frameset--set-id): Doc fix. | ||
| 1130 | (frameset-frame-id, frameset-frame-id-equal-p) | ||
| 1131 | (frameset-locate-frame-id): New functions. | ||
| 1132 | (frameset--process-minibuffer-frames, frameset--reuse-frame) | ||
| 1133 | (frameset-restore): Use them. | ||
| 1134 | |||
| 1135 | 2013-08-05 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 1136 | |||
| 1137 | Do not call to `selected-frame' where it is assumed by default. | ||
| 1138 | Affected functions are `raise-frame', `redraw-frame', | ||
| 1139 | `frame-first-window', `frame-terminal' and `delete-frame'. | ||
| 1140 | * calendar/appt.el (appt-disp-window): | ||
| 1141 | * epg.el (epg-wait-for-completion): | ||
| 1142 | * follow.el (follow-delete-other-windows-and-split) | ||
| 1143 | (follow-avoid-tail-recenter): | ||
| 1144 | * international/mule.el (set-terminal-coding-system): | ||
| 1145 | * mail/rmail.el (rmail-mail-return): | ||
| 1146 | * net/newst-plainview.el (newsticker--buffer-set-uptodate): | ||
| 1147 | * progmodes/f90.el (f90-add-imenu-menu): | ||
| 1148 | * progmodes/idlw-toolbar.el (idlwave-toolbar-toggle): | ||
| 1149 | * server.el (server-switch-buffer): | ||
| 1150 | * simple.el (delete-completion-window): | ||
| 1151 | * talk.el (talk): | ||
| 1152 | * term/xterm.el (terminal-init-xterm-modify-other-keys) | ||
| 1153 | (xterm-turn-on-modify-other-keys, xterm-remove-modify-other-keys): | ||
| 1154 | * vc/ediff-util.el (ediff-status-info, ediff-show-diff-output): | ||
| 1155 | * vc/ediff.el (ediff-documentation): Related users changed. | ||
| 1156 | * frame.el (selected-terminal): Remove the leftover. | ||
| 1157 | |||
| 1158 | 2013-08-05 Glenn Morris <rgm@gnu.org> | ||
| 1159 | |||
| 1160 | * calendar/calendar.el (calendar-generate-month): | ||
| 1161 | Fix for calendar-column-width != 1 + calendar-day-digit-width. | ||
| 1162 | (calendar-generate-month, calendar-font-lock-keywords): | ||
| 1163 | Fix for calendar-day-header-width > length of any day name. | ||
| 1164 | |||
| 1165 | 2013-08-05 Juanma Barranquero <lekktu@gmail.com> | ||
| 1166 | |||
| 1167 | * desktop.el (desktop-clear): Use new name of sort predicate. | ||
| 1168 | |||
| 1169 | * frameset.el (frameset): Add docstring. Move :version property to its | ||
| 1170 | own `version' slot. | ||
| 1171 | (frameset-copy): Rename from copy-frameset. | ||
| 1172 | (frameset-p): Check more thoroughly. | ||
| 1173 | (frameset-prop): Do not check for :version, which is no longer a prop. | ||
| 1174 | (frameset-live-filter-alist, frameset-persistent-filter-alist): | ||
| 1175 | Use new :never value instead of t. | ||
| 1176 | (frameset-filter-alist): Expand and clarify docstring. | ||
| 1177 | (frameset-filter-tty-to-GUI, frameset-filter-sanitize-color) | ||
| 1178 | (frameset-filter-minibuffer, frameset-filter-save-param) | ||
| 1179 | (frameset-filter-restore-param, frameset-filter-iconified): | ||
| 1180 | Add pointer to docstring of frameset-filter-alist. | ||
| 1181 | (frameset-filter-params): Rename filter values to be more meaningful: | ||
| 1182 | :never instead of t, and reverse the meanings of :save and :restore. | ||
| 1183 | (frameset--process-minibuffer-frames): Clarify error message. | ||
| 1184 | (frameset-save): Avoid unnecessary and confusing call to framep. | ||
| 1185 | Use new BOA constructor for framesets. | ||
| 1186 | (frameset--reuse-list): Doc fix. | ||
| 1187 | (frameset--restore-frame): Rename from frameset--get-frame. Doc fix. | ||
| 1188 | (frameset--minibufferless-last-p): Rename from frameset--sort-states. | ||
| 1189 | (frameset-minibufferless-first-p): Doc fix. | ||
| 1190 | Rename from frameset-sort-frames-for-deletion. | ||
| 1191 | (frameset-restore): Doc fixes. Use new function names. | ||
| 1192 | Most changes suggested by Drew Adams <drew.adams@oracle.com>. | ||
| 1193 | |||
| 1194 | 2013-08-04 Juanma Barranquero <lekktu@gmail.com> | ||
| 1195 | |||
| 1196 | * desktop.el (desktop-restore-forces-onscreen) | ||
| 1197 | (desktop-restore-reuses-frames): Document :keyword constant values. | ||
| 1198 | (desktop-filter-parameters-alist): Remove, now identical to | ||
| 1199 | frameset-filter-alist. | ||
| 1200 | (desktop--filter-tty*): Remove, moved to frameset.el. | ||
| 1201 | (desktop-save-frameset, desktop-restore-frameset): | ||
| 1202 | Do not pass :filters argument. | ||
| 1203 | |||
| 1204 | * frameset.el (frameset-live-filter-alist) | ||
| 1205 | (frameset-persistent-filter-alist): New variables. | ||
| 1206 | (frameset-filter-alist): Use them. Add autoload cookie. | ||
| 1207 | (frameset-filter-tty-to-GUI): Move from desktop.el and rename. | ||
| 1208 | (frameset--set-id, frameset--reuse-frame): Rename `frame-id' to | ||
| 1209 | `frameset--id' (it's supposed to be internal to frameset.el). | ||
| 1210 | (frameset--process-minibuffer-frames): Ditto. Doc fix. | ||
| 1211 | (frameset--initial-params): New function. | ||
| 1212 | (frameset--get-frame): Use it. Doc fix. | ||
| 1213 | (frameset--move-onscreen): Accept new PRED value for FORCE-ONSCREEN. | ||
| 1214 | Accept :all, not 'all. | ||
| 1215 | (frameset-restore): Add new predicate values for FORCE-ONSCREEN and | ||
| 1216 | FORCE-DISPLAY. Use :keywords for constant arguments to avoid collision | ||
| 1217 | with fbound symbols. Fix frame id matching, and remove matching ids if | ||
| 1218 | the frame being restored is deleted. Obey :delete. | ||
| 1219 | |||
| 1220 | 2013-08-04 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 1221 | |||
| 1222 | * subr.el (macrop): New function. | ||
| 1223 | (text-clone--maintaining): New var. | ||
| 1224 | (text-clone--maintain): Rename from text-clone-maintain. Use it | ||
| 1225 | instead of inhibit-modification-hooks. | ||
| 1226 | |||
| 1227 | * emacs-lisp/nadvice.el (advice--normalize): For aliases to macros, use | ||
| 1228 | a proxy, so as handle autoloads and redefinitions of the target. | ||
| 1229 | (advice--defalias-fset, advice-remove): Use advice--symbol-function. | ||
| 1230 | |||
| 1231 | * emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates): | ||
| 1232 | Remove bogus (arrayp . stringp) pair. Add entries for `vectorp'. | ||
| 1233 | (pcase--mutually-exclusive-p): New function. | ||
| 1234 | (pcase--split-consp): Use it. | ||
| 1235 | (pcase--split-pred): Use it. Optimize the case where `pat' is a qpat | ||
| 1236 | mutually exclusive with the current predicate. | ||
| 1237 | |||
| 1238 | * emacs-lisp/edebug.el (edebug-lookup-function): Remove function. | ||
| 1239 | (edebug-macrop): Remove. Use `macrop' instead. | ||
| 1240 | * emacs-lisp/advice.el (ad-subr-p): Remove. Use `subrp' instead. | ||
| 1241 | (ad-macro-p): | ||
| 1242 | * eshell/esh-cmd.el (eshell-macrop): | ||
| 1243 | * apropos.el (apropos-macrop): Remove. Use `macrop' instead. | ||
| 1244 | |||
| 1245 | 2013-08-04 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 1246 | |||
| 1247 | * emacs-lisp/nadvice.el (advice-function-mapc): Rename from advice-mapc. | ||
| 1248 | (advice-mapc): New function, using it. | ||
| 1249 | (advice-function-member-p): New function. | ||
| 1250 | (advice--normalize): Store the cdr in advice--saved-rewrite since | ||
| 1251 | that's the part that will be changed. | ||
| 1252 | (advice--symbol-function): New function. | ||
| 1253 | (advice-remove): Handle removal before the function is defined. | ||
| 1254 | Adjust to new advice--saved-rewrite. | ||
| 1255 | (advice-member-p): Use advice-function-member-p and | ||
| 1256 | advice--symbol-function. | ||
| 1257 | |||
| 1258 | 2013-08-04 Juanma Barranquero <lekktu@gmail.com> | ||
| 1259 | |||
| 1260 | * frameset.el (frameset-p, frameset-save): Fix autoload cookies. | ||
| 1261 | (frameset-filter-minibuffer): Doc fix. | ||
| 1262 | (frameset-restore): Fix autoload cookie. Fix typo in docstring. | ||
| 1263 | (frameset--set-id, frameset--process-minibuffer-frames) | ||
| 1264 | (frameset-restore): Rename parameter `frameset-id' to `frame-id'. | ||
| 1265 | (frameset--reuse-frame): Pass correct frame-id to frameset--find-frame. | ||
| 1266 | |||
| 1267 | * desktop.el (desktop-clear): Only delete frames when called | ||
| 1268 | interactively and desktop-restore-frames is non-nil. Doc fix. | ||
| 1269 | (desktop-read): Set desktop-saved-frameset to nil. | ||
| 1270 | |||
| 12 | 2013-08-04 Xue Fuqiao <xfq.free@gmail.com> | 1271 | 2013-08-04 Xue Fuqiao <xfq.free@gmail.com> |
| 13 | 1272 | ||
| 14 | * vc/vc.el (vc-ignore): Rewrite. | 1273 | * vc/vc.el (vc-ignore): Rewrite. |
| @@ -33,16 +1292,6 @@ | |||
| 33 | (vc-bzr-ignore-completion-table): | 1292 | (vc-bzr-ignore-completion-table): |
| 34 | (vc-bzr-find-ignore-file): New functions. | 1293 | (vc-bzr-find-ignore-file): New functions. |
| 35 | 1294 | ||
| 36 | 2013-08-04 Juanma Barranquero <lekktu@gmail.com> | ||
| 37 | |||
| 38 | * frameset.el (frameset-p, frameset-save): Fix autoload cookies. | ||
| 39 | (frameset-filter-minibuffer): Doc fix. | ||
| 40 | (frameset-restore): Fix autoload cookie. Fix typo in docstring. | ||
| 41 | |||
| 42 | * desktop.el (desktop-clear): Only delete frames when called | ||
| 43 | interactively and desktop-restore-frames is non-nil. Doc fix. | ||
| 44 | (desktop-read): Set desktop-saved-frameset to nil. | ||
| 45 | |||
| 46 | 2013-08-03 Juanma Barranquero <lekktu@gmail.com> | 1295 | 2013-08-03 Juanma Barranquero <lekktu@gmail.com> |
| 47 | 1296 | ||
| 48 | * frameset.el (frameset-prop): New function and setter. | 1297 | * frameset.el (frameset-prop): New function and setter. |
diff --git a/lisp/ChangeLog.12 b/lisp/ChangeLog.12 index 6b34ef55783..7fcc4ff0caf 100644 --- a/lisp/ChangeLog.12 +++ b/lisp/ChangeLog.12 | |||
| @@ -17355,7 +17355,7 @@ | |||
| 17355 | 17355 | ||
| 17356 | * calc/calc-embed.el (calc-do-embedded): Update help message. | 17356 | * calc/calc-embed.el (calc-do-embedded): Update help message. |
| 17357 | 17357 | ||
| 17358 | * calc/calc-prog.el (calc-user-define-invokation): Update help message. | 17358 | * calc/calc-prog.el (calc-user-define-invocation): Update help message. |
| 17359 | 17359 | ||
| 17360 | 2005-11-28 Stefan Monnier <monnier@iro.umontreal.ca> | 17360 | 2005-11-28 Stefan Monnier <monnier@iro.umontreal.ca> |
| 17361 | 17361 | ||
diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 066e15368da..4fba1053dfa 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU General Public License |
| 18 | # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | 18 | # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
| 19 | 19 | ||
| 20 | SHELL = /bin/sh | 20 | SHELL = @SHELL@ |
| 21 | 21 | ||
| 22 | srcdir = @srcdir@ | 22 | srcdir = @srcdir@ |
| 23 | top_srcdir = @top_srcdir@ | 23 | top_srcdir = @top_srcdir@ |
| @@ -118,7 +118,7 @@ emacs = EMACSLOADPATH=$(lisp) LC_ALL=C $(EMACS) $(EMACSOPT) | |||
| 118 | setwins=subdirs=`find . -type d -print`; \ | 118 | setwins=subdirs=`find . -type d -print`; \ |
| 119 | for file in $$subdirs; do \ | 119 | for file in $$subdirs; do \ |
| 120 | case $$file in */.* | */.*/* | */=* ) ;; \ | 120 | case $$file in */.* | */.*/* | */=* ) ;; \ |
| 121 | *) wins="$$wins $$file" ;; \ | 121 | *) wins="$$wins$${wins:+ }$$file" ;; \ |
| 122 | esac; \ | 122 | esac; \ |
| 123 | done | 123 | done |
| 124 | 124 | ||
| @@ -126,7 +126,7 @@ setwins=subdirs=`find . -type d -print`; \ | |||
| 126 | setwins_almost=subdirs=`find . -type d -print`; \ | 126 | setwins_almost=subdirs=`find . -type d -print`; \ |
| 127 | for file in $$subdirs; do \ | 127 | for file in $$subdirs; do \ |
| 128 | case $$file in */.* | */.*/* | */=* | */obsolete | */term ) ;; \ | 128 | case $$file in */.* | */.*/* | */=* | */obsolete | */term ) ;; \ |
| 129 | *) wins="$$wins $$file" ;; \ | 129 | *) wins="$$wins$${wins:+ }$$file" ;; \ |
| 130 | esac; \ | 130 | esac; \ |
| 131 | done | 131 | done |
| 132 | 132 | ||
| @@ -134,7 +134,7 @@ setwins_almost=subdirs=`find . -type d -print`; \ | |||
| 134 | setwins_for_subdirs=subdirs=`find . -type d -print`; \ | 134 | setwins_for_subdirs=subdirs=`find . -type d -print`; \ |
| 135 | for file in $$subdirs; do \ | 135 | for file in $$subdirs; do \ |
| 136 | case $$file in */.* | */.*/* | */=* | */cedet* ) ;; \ | 136 | case $$file in */.* | */.*/* | */=* | */cedet* ) ;; \ |
| 137 | *) wins="$$wins $$file" ;; \ | 137 | *) wins="$$wins$${wins:+ }$$file" ;; \ |
| 138 | esac; \ | 138 | esac; \ |
| 139 | done | 139 | done |
| 140 | 140 | ||
diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 27cd7089a07..d82e2eabd84 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el | |||
| @@ -856,7 +856,7 @@ return value is that of `abbrev-insert'.)" | |||
| 856 | (endmark (copy-marker wordend t))) | 856 | (endmark (copy-marker wordend t))) |
| 857 | (unless (or ;; executing-kbd-macro | 857 | (unless (or ;; executing-kbd-macro |
| 858 | noninteractive | 858 | noninteractive |
| 859 | (window-minibuffer-p (selected-window))) | 859 | (window-minibuffer-p)) |
| 860 | ;; Add an undo boundary, in case we are doing this for | 860 | ;; Add an undo boundary, in case we are doing this for |
| 861 | ;; a self-inserting command which has avoided making one so far. | 861 | ;; a self-inserting command which has avoided making one so far. |
| 862 | (undo-boundary)) | 862 | (undo-boundary)) |
diff --git a/lisp/align.el b/lisp/align.el index 3d2ca192245..6f55ac9faf1 100644 --- a/lisp/align.el +++ b/lisp/align.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; align.el --- align text to a specific column, by regexp | 1 | ;;; align.el --- align text to a specific column, by regexp -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999-2013 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999-2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -1325,7 +1325,7 @@ aligner would have dealt with are." | |||
| 1325 | (unless (or (and modes (not (memq major-mode | 1325 | (unless (or (and modes (not (memq major-mode |
| 1326 | (eval (cdr modes))))) | 1326 | (eval (cdr modes))))) |
| 1327 | (and run-if (not (funcall (cdr run-if))))) | 1327 | (and run-if (not (funcall (cdr run-if))))) |
| 1328 | (let* ((current-case-fold case-fold-search) | 1328 | (let* ((case-fold-search case-fold-search) |
| 1329 | (case-fold (assq 'case-fold rule)) | 1329 | (case-fold (assq 'case-fold rule)) |
| 1330 | (regexp (cdr (assq 'regexp rule))) | 1330 | (regexp (cdr (assq 'regexp rule))) |
| 1331 | (regfunc (and (functionp regexp) regexp)) | 1331 | (regfunc (and (functionp regexp) regexp)) |
| @@ -1403,215 +1403,202 @@ aligner would have dealt with are." | |||
| 1403 | ;; reports back that the region is ok, then align it. | 1403 | ;; reports back that the region is ok, then align it. |
| 1404 | (when (or (not func) | 1404 | (when (or (not func) |
| 1405 | (funcall func beg end rule)) | 1405 | (funcall func beg end rule)) |
| 1406 | (unwind-protect | 1406 | (let (rule-beg exclude-areas) |
| 1407 | (let (rule-beg exclude-areas) | 1407 | ;; determine first of all where the exclusions |
| 1408 | ;; determine first of all where the exclusions | 1408 | ;; lie in this region |
| 1409 | ;; lie in this region | 1409 | (when exclude-rules |
| 1410 | (when exclude-rules | 1410 | (align-region |
| 1411 | ;; guard against a problem with recursion and | 1411 | beg end 'entire |
| 1412 | ;; dynamic binding vs. lexical binding, since | 1412 | exclude-rules nil |
| 1413 | ;; the call to `align-region' below will | 1413 | (lambda (b e mode) |
| 1414 | ;; re-enter this function, and rebind | 1414 | (or (and mode (listp mode)) |
| 1415 | ;; `exclude-areas' | 1415 | (setq exclude-areas |
| 1416 | (set (setq exclude-areas | 1416 | (cons (cons b e) |
| 1417 | (make-symbol "align-exclude-areas")) | 1417 | exclude-areas))))) |
| 1418 | nil) | 1418 | (setq exclude-areas |
| 1419 | (align-region | 1419 | (nreverse |
| 1420 | beg end 'entire | 1420 | (sort exclude-areas #'car-less-than-car)))) |
| 1421 | exclude-rules nil | 1421 | |
| 1422 | `(lambda (b e mode) | 1422 | ;; set `case-fold-search' according to the |
| 1423 | (or (and mode (listp mode)) | 1423 | ;; (optional) `case-fold' property |
| 1424 | (set (quote ,exclude-areas) | 1424 | (and case-fold |
| 1425 | (cons (cons b e) | 1425 | (setq case-fold-search (cdr case-fold))) |
| 1426 | ,exclude-areas))))) | 1426 | |
| 1427 | (setq exclude-areas | 1427 | ;; while we can find the rule in the alignment |
| 1428 | (sort (symbol-value exclude-areas) | 1428 | ;; region.. |
| 1429 | (function | 1429 | (while (and (< (point) end-mark) |
| 1430 | (lambda (l r) | 1430 | (setq search-start (point)) |
| 1431 | (>= (car l) (car r))))))) | 1431 | (if regfunc |
| 1432 | 1432 | (funcall regfunc end-mark nil) | |
| 1433 | ;; set `case-fold-search' according to the | 1433 | (re-search-forward regexp |
| 1434 | ;; (optional) `case-fold' property | 1434 | end-mark t))) |
| 1435 | (and case-fold | 1435 | |
| 1436 | (setq case-fold-search (cdr case-fold))) | 1436 | ;; give the user some indication of where we |
| 1437 | 1437 | ;; are, if it's a very large region being | |
| 1438 | ;; while we can find the rule in the alignment | 1438 | ;; aligned |
| 1439 | ;; region.. | 1439 | (if report |
| 1440 | (while (and (< (point) end-mark) | 1440 | (let ((symbol (car rule))) |
| 1441 | (setq search-start (point)) | 1441 | (if (and symbol (symbolp symbol)) |
| 1442 | (if regfunc | 1442 | (message |
| 1443 | (funcall regfunc end-mark nil) | 1443 | "Aligning `%s' (rule %d of %d) %d%%..." |
| 1444 | (re-search-forward regexp | 1444 | (symbol-name symbol) rule-index rule-count |
| 1445 | end-mark t))) | 1445 | (/ (* (- (point) real-beg) 100) |
| 1446 | 1446 | (- end-mark real-beg))) | |
| 1447 | ;; give the user some indication of where we | 1447 | (message |
| 1448 | ;; are, if it's a very large region being | 1448 | "Aligning %d%%..." |
| 1449 | ;; aligned | 1449 | (/ (* (- (point) real-beg) 100) |
| 1450 | (if report | 1450 | (- end-mark real-beg)))))) |
| 1451 | (let ((symbol (car rule))) | 1451 | |
| 1452 | (if (and symbol (symbolp symbol)) | 1452 | ;; if the search ended us on the beginning of |
| 1453 | (message | 1453 | ;; the next line, move back to the end of the |
| 1454 | "Aligning `%s' (rule %d of %d) %d%%..." | 1454 | ;; previous line. |
| 1455 | (symbol-name symbol) rule-index rule-count | 1455 | (if (and (bolp) (> (point) search-start)) |
| 1456 | (/ (* (- (point) real-beg) 100) | 1456 | (forward-char -1)) |
| 1457 | (- end-mark real-beg))) | 1457 | |
| 1458 | (message | 1458 | ;; lookup the `group' attribute the first time |
| 1459 | "Aligning %d%%..." | 1459 | ;; that we need it |
| 1460 | (/ (* (- (point) real-beg) 100) | 1460 | (unless group-c |
| 1461 | (- end-mark real-beg)))))) | 1461 | (setq groups (or (cdr (assq 'group rule)) 1)) |
| 1462 | 1462 | (unless (listp groups) | |
| 1463 | ;; if the search ended us on the beginning of | 1463 | (setq groups (list groups))) |
| 1464 | ;; the next line, move back to the end of the | 1464 | (setq first (car groups))) |
| 1465 | ;; previous line. | 1465 | |
| 1466 | (if (and (bolp) (> (point) search-start)) | 1466 | (unless spacing-c |
| 1467 | (forward-char -1)) | 1467 | (setq spacing (cdr (assq 'spacing rule)) |
| 1468 | 1468 | spacing-c t)) | |
| 1469 | ;; lookup the `group' attribute the first time | 1469 | |
| 1470 | ;; that we need it | 1470 | (unless tab-stop-c |
| 1471 | (unless group-c | 1471 | (setq tab-stop |
| 1472 | (setq groups (or (cdr (assq 'group rule)) 1)) | 1472 | (let ((rule-ts (assq 'tab-stop rule))) |
| 1473 | (unless (listp groups) | 1473 | (cond (rule-ts |
| 1474 | (setq groups (list groups))) | 1474 | (cdr rule-ts)) |
| 1475 | (setq first (car groups))) | 1475 | ((symbolp align-to-tab-stop) |
| 1476 | 1476 | (symbol-value align-to-tab-stop)) | |
| 1477 | (unless spacing-c | 1477 | (t |
| 1478 | (setq spacing (cdr (assq 'spacing rule)) | 1478 | align-to-tab-stop))) |
| 1479 | spacing-c t)) | 1479 | tab-stop-c t)) |
| 1480 | 1480 | ||
| 1481 | (unless tab-stop-c | 1481 | ;; test whether we have found a match on the same |
| 1482 | (setq tab-stop | 1482 | ;; line as a previous match |
| 1483 | (let ((rule-ts (assq 'tab-stop rule))) | 1483 | (when (> (point) eol) |
| 1484 | (cond (rule-ts | 1484 | (setq same nil) |
| 1485 | (cdr rule-ts)) | 1485 | (align--set-marker eol (line-end-position))) |
| 1486 | ((symbolp align-to-tab-stop) | 1486 | |
| 1487 | (symbol-value align-to-tab-stop)) | 1487 | ;; lookup the `repeat' attribute the first time |
| 1488 | (t | 1488 | (or repeat-c |
| 1489 | align-to-tab-stop))) | 1489 | (setq repeat (cdr (assq 'repeat rule)) |
| 1490 | tab-stop-c t)) | 1490 | repeat-c t)) |
| 1491 | 1491 | ||
| 1492 | ;; test whether we have found a match on the same | 1492 | ;; lookup the `valid' attribute the first time |
| 1493 | ;; line as a previous match | 1493 | (or valid-c |
| 1494 | (when (> (point) eol) | 1494 | (setq valid (assq 'valid rule) |
| 1495 | (setq same nil) | 1495 | valid-c t)) |
| 1496 | (align--set-marker eol (line-end-position))) | 1496 | |
| 1497 | 1497 | ;; remember the beginning position of this rule | |
| 1498 | ;; lookup the `repeat' attribute the first time | 1498 | ;; match, and save the match-data, since either |
| 1499 | (or repeat-c | 1499 | ;; the `valid' form, or the code that searches for |
| 1500 | (setq repeat (cdr (assq 'repeat rule)) | 1500 | ;; section separation, might alter it |
| 1501 | repeat-c t)) | 1501 | (setq rule-beg (match-beginning first) |
| 1502 | 1502 | save-match-data (match-data)) | |
| 1503 | ;; lookup the `valid' attribute the first time | 1503 | |
| 1504 | (or valid-c | 1504 | (or rule-beg |
| 1505 | (setq valid (assq 'valid rule) | 1505 | (error "No match for subexpression %s" first)) |
| 1506 | valid-c t)) | 1506 | |
| 1507 | 1507 | ;; unless the `valid' attribute is set, and tells | |
| 1508 | ;; remember the beginning position of this rule | 1508 | ;; us that the rule is not valid at this point in |
| 1509 | ;; match, and save the match-data, since either | 1509 | ;; the code.. |
| 1510 | ;; the `valid' form, or the code that searches for | 1510 | (unless (and valid (not (funcall (cdr valid)))) |
| 1511 | ;; section separation, might alter it | 1511 | |
| 1512 | (setq rule-beg (match-beginning first) | 1512 | ;; look to see if this match begins a new |
| 1513 | save-match-data (match-data)) | 1513 | ;; section. If so, we should align what we've |
| 1514 | 1514 | ;; collected so far, and then begin collecting | |
| 1515 | (or rule-beg | 1515 | ;; anew for the next alignment section |
| 1516 | (error "No match for subexpression %s" first)) | 1516 | (when (and last-point |
| 1517 | 1517 | (align-new-section-p last-point rule-beg | |
| 1518 | ;; unless the `valid' attribute is set, and tells | 1518 | thissep)) |
| 1519 | ;; us that the rule is not valid at this point in | 1519 | (align-regions regions align-props rule func) |
| 1520 | ;; the code.. | 1520 | (setq regions nil) |
| 1521 | (unless (and valid (not (funcall (cdr valid)))) | 1521 | (setq align-props nil)) |
| 1522 | 1522 | (align--set-marker last-point rule-beg t) | |
| 1523 | ;; look to see if this match begins a new | 1523 | |
| 1524 | ;; section. If so, we should align what we've | 1524 | ;; restore the match data |
| 1525 | ;; collected so far, and then begin collecting | 1525 | (set-match-data save-match-data) |
| 1526 | ;; anew for the next alignment section | 1526 | |
| 1527 | (when (and last-point | 1527 | ;; check whether the region to be aligned |
| 1528 | (align-new-section-p last-point rule-beg | 1528 | ;; straddles an exclusion area |
| 1529 | thissep)) | 1529 | (let ((excls exclude-areas)) |
| 1530 | (align-regions regions align-props rule func) | 1530 | (setq exclude-p nil) |
| 1531 | (setq regions nil) | 1531 | (while excls |
| 1532 | (setq align-props nil)) | 1532 | (if (and (< (match-beginning (car groups)) |
| 1533 | (align--set-marker last-point rule-beg t) | 1533 | (cdar excls)) |
| 1534 | 1534 | (> (match-end (car (last groups))) | |
| 1535 | ;; restore the match data | 1535 | (caar excls))) |
| 1536 | (set-match-data save-match-data) | 1536 | (setq exclude-p t |
| 1537 | 1537 | excls nil) | |
| 1538 | ;; check whether the region to be aligned | 1538 | (setq excls (cdr excls))))) |
| 1539 | ;; straddles an exclusion area | 1539 | |
| 1540 | (let ((excls exclude-areas)) | 1540 | ;; go through the parenthesis groups |
| 1541 | (setq exclude-p nil) | 1541 | ;; matching whitespace to be contracted or |
| 1542 | (while excls | 1542 | ;; expanded (or possibly justified, if the |
| 1543 | (if (and (< (match-beginning (car groups)) | 1543 | ;; `justify' attribute was set) |
| 1544 | (cdar excls)) | 1544 | (unless exclude-p |
| 1545 | (> (match-end (car (last groups))) | 1545 | (dolist (g groups) |
| 1546 | (caar excls))) | 1546 | ;; We must use markers, since |
| 1547 | (setq exclude-p t | 1547 | ;; `align-areas' may modify the buffer. |
| 1548 | excls nil) | 1548 | ;; Avoid polluting the markers. |
| 1549 | (setq excls (cdr excls))))) | 1549 | (let* ((group-beg (copy-marker |
| 1550 | 1550 | (match-beginning g) t)) | |
| 1551 | ;; go through the parenthesis groups | 1551 | (group-end (copy-marker |
| 1552 | ;; matching whitespace to be contracted or | 1552 | (match-end g) t)) |
| 1553 | ;; expanded (or possibly justified, if the | 1553 | (region (cons group-beg group-end)) |
| 1554 | ;; `justify' attribute was set) | 1554 | (props (cons (if (listp spacing) |
| 1555 | (unless exclude-p | 1555 | (car spacing) |
| 1556 | (dolist (g groups) | 1556 | spacing) |
| 1557 | ;; We must use markers, since | 1557 | (if (listp tab-stop) |
| 1558 | ;; `align-areas' may modify the buffer. | 1558 | (car tab-stop) |
| 1559 | ;; Avoid polluting the markers. | 1559 | tab-stop)))) |
| 1560 | (let* ((group-beg (copy-marker | 1560 | (push group-beg markers) |
| 1561 | (match-beginning g) t)) | 1561 | (push group-end markers) |
| 1562 | (group-end (copy-marker | 1562 | (setq index (if same (1+ index) 0)) |
| 1563 | (match-end g) t)) | 1563 | (cond |
| 1564 | (region (cons group-beg group-end)) | 1564 | ((nth index regions) |
| 1565 | (props (cons (if (listp spacing) | 1565 | (setcar (nthcdr index regions) |
| 1566 | (car spacing) | 1566 | (cons region |
| 1567 | spacing) | 1567 | (nth index regions)))) |
| 1568 | (if (listp tab-stop) | 1568 | (regions |
| 1569 | (car tab-stop) | 1569 | (nconc regions |
| 1570 | tab-stop)))) | 1570 | (list (list region))) |
| 1571 | (push group-beg markers) | 1571 | (nconc align-props (list props))) |
| 1572 | (push group-end markers) | 1572 | (t |
| 1573 | (setq index (if same (1+ index) 0)) | 1573 | (setq regions |
| 1574 | (cond | 1574 | (list (list region))) |
| 1575 | ((nth index regions) | 1575 | (setq align-props (list props))))) |
| 1576 | (setcar (nthcdr index regions) | 1576 | ;; If any further rule matches are found |
| 1577 | (cons region | 1577 | ;; before `eol', they are on the same |
| 1578 | (nth index regions)))) | 1578 | ;; line as this one; this can only |
| 1579 | (regions | 1579 | ;; happen if the `repeat' attribute is |
| 1580 | (nconc regions | 1580 | ;; non-nil. |
| 1581 | (list (list region))) | 1581 | (if (listp spacing) |
| 1582 | (nconc align-props (list props))) | 1582 | (setq spacing (cdr spacing))) |
| 1583 | (t | 1583 | (if (listp tab-stop) |
| 1584 | (setq regions | 1584 | (setq tab-stop (cdr tab-stop))) |
| 1585 | (list (list region))) | 1585 | (setq same t)) |
| 1586 | (setq align-props (list props))))) | 1586 | |
| 1587 | ;; If any further rule matches are found | 1587 | ;; if `repeat' has not been set, move to |
| 1588 | ;; before `eol', they are on the same | 1588 | ;; the next line; don't bother searching |
| 1589 | ;; line as this one; this can only | 1589 | ;; anymore on this one |
| 1590 | ;; happen if the `repeat' attribute is | 1590 | (if (and (not repeat) (not (bolp))) |
| 1591 | ;; non-nil. | 1591 | (forward-line)) |
| 1592 | (if (listp spacing) | 1592 | |
| 1593 | (setq spacing (cdr spacing))) | 1593 | ;; if the search did not change point, |
| 1594 | (if (listp tab-stop) | 1594 | ;; move forward to avoid an infinite loop |
| 1595 | (setq tab-stop (cdr tab-stop))) | 1595 | (if (= (point) search-start) |
| 1596 | (setq same t)) | 1596 | (forward-char))))) |
| 1597 | 1597 | ||
| 1598 | ;; if `repeat' has not been set, move to | 1598 | ;; when they are no more matches for this rule, |
| 1599 | ;; the next line; don't bother searching | 1599 | ;; align whatever was left over |
| 1600 | ;; anymore on this one | 1600 | (if regions |
| 1601 | (if (and (not repeat) (not (bolp))) | 1601 | (align-regions regions align-props rule func)))))))) |
| 1602 | (forward-line)) | ||
| 1603 | |||
| 1604 | ;; if the search did not change point, | ||
| 1605 | ;; move forward to avoid an infinite loop | ||
| 1606 | (if (= (point) search-start) | ||
| 1607 | (forward-char))))) | ||
| 1608 | |||
| 1609 | ;; when they are no more matches for this rule, | ||
| 1610 | ;; align whatever was left over | ||
| 1611 | (if regions | ||
| 1612 | (align-regions regions align-props rule func))) | ||
| 1613 | |||
| 1614 | (setq case-fold-search current-case-fold))))))) | ||
| 1615 | (setq rules (cdr rules) | 1602 | (setq rules (cdr rules) |
| 1616 | rule-index (1+ rule-index))) | 1603 | rule-index (1+ rule-index))) |
| 1617 | ;; This function can use a lot of temporary markers, so instead of | 1604 | ;; This function can use a lot of temporary markers, so instead of |
diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index fd8e5f8ff94..1c76156b91a 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el | |||
| @@ -720,17 +720,17 @@ icon/bullet.") | |||
| 720 | ;;;_ . Hooks and hook helpers | 720 | ;;;_ . Hooks and hook helpers |
| 721 | ;;;_ , major command-loop business: | 721 | ;;;_ , major command-loop business: |
| 722 | ;;;_ > allout-widgets-pre-command-business (&optional recursing) | 722 | ;;;_ > allout-widgets-pre-command-business (&optional recursing) |
| 723 | (defun allout-widgets-pre-command-business (&optional recursing) | 723 | (defun allout-widgets-pre-command-business (&optional _recursing) |
| 724 | "Handle actions pending before `allout-mode' activity." | 724 | "Handle actions pending before `allout-mode' activity." |
| 725 | ) | 725 | ) |
| 726 | ;;;_ > allout-widgets-post-command-business (&optional recursing) | 726 | ;;;_ > allout-widgets-post-command-business (&optional recursing) |
| 727 | (defun allout-widgets-post-command-business (&optional recursing) | 727 | (defun allout-widgets-post-command-business (&optional _recursing) |
| 728 | "Handle actions pending after any `allout-mode' commands. | 728 | "Handle actions pending after any `allout-mode' commands. |
| 729 | 729 | ||
| 730 | Optional RECURSING is for internal use, to limit recursion." | 730 | Optional RECURSING is for internal use, to limit recursion." |
| 731 | ;; - check changed text for nesting discontinuities and escape anything | 731 | ;; - check changed text for nesting discontinuities and escape anything |
| 732 | ;; that's: (1) asterisks at bol or (2) excessively nested. | 732 | ;; that's: (1) asterisks at bol or (2) excessively nested. |
| 733 | (condition-case failure | 733 | (condition-case nil |
| 734 | 734 | ||
| 735 | (when (and (boundp 'allout-mode) allout-mode) | 735 | (when (and (boundp 'allout-mode) allout-mode) |
| 736 | 736 | ||
| @@ -811,7 +811,7 @@ Optional RECURSING is for internal use, to limit recursion." | |||
| 811 | (goto-char (widget-get this-widget :from)) | 811 | (goto-char (widget-get this-widget :from)) |
| 812 | (not (bolp))) | 812 | (not (bolp))) |
| 813 | (if (not | 813 | (if (not |
| 814 | (condition-case err | 814 | (condition-case nil |
| 815 | (yes-or-no-p | 815 | (yes-or-no-p |
| 816 | (concat "Misplaced item won't be recognizable " | 816 | (concat "Misplaced item won't be recognizable " |
| 817 | " as part of outline - rectify? ")) | 817 | " as part of outline - rectify? ")) |
| @@ -873,7 +873,7 @@ Optional RECURSING is for internal use, to limit recursion." | |||
| 873 | (error | 873 | (error |
| 874 | (substitute-command-keys allout-structure-unruly-deletion-message))))) | 874 | (substitute-command-keys allout-structure-unruly-deletion-message))))) |
| 875 | ;;;_ > allout-widgets-after-change-handler | 875 | ;;;_ > allout-widgets-after-change-handler |
| 876 | (defun allout-widgets-after-change-handler (beg end prelength) | 876 | (defun allout-widgets-after-change-handler (_beg _end _prelength) |
| 877 | "Reconcile what needs to be reconciled for allout widgets after edits." | 877 | "Reconcile what needs to be reconciled for allout widgets after edits." |
| 878 | ) | 878 | ) |
| 879 | ;;;_ > allout-current-decorated-p () | 879 | ;;;_ > allout-current-decorated-p () |
| @@ -999,7 +999,6 @@ Generally invoked via `allout-exposure-change-functions'." | |||
| 999 | ;; have to distinguish between concealing and exposing so that, eg, | 999 | ;; have to distinguish between concealing and exposing so that, eg, |
| 1000 | ;; `allout-expose-topic's mix is handled properly. | 1000 | ;; `allout-expose-topic's mix is handled properly. |
| 1001 | handled-expose | 1001 | handled-expose |
| 1002 | handled-conceal | ||
| 1003 | covered | 1002 | covered |
| 1004 | deactivate-mark) | 1003 | deactivate-mark) |
| 1005 | 1004 | ||
| @@ -1188,7 +1187,7 @@ Dispatched by `allout-widgets-post-command-business' in response to | |||
| 1188 | (let* ((allout-undo-exposure-in-progress t) | 1187 | (let* ((allout-undo-exposure-in-progress t) |
| 1189 | ;; inhibit undo recording while twiddling exposure to track undo: | 1188 | ;; inhibit undo recording while twiddling exposure to track undo: |
| 1190 | (widgets allout-widgets-undo-exposure-record) | 1189 | (widgets allout-widgets-undo-exposure-record) |
| 1191 | widget widget-start-marker widget-end-marker | 1190 | widget-start-marker widget-end-marker |
| 1192 | from-state icon-start-point to-state | 1191 | from-state icon-start-point to-state |
| 1193 | handled covered) | 1192 | handled covered) |
| 1194 | (setq allout-widgets-undo-exposure-record nil) | 1193 | (setq allout-widgets-undo-exposure-record nil) |
| @@ -1552,7 +1551,7 @@ recursive operation." | |||
| 1552 | ;;;_ > allout-decorate-item-and-context (item-widget &optional redecorate | 1551 | ;;;_ > allout-decorate-item-and-context (item-widget &optional redecorate |
| 1553 | ;;; blank-container parent) | 1552 | ;;; blank-container parent) |
| 1554 | (defun allout-decorate-item-and-context (item-widget &optional redecorate | 1553 | (defun allout-decorate-item-and-context (item-widget &optional redecorate |
| 1555 | blank-container parent) | 1554 | blank-container _parent) |
| 1556 | "Create or adjust widget decorations for ITEM-WIDGET and neighbors at point. | 1555 | "Create or adjust widget decorations for ITEM-WIDGET and neighbors at point. |
| 1557 | 1556 | ||
| 1558 | The neighbors include its siblings and parent. | 1557 | The neighbors include its siblings and parent. |
| @@ -1593,12 +1592,8 @@ We return the item-widget corresponding to the item at point." | |||
| 1593 | steady-point)) | 1592 | steady-point)) |
| 1594 | (parent (and (not is-container) | 1593 | (parent (and (not is-container) |
| 1595 | (allout-get-or-create-parent-widget))) | 1594 | (allout-get-or-create-parent-widget))) |
| 1596 | parent-flags parent-depth | ||
| 1597 | successor-sibling | 1595 | successor-sibling |
| 1598 | body | ||
| 1599 | doing-item | 1596 | doing-item |
| 1600 | sub-item-widget | ||
| 1601 | depth | ||
| 1602 | reverse-siblings-chart | 1597 | reverse-siblings-chart |
| 1603 | (buffer-undo-list t)) | 1598 | (buffer-undo-list t)) |
| 1604 | 1599 | ||
| @@ -1615,7 +1610,6 @@ We return the item-widget corresponding to the item at point." | |||
| 1615 | ;; `allout-goto-prefix' will go to first non-container item: | 1610 | ;; `allout-goto-prefix' will go to first non-container item: |
| 1616 | (allout-goto-prefix) | 1611 | (allout-goto-prefix) |
| 1617 | (allout-next-heading)) | 1612 | (allout-next-heading)) |
| 1618 | (setq depth (allout-recent-depth)) | ||
| 1619 | (setq reverse-siblings-chart (list allout-recent-prefix-beginning)) | 1613 | (setq reverse-siblings-chart (list allout-recent-prefix-beginning)) |
| 1620 | (while (allout-next-sibling) | 1614 | (while (allout-next-sibling) |
| 1621 | (push allout-recent-prefix-beginning reverse-siblings-chart))) | 1615 | (push allout-recent-prefix-beginning reverse-siblings-chart))) |
| @@ -1702,7 +1696,6 @@ Point is left at the last sibling in the visible subtree." | |||
| 1702 | (pending-chart (or chart (allout-chart-subtree nil 'visible))) | 1696 | (pending-chart (or chart (allout-chart-subtree nil 'visible))) |
| 1703 | item-widget | 1697 | item-widget |
| 1704 | previous-sibling-point | 1698 | previous-sibling-point |
| 1705 | previous-sibling | ||
| 1706 | recent-sibling-point) | 1699 | recent-sibling-point) |
| 1707 | (setq pending-chart (nreverse pending-chart)) | 1700 | (setq pending-chart (nreverse pending-chart)) |
| 1708 | (dolist (sibling-point pending-chart) | 1701 | (dolist (sibling-point pending-chart) |
| @@ -1753,9 +1746,7 @@ may have subitems.)" | |||
| 1753 | (icon-start (1- icon-end)) | 1746 | (icon-start (1- icon-end)) |
| 1754 | body-start | 1747 | body-start |
| 1755 | body-end | 1748 | body-end |
| 1756 | bullet | ||
| 1757 | has-subitems | 1749 | has-subitems |
| 1758 | (contents-depth (1+ depth)) | ||
| 1759 | ) | 1750 | ) |
| 1760 | (widget-put item-widget :depth depth) | 1751 | (widget-put item-widget :depth depth) |
| 1761 | (if is-container | 1752 | (if is-container |
| @@ -1783,7 +1774,7 @@ may have subitems.)" | |||
| 1783 | 1774 | ||
| 1784 | ;; cue area: | 1775 | ;; cue area: |
| 1785 | (setq body-start icon-end) | 1776 | (setq body-start icon-end) |
| 1786 | (widget-put item-widget :bullet (setq bullet (allout-get-bullet))) | 1777 | (widget-put item-widget :bullet (allout-get-bullet)) |
| 1787 | (if (equal (char-after body-start) ? ) | 1778 | (if (equal (char-after body-start) ? ) |
| 1788 | (setq body-start (1+ body-start))) | 1779 | (setq body-start (1+ body-start))) |
| 1789 | (widget-put item-widget :body-start body-start) | 1780 | (widget-put item-widget :body-start body-start) |
| @@ -1809,7 +1800,7 @@ may have subitems.)" | |||
| 1809 | ;; has a subsequent item: | 1800 | ;; has a subsequent item: |
| 1810 | (not (= body-end (point-max))) | 1801 | (not (= body-end (point-max))) |
| 1811 | ;; subsequent item is deeper: | 1802 | ;; subsequent item is deeper: |
| 1812 | (< depth (setq contents-depth (allout-recent-depth)))))) | 1803 | (< depth (allout-recent-depth))))) |
| 1813 | ;; note :expanded - true if widget item's content is currently visible? | 1804 | ;; note :expanded - true if widget item's content is currently visible? |
| 1814 | (widget-put item-widget :expanded | 1805 | (widget-put item-widget :expanded |
| 1815 | (and has-subitems | 1806 | (and has-subitems |
| @@ -1818,7 +1809,7 @@ may have subitems.)" | |||
| 1818 | (goto-char allout-recent-prefix-beginning) | 1809 | (goto-char allout-recent-prefix-beginning) |
| 1819 | (not (allout-hidden-p))))))) | 1810 | (not (allout-hidden-p))))))) |
| 1820 | ;;;_ > allout-set-boundary-marker (boundary position &optional current-marker) | 1811 | ;;;_ > allout-set-boundary-marker (boundary position &optional current-marker) |
| 1821 | (defun allout-set-boundary-marker (boundary position &optional current-marker) | 1812 | (defun allout-set-boundary-marker (_boundary position &optional current-marker) |
| 1822 | "Set or create item widget BOUNDARY type marker at POSITION. | 1813 | "Set or create item widget BOUNDARY type marker at POSITION. |
| 1823 | 1814 | ||
| 1824 | Optional CURRENT-MARKER is the marker currently being used for | 1815 | Optional CURRENT-MARKER is the marker currently being used for |
| @@ -1872,8 +1863,8 @@ reapplying this method will rectify the glyphs." | |||
| 1872 | 1863 | ||
| 1873 | (when (not (widget-get item-widget :is-container)) | 1864 | (when (not (widget-get item-widget :is-container)) |
| 1874 | (let* ((depth (widget-get item-widget :depth)) | 1865 | (let* ((depth (widget-get item-widget :depth)) |
| 1875 | (parent-depth (and parent-widget | 1866 | ;; (parent-depth (and parent-widget |
| 1876 | (widget-get parent-widget :depth))) | 1867 | ;; (widget-get parent-widget :depth))) |
| 1877 | (parent-flags (and parent-widget | 1868 | (parent-flags (and parent-widget |
| 1878 | (widget-get parent-widget :guide-column-flags))) | 1869 | (widget-get parent-widget :guide-column-flags))) |
| 1879 | (parent-flags-depth (length parent-flags)) | 1870 | (parent-flags-depth (length parent-flags)) |
| @@ -1894,7 +1885,7 @@ reapplying this method will rectify the glyphs." | |||
| 1894 | (increment (length allout-header-prefix)) | 1885 | (increment (length allout-header-prefix)) |
| 1895 | reverse-flags | 1886 | reverse-flags |
| 1896 | guide-name | 1887 | guide-name |
| 1897 | extenders paint-extenders | 1888 | extenders |
| 1898 | (inhibit-read-only t)) | 1889 | (inhibit-read-only t)) |
| 1899 | 1890 | ||
| 1900 | (when (not (equal was-flags flags)) | 1891 | (when (not (equal was-flags flags)) |
| @@ -2017,8 +2008,8 @@ reapplying this method will rectify the glyphs." | |||
| 2017 | (let* ((cue-start (or (widget-get item-widget :distinctive-end) | 2008 | (let* ((cue-start (or (widget-get item-widget :distinctive-end) |
| 2018 | (widget-get item-widget :icon-end))) | 2009 | (widget-get item-widget :icon-end))) |
| 2019 | (body-start (widget-get item-widget :body-start)) | 2010 | (body-start (widget-get item-widget :body-start)) |
| 2020 | (expanded (widget-get item-widget :expanded)) | 2011 | ;(expanded (widget-get item-widget :expanded)) |
| 2021 | (has-subitems (widget-get item-widget :has-subitems)) | 2012 | ;(has-subitems (widget-get item-widget :has-subitems)) |
| 2022 | (inhibit-read-only t)) | 2013 | (inhibit-read-only t)) |
| 2023 | 2014 | ||
| 2024 | (allout-item-element-span-is item-widget :cue-span cue-start body-start) | 2015 | (allout-item-element-span-is item-widget :cue-span cue-start body-start) |
| @@ -2032,7 +2023,6 @@ Optional FORCE means force reassignment of the region property." | |||
| 2032 | (let* ((allout-inhibit-body-modification-hook t) | 2023 | (let* ((allout-inhibit-body-modification-hook t) |
| 2033 | (body-start (widget-get item-widget :body-start)) | 2024 | (body-start (widget-get item-widget :body-start)) |
| 2034 | (body-end (widget-get item-widget :body-end)) | 2025 | (body-end (widget-get item-widget :body-end)) |
| 2035 | (body-text-end body-end) | ||
| 2036 | (inhibit-read-only t)) | 2026 | (inhibit-read-only t)) |
| 2037 | 2027 | ||
| 2038 | (allout-item-element-span-is item-widget :body-span | 2028 | (allout-item-element-span-is item-widget :body-span |
| @@ -2135,9 +2125,7 @@ of the current span, if established, or nil if not yet set. | |||
| 2135 | When the START and END are passed, return the distance that the | 2125 | When the START and END are passed, return the distance that the |
| 2136 | start of the item moved. We return 0 if the span was not | 2126 | start of the item moved. We return 0 if the span was not |
| 2137 | previously established or is not moved." | 2127 | previously established or is not moved." |
| 2138 | (let ((overlay (widget-get item-widget :span-overlay)) | 2128 | (let ((overlay (widget-get item-widget :span-overlay))) |
| 2139 | was-start was-end | ||
| 2140 | changed) | ||
| 2141 | (cond ((not overlay) (when start | 2129 | (cond ((not overlay) (when start |
| 2142 | (setq overlay (make-overlay start end nil t nil)) | 2130 | (setq overlay (make-overlay start end nil t nil)) |
| 2143 | (overlay-put overlay 'button item-widget) | 2131 | (overlay-put overlay 'button item-widget) |
| @@ -2259,7 +2247,7 @@ of the buffer." | |||
| 2259 | (allout-get-or-create-item-widget redecorate))) | 2247 | (allout-get-or-create-item-widget redecorate))) |
| 2260 | ;;;_ : X- Item ancillaries | 2248 | ;;;_ : X- Item ancillaries |
| 2261 | ;;;_ >X allout-body-modification-handler (beg end) | 2249 | ;;;_ >X allout-body-modification-handler (beg end) |
| 2262 | (defun allout-body-modification-handler (beg end) | 2250 | (defun allout-body-modification-handler (_beg _end) |
| 2263 | "Do routine processing of body text before and after modification. | 2251 | "Do routine processing of body text before and after modification. |
| 2264 | 2252 | ||
| 2265 | Operation is inhibited by `allout-inhibit-body-modification-handler'." | 2253 | Operation is inhibited by `allout-inhibit-body-modification-handler'." |
| @@ -2281,7 +2269,7 @@ Operation is inhibited by `allout-inhibit-body-modification-handler'." | |||
| 2281 | ;; operation. | 2269 | ;; operation. |
| 2282 | (cond (allout-inhibit-body-modification-hook nil))) | 2270 | (cond (allout-inhibit-body-modification-hook nil))) |
| 2283 | ;;;_ >X allout-graphics-modification-handler (beg end) | 2271 | ;;;_ >X allout-graphics-modification-handler (beg end) |
| 2284 | (defun allout-graphics-modification-handler (beg end) | 2272 | (defun allout-graphics-modification-handler (beg _end) |
| 2285 | "Protect against incoherent deletion of decoration graphics. | 2273 | "Protect against incoherent deletion of decoration graphics. |
| 2286 | 2274 | ||
| 2287 | Deletes allowed only when `inhibit-read-only' is t." | 2275 | Deletes allowed only when `inhibit-read-only' is t." |
diff --git a/lisp/allout.el b/lisp/allout.el index a0d61eb6f35..0896ace5872 100644 --- a/lisp/allout.el +++ b/lisp/allout.el | |||
| @@ -74,6 +74,9 @@ | |||
| 74 | 74 | ||
| 75 | ;;; Code: | 75 | ;;; Code: |
| 76 | 76 | ||
| 77 | (declare-function epa-passphrase-callback-function | ||
| 78 | "epa" (context key-id handback)) | ||
| 79 | |||
| 77 | ;;;_* Dependency loads | 80 | ;;;_* Dependency loads |
| 78 | (require 'overlay) | 81 | (require 'overlay) |
| 79 | (eval-when-compile | 82 | (eval-when-compile |
| @@ -2121,8 +2124,8 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be." | |||
| 2121 | 2124 | ||
| 2122 | ;;;_ > allout-overlay-insert-in-front-handler (ol after beg end | 2125 | ;;;_ > allout-overlay-insert-in-front-handler (ol after beg end |
| 2123 | ;;; &optional prelen) | 2126 | ;;; &optional prelen) |
| 2124 | (defun allout-overlay-insert-in-front-handler (ol after beg end | 2127 | (defun allout-overlay-insert-in-front-handler (ol after beg _end |
| 2125 | &optional prelen) | 2128 | &optional _prelen) |
| 2126 | "Shift the overlay so stuff inserted in front of it is excluded." | 2129 | "Shift the overlay so stuff inserted in front of it is excluded." |
| 2127 | (if after | 2130 | (if after |
| 2128 | ;; ??? Shouldn't moving the overlay should be unnecessary, if overlay | 2131 | ;; ??? Shouldn't moving the overlay should be unnecessary, if overlay |
| @@ -2131,7 +2134,7 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be." | |||
| 2131 | ;;;_ > allout-overlay-interior-modification-handler (ol after beg end | 2134 | ;;;_ > allout-overlay-interior-modification-handler (ol after beg end |
| 2132 | ;;; &optional prelen) | 2135 | ;;; &optional prelen) |
| 2133 | (defun allout-overlay-interior-modification-handler (ol after beg end | 2136 | (defun allout-overlay-interior-modification-handler (ol after beg end |
| 2134 | &optional prelen) | 2137 | &optional _prelen) |
| 2135 | "Get confirmation before making arbitrary changes to invisible text. | 2138 | "Get confirmation before making arbitrary changes to invisible text. |
| 2136 | 2139 | ||
| 2137 | We expose the invisible text and ask for confirmation. Refusal or | 2140 | We expose the invisible text and ask for confirmation. Refusal or |
| @@ -2194,7 +2197,7 @@ See `allout-overlay-interior-modification-handler' for details." | |||
| 2194 | (allout-overlay-interior-modification-handler | 2197 | (allout-overlay-interior-modification-handler |
| 2195 | overlay nil beg end nil)))))) | 2198 | overlay nil beg end nil)))))) |
| 2196 | ;;;_ > allout-isearch-end-handler (&optional overlay) | 2199 | ;;;_ > allout-isearch-end-handler (&optional overlay) |
| 2197 | (defun allout-isearch-end-handler (&optional overlay) | 2200 | (defun allout-isearch-end-handler (&optional _overlay) |
| 2198 | "Reconcile allout outline exposure on arriving in hidden text after isearch. | 2201 | "Reconcile allout outline exposure on arriving in hidden text after isearch. |
| 2199 | 2202 | ||
| 2200 | Optional OVERLAY parameter is for when this function is used by | 2203 | Optional OVERLAY parameter is for when this function is used by |
| @@ -2733,7 +2736,7 @@ starting point, and PREV-DEPTH is depth of prior topic." | |||
| 2733 | ; and maybe not preferable. | 2736 | ; and maybe not preferable. |
| 2734 | )) | 2737 | )) |
| 2735 | ;;;_ > allout-chart-siblings (&optional start end) | 2738 | ;;;_ > allout-chart-siblings (&optional start end) |
| 2736 | (defun allout-chart-siblings (&optional start end) | 2739 | (defun allout-chart-siblings (&optional _start _end) |
| 2737 | "Produce a list of locations of this and succeeding sibling topics. | 2740 | "Produce a list of locations of this and succeeding sibling topics. |
| 2738 | Effectively a top-level chart of siblings. See `allout-chart-subtree' | 2741 | Effectively a top-level chart of siblings. See `allout-chart-subtree' |
| 2739 | for an explanation of charts." | 2742 | for an explanation of charts." |
| @@ -3051,7 +3054,7 @@ Returning depth if successful, nil if not." | |||
| 3051 | nil)) | 3054 | nil)) |
| 3052 | ) | 3055 | ) |
| 3053 | ;;;_ > allout-up-current-level (arg) | 3056 | ;;;_ > allout-up-current-level (arg) |
| 3054 | (defun allout-up-current-level (arg) | 3057 | (defun allout-up-current-level (_arg) |
| 3055 | "Move out ARG levels from current visible topic." | 3058 | "Move out ARG levels from current visible topic." |
| 3056 | (interactive "p") | 3059 | (interactive "p") |
| 3057 | (let ((start-point (point))) | 3060 | (let ((start-point (point))) |
| @@ -3198,7 +3201,7 @@ Presumes point is at the start of a topic prefix." | |||
| 3198 | "Go back to the first sibling at this level, visible or not." | 3201 | "Go back to the first sibling at this level, visible or not." |
| 3199 | (allout-end-of-level 'backward)) | 3202 | (allout-end-of-level 'backward)) |
| 3200 | ;;;_ > allout-end-of-level (&optional backward) | 3203 | ;;;_ > allout-end-of-level (&optional backward) |
| 3201 | (defun allout-end-of-level (&optional backward) | 3204 | (defun allout-end-of-level (&optional _backward) |
| 3202 | "Go to the last sibling at this level, visible or not." | 3205 | "Go to the last sibling at this level, visible or not." |
| 3203 | 3206 | ||
| 3204 | (let ((depth (allout-depth))) | 3207 | (let ((depth (allout-depth))) |
| @@ -3930,7 +3933,7 @@ Maintains outline hanging topic indentation if | |||
| 3930 | (if (or allout-former-auto-filler allout-use-hanging-indents) | 3933 | (if (or allout-former-auto-filler allout-use-hanging-indents) |
| 3931 | (funcall use-auto-fill-function))))) | 3934 | (funcall use-auto-fill-function))))) |
| 3932 | ;;;_ > allout-reindent-body (old-depth new-depth &optional number) | 3935 | ;;;_ > allout-reindent-body (old-depth new-depth &optional number) |
| 3933 | (defun allout-reindent-body (old-depth new-depth &optional number) | 3936 | (defun allout-reindent-body (old-depth new-depth &optional _number) |
| 3934 | "Reindent body lines which were indented at OLD-DEPTH to NEW-DEPTH. | 3937 | "Reindent body lines which were indented at OLD-DEPTH to NEW-DEPTH. |
| 3935 | 3938 | ||
| 3936 | Optional arg NUMBER indicates numbering is being added, and it must | 3939 | Optional arg NUMBER indicates numbering is being added, and it must |
| @@ -4559,7 +4562,7 @@ Topic exposure is marked with text-properties, to be used by | |||
| 4559 | (if next (goto-char next))))) | 4562 | (if next (goto-char next))))) |
| 4560 | (set-buffer-modified-p was-modified)))) | 4563 | (set-buffer-modified-p was-modified)))) |
| 4561 | ;;;_ > allout-yank-processing () | 4564 | ;;;_ > allout-yank-processing () |
| 4562 | (defun allout-yank-processing (&optional arg) | 4565 | (defun allout-yank-processing (&optional _arg) |
| 4563 | 4566 | ||
| 4564 | "Incidental allout-specific business to be done just after text yanks. | 4567 | "Incidental allout-specific business to be done just after text yanks. |
| 4565 | 4568 | ||
| @@ -5521,7 +5524,7 @@ header and body. The elements of that list are: | |||
| 5521 | ;;_ > allout-process-exposed (&optional func from to frombuf | 5524 | ;;_ > allout-process-exposed (&optional func from to frombuf |
| 5522 | ;;; tobuf format) | 5525 | ;;; tobuf format) |
| 5523 | (defun allout-process-exposed (&optional func from to frombuf tobuf | 5526 | (defun allout-process-exposed (&optional func from to frombuf tobuf |
| 5524 | format start-num) | 5527 | format _start-num) |
| 5525 | "Map function on exposed parts of current topic; results to another buffer. | 5528 | "Map function on exposed parts of current topic; results to another buffer. |
| 5526 | 5529 | ||
| 5527 | All args are options; default values itemized below. | 5530 | All args are options; default values itemized below. |
| @@ -5685,7 +5688,7 @@ used verbatim." | |||
| 5685 | 5688 | ||
| 5686 | ;;;_ - LaTeX formatting | 5689 | ;;;_ - LaTeX formatting |
| 5687 | ;;;_ > allout-latex-verb-quote (string &optional flow) | 5690 | ;;;_ > allout-latex-verb-quote (string &optional flow) |
| 5688 | (defun allout-latex-verb-quote (string &optional flow) | 5691 | (defun allout-latex-verb-quote (string &optional _flow) |
| 5689 | "Return copy of STRING for literal reproduction across LaTeX processing. | 5692 | "Return copy of STRING for literal reproduction across LaTeX processing. |
| 5690 | Expresses the original characters (including carriage returns) of the | 5693 | Expresses the original characters (including carriage returns) of the |
| 5691 | string across LaTeX processing." | 5694 | string across LaTeX processing." |
| @@ -5706,7 +5709,7 @@ across LaTeX processing, within the context of a `verbatim' | |||
| 5706 | environment. Leaves point at the end of the line." | 5709 | environment. Leaves point at the end of the line." |
| 5707 | (let ((inhibit-field-text-motion t)) | 5710 | (let ((inhibit-field-text-motion t)) |
| 5708 | (beginning-of-line) | 5711 | (beginning-of-line) |
| 5709 | (let ((beg (point)) | 5712 | (let (;(beg (point)) |
| 5710 | (end (point-at-eol))) | 5713 | (end (point-at-eol))) |
| 5711 | (save-match-data | 5714 | (save-match-data |
| 5712 | (while (re-search-forward "\\\\" | 5715 | (while (re-search-forward "\\\\" |
| @@ -5790,7 +5793,7 @@ environment. Leaves point at the end of the line." | |||
| 5790 | (set-buffer buffer) | 5793 | (set-buffer buffer) |
| 5791 | (insert "\n\\end{document}\n")) | 5794 | (insert "\n\\end{document}\n")) |
| 5792 | ;;;_ > allout-latexify-one-item (depth prefix bullet text) | 5795 | ;;;_ > allout-latexify-one-item (depth prefix bullet text) |
| 5793 | (defun allout-latexify-one-item (depth prefix bullet text) | 5796 | (defun allout-latexify-one-item (depth _prefix bullet text) |
| 5794 | "Insert LaTeX commands for formatting one outline item. | 5797 | "Insert LaTeX commands for formatting one outline item. |
| 5795 | 5798 | ||
| 5796 | Args are the topics numeric DEPTH, the header PREFIX lead string, the | 5799 | Args are the topics numeric DEPTH, the header PREFIX lead string, the |
| @@ -6359,7 +6362,7 @@ save. See `allout-encrypt-unencrypted-on-saves' for more info." | |||
| 6359 | ;;;###autoload | 6362 | ;;;###autoload |
| 6360 | (defalias 'outlinify-sticky 'outlineify-sticky) | 6363 | (defalias 'outlinify-sticky 'outlineify-sticky) |
| 6361 | ;;;###autoload | 6364 | ;;;###autoload |
| 6362 | (defun outlineify-sticky (&optional arg) | 6365 | (defun outlineify-sticky (&optional _arg) |
| 6363 | "Activate outline mode and establish file var so it is started subsequently. | 6366 | "Activate outline mode and establish file var so it is started subsequently. |
| 6364 | 6367 | ||
| 6365 | See `allout-layout' and customization of `allout-auto-activation' | 6368 | See `allout-layout' and customization of `allout-auto-activation' |
diff --git a/lisp/apropos.el b/lisp/apropos.el index 000d2d87d05..7a1a6f6a75a 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el | |||
| @@ -1121,7 +1121,7 @@ If non-nil TEXT is a string that will be printed as a heading." | |||
| 1121 | (apropos-print-doc 2 | 1121 | (apropos-print-doc 2 |
| 1122 | (if (commandp symbol) | 1122 | (if (commandp symbol) |
| 1123 | 'apropos-command | 1123 | 'apropos-command |
| 1124 | (if (apropos-macrop symbol) | 1124 | (if (macrop symbol) |
| 1125 | 'apropos-macro | 1125 | 'apropos-macro |
| 1126 | 'apropos-function)) | 1126 | 'apropos-function)) |
| 1127 | (not nosubst)) | 1127 | (not nosubst)) |
| @@ -1139,17 +1139,6 @@ If non-nil TEXT is a string that will be printed as a heading." | |||
| 1139 | (prog1 apropos-accumulator | 1139 | (prog1 apropos-accumulator |
| 1140 | (setq apropos-accumulator ()))) ; permit gc | 1140 | (setq apropos-accumulator ()))) ; permit gc |
| 1141 | 1141 | ||
| 1142 | (defun apropos-macrop (symbol) | ||
| 1143 | "Return t if SYMBOL is a Lisp macro." | ||
| 1144 | (and (fboundp symbol) | ||
| 1145 | (consp (setq symbol | ||
| 1146 | (symbol-function symbol))) | ||
| 1147 | (or (eq (car symbol) 'macro) | ||
| 1148 | (if (autoloadp symbol) | ||
| 1149 | (memq (nth 4 symbol) | ||
| 1150 | '(macro t)))))) | ||
| 1151 | |||
| 1152 | |||
| 1153 | (defun apropos-print-doc (i type do-keys) | 1142 | (defun apropos-print-doc (i type do-keys) |
| 1154 | (let ((doc (nth i apropos-item))) | 1143 | (let ((doc (nth i apropos-item))) |
| 1155 | (when (stringp doc) | 1144 | (when (stringp doc) |
diff --git a/lisp/avoid.el b/lisp/avoid.el index c92d456ef0c..72f90a30ff5 100644 --- a/lisp/avoid.el +++ b/lisp/avoid.el | |||
| @@ -41,9 +41,9 @@ | |||
| 41 | ;; | 41 | ;; |
| 42 | ;; (if (eq window-system 'x) | 42 | ;; (if (eq window-system 'x) |
| 43 | ;; (mouse-avoidance-set-pointer-shape | 43 | ;; (mouse-avoidance-set-pointer-shape |
| 44 | ;; (eval (nth (random 4) | 44 | ;; (nth (random 4) |
| 45 | ;; '(x-pointer-man x-pointer-spider | 45 | ;; (list x-pointer-man x-pointer-spider |
| 46 | ;; x-pointer-gobbler x-pointer-gumby))))) | 46 | ;; x-pointer-gobbler x-pointer-gumby)))) |
| 47 | ;; | 47 | ;; |
| 48 | ;; For completely random pointer shape, replace the setq above with: | 48 | ;; For completely random pointer shape, replace the setq above with: |
| 49 | ;; (setq x-pointer-shape (mouse-avoidance-random-shape)) | 49 | ;; (setq x-pointer-shape (mouse-avoidance-random-shape)) |
| @@ -154,13 +154,15 @@ TOP-OR-BOTTOM-POS: Distance from top or bottom edge of frame or window." | |||
| 154 | (defun mouse-avoidance-point-position () | 154 | (defun mouse-avoidance-point-position () |
| 155 | "Return the position of point as (FRAME X . Y). | 155 | "Return the position of point as (FRAME X . Y). |
| 156 | Analogous to `mouse-position'." | 156 | Analogous to `mouse-position'." |
| 157 | (let ((edges (window-inside-edges)) | 157 | (let* ((edges (window-inside-edges)) |
| 158 | (x-y (posn-x-y (posn-at-point)))) | 158 | (posn-at-point (posn-at-point)) |
| 159 | (cons (selected-frame) | 159 | (x-y (and posn-at-point (posn-x-y posn-at-point)))) |
| 160 | (cons (+ (car edges) | 160 | (when x-y |
| 161 | (/ (car x-y) (frame-char-width))) | 161 | (cons (selected-frame) |
| 162 | (+ (car (cdr edges)) | 162 | (cons (+ (car edges) |
| 163 | (/ (cdr x-y) (frame-char-height))))))) | 163 | (/ (car x-y) (frame-char-width))) |
| 164 | (+ (car (cdr edges)) | ||
| 165 | (/ (cdr x-y) (frame-char-height)))))))) | ||
| 164 | 166 | ||
| 165 | ;(defun mouse-avoidance-point-position-test () | 167 | ;(defun mouse-avoidance-point-position-test () |
| 166 | ; (interactive) | 168 | ; (interactive) |
| @@ -185,19 +187,21 @@ MOUSE is the current mouse position as returned by `mouse-position'. | |||
| 185 | Acceptable distance is defined by `mouse-avoidance-threshold'." | 187 | Acceptable distance is defined by `mouse-avoidance-threshold'." |
| 186 | (let* ((frame (car mouse)) | 188 | (let* ((frame (car mouse)) |
| 187 | (mouse-y (cdr (cdr mouse))) | 189 | (mouse-y (cdr (cdr mouse))) |
| 188 | (tool-bar-lines (frame-parameter nil 'tool-bar-lines))) | 190 | (tool-bar-lines (frame-parameter nil 'tool-bar-lines)) |
| 191 | point) | ||
| 189 | (or tool-bar-lines | 192 | (or tool-bar-lines |
| 190 | (setq tool-bar-lines 0)) | 193 | (setq tool-bar-lines 0)) |
| 191 | (if (and mouse-y (< mouse-y tool-bar-lines)) | 194 | (cond |
| 192 | nil | 195 | ((and mouse-y (< mouse-y tool-bar-lines)) |
| 193 | (let ((point (mouse-avoidance-point-position)) | 196 | nil) |
| 194 | (mouse-x (car (cdr mouse)))) | 197 | ((setq point (mouse-avoidance-point-position)) |
| 198 | (let ((mouse-x (car (cdr mouse)))) | ||
| 195 | (and (eq frame (car point)) | 199 | (and (eq frame (car point)) |
| 196 | (not (null mouse-x)) | 200 | (not (null mouse-x)) |
| 197 | (< (abs (- mouse-x (car (cdr point)))) | 201 | (< (abs (- mouse-x (car (cdr point)))) |
| 198 | mouse-avoidance-threshold) | 202 | mouse-avoidance-threshold) |
| 199 | (< (abs (- mouse-y (cdr (cdr point)))) | 203 | (< (abs (- mouse-y (cdr (cdr point)))) |
| 200 | mouse-avoidance-threshold)))))) | 204 | mouse-avoidance-threshold))))))) |
| 201 | 205 | ||
| 202 | (defun mouse-avoidance-banish-destination () | 206 | (defun mouse-avoidance-banish-destination () |
| 203 | "The position to which Mouse Avoidance mode `banish' moves the mouse. | 207 | "The position to which Mouse Avoidance mode `banish' moves the mouse. |
diff --git a/lisp/bindings.el b/lisp/bindings.el index 005e43b3059..2ea6713216d 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -1220,7 +1220,7 @@ if `inhibit-field-text-motion' is non-nil." | |||
| 1220 | (define-key map "n" 'number-to-register) | 1220 | (define-key map "n" 'number-to-register) |
| 1221 | (define-key map "+" 'increment-register) | 1221 | (define-key map "+" 'increment-register) |
| 1222 | (define-key map "w" 'window-configuration-to-register) | 1222 | (define-key map "w" 'window-configuration-to-register) |
| 1223 | (define-key map "f" 'frame-configuration-to-register) | 1223 | (define-key map "f" 'frameset-to-register) |
| 1224 | map) | 1224 | map) |
| 1225 | "Keymap for subcommands of C-x r.") | 1225 | "Keymap for subcommands of C-x r.") |
| 1226 | (define-key ctl-x-map "r" ctl-x-r-map) | 1226 | (define-key ctl-x-map "r" ctl-x-r-map) |
diff --git a/lisp/bookmark.el b/lisp/bookmark.el index b1cdedb83c5..9514317809b 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el | |||
| @@ -1112,12 +1112,9 @@ then offer interactively to relocate BOOKMARK-NAME-OR-RECORD." | |||
| 1112 | (setq bookmark-current-bookmark bookmark-name-or-record)) | 1112 | (setq bookmark-current-bookmark bookmark-name-or-record)) |
| 1113 | nil) | 1113 | nil) |
| 1114 | 1114 | ||
| 1115 | (put 'bookmark-error-no-filename | 1115 | (define-error 'bookmark-errors nil) |
| 1116 | 'error-conditions | 1116 | (define-error 'bookmark-error-no-filename |
| 1117 | '(error bookmark-errors bookmark-error-no-filename)) | 1117 | "Bookmark has no associated file (or directory)" 'bookmark-errors) |
| 1118 | (put 'bookmark-error-no-filename | ||
| 1119 | 'error-message | ||
| 1120 | "Bookmark has no associated file (or directory)") | ||
| 1121 | 1118 | ||
| 1122 | (defun bookmark-default-handler (bmk-record) | 1119 | (defun bookmark-default-handler (bmk-record) |
| 1123 | "Default handler to jump to a particular bookmark location. | 1120 | "Default handler to jump to a particular bookmark location. |
diff --git a/lisp/bs.el b/lisp/bs.el index af213333a79..6871a7eeb83 100644 --- a/lisp/bs.el +++ b/lisp/bs.el | |||
| @@ -1406,7 +1406,7 @@ for buffer selection." | |||
| 1406 | (select-window active-window) | 1406 | (select-window active-window) |
| 1407 | (bs--restore-window-config) | 1407 | (bs--restore-window-config) |
| 1408 | (setq bs--window-config-coming-from (current-window-configuration)) | 1408 | (setq bs--window-config-coming-from (current-window-configuration)) |
| 1409 | (when (> (window-height (selected-window)) 7) | 1409 | (when (> (window-height) 7) |
| 1410 | ;; Errors would mess with the window configuration (bug#10882). | 1410 | ;; Errors would mess with the window configuration (bug#10882). |
| 1411 | (ignore-errors (select-window (split-window-below))))) | 1411 | (ignore-errors (select-window (split-window-below))))) |
| 1412 | (bs-show-in-buffer liste) | 1412 | (bs-show-in-buffer liste) |
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 1db9b7229f3..58fde695b39 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el | |||
| @@ -591,7 +591,7 @@ means list those buffers and no others." | |||
| 591 | (select-window (posn-window (event-end event))) | 591 | (select-window (posn-window (event-end event))) |
| 592 | (let ((buffer (tabulated-list-get-id (posn-point (event-end event))))) | 592 | (let ((buffer (tabulated-list-get-id (posn-point (event-end event))))) |
| 593 | (when (buffer-live-p buffer) | 593 | (when (buffer-live-p buffer) |
| 594 | (if (and (window-dedicated-p (selected-window)) | 594 | (if (and (window-dedicated-p) |
| 595 | (eq (selected-window) (frame-root-window))) | 595 | (eq (selected-window) (frame-root-window))) |
| 596 | (switch-to-buffer-other-frame buffer) | 596 | (switch-to-buffer-other-frame buffer) |
| 597 | (switch-to-buffer buffer))))) | 597 | (switch-to-buffer buffer))))) |
diff --git a/lisp/calc/calc-keypd.el b/lisp/calc/calc-keypd.el index a720f12a573..bd24bf7f15d 100644 --- a/lisp/calc/calc-keypd.el +++ b/lisp/calc/calc-keypd.el | |||
| @@ -349,8 +349,7 @@ | |||
| 349 | (if (> (length (car key)) cwid) | 349 | (if (> (length (car key)) cwid) |
| 350 | (substring (car key) 0 cwid) | 350 | (substring (car key) 0 cwid) |
| 351 | (car key)))) | 351 | (car key)))) |
| 352 | (wid (length name)) | 352 | (wid (length name))) |
| 353 | (pad (- cwid (/ wid 2)))) | ||
| 354 | (insert (make-string (/ (- cwid wid) 2) 32) | 353 | (insert (make-string (/ (- cwid wid) 2) 32) |
| 355 | name | 354 | name |
| 356 | (make-string (/ (- cwid wid -1) 2) 32) | 355 | (make-string (/ (- cwid wid -1) 2) 32) |
| @@ -399,7 +398,6 @@ | |||
| 399 | inv calc-inverse-flag) | 398 | inv calc-inverse-flag) |
| 400 | calc-hyperbolic-flag)) | 399 | calc-hyperbolic-flag)) |
| 401 | (invhyp t) | 400 | (invhyp t) |
| 402 | (menu (symbol-value (nth calc-keypad-menu calc-keypad-menus))) | ||
| 403 | (input calc-keypad-input) | 401 | (input calc-keypad-input) |
| 404 | (iexpon (and input | 402 | (iexpon (and input |
| 405 | (or (string-match "\\*[0-9]+\\.\\^" input) | 403 | (or (string-match "\\*[0-9]+\\.\\^" input) |
| @@ -535,19 +533,22 @@ | |||
| 535 | 533 | ||
| 536 | (defun calc-keypad-left-click (event) | 534 | (defun calc-keypad-left-click (event) |
| 537 | "Handle a left-button mouse click in Calc Keypad window." | 535 | "Handle a left-button mouse click in Calc Keypad window." |
| 536 | ;; FIXME: Why not use "@e" instead to select the buffer? | ||
| 538 | (interactive "e") | 537 | (interactive "e") |
| 539 | (with-current-buffer calc-keypad-buffer | 538 | (with-current-buffer calc-keypad-buffer |
| 540 | (goto-char (posn-point (event-start event))) | 539 | (goto-char (posn-point (event-start event))) |
| 541 | (calc-keypad-press))) | 540 | (calc-keypad-press))) |
| 542 | 541 | ||
| 543 | (defun calc-keypad-right-click (event) | 542 | (defun calc-keypad-right-click (_event) |
| 544 | "Handle a right-button mouse click in Calc Keypad window." | 543 | "Handle a right-button mouse click in Calc Keypad window." |
| 544 | ;; FIXME: Why not use "@e" instead to select the buffer? | ||
| 545 | (interactive "e") | 545 | (interactive "e") |
| 546 | (with-current-buffer calc-keypad-buffer | 546 | (with-current-buffer calc-keypad-buffer |
| 547 | (calc-keypad-menu))) | 547 | (calc-keypad-menu))) |
| 548 | 548 | ||
| 549 | (defun calc-keypad-middle-click (event) | 549 | (defun calc-keypad-middle-click (_event) |
| 550 | "Handle a middle-button mouse click in Calc Keypad window." | 550 | "Handle a middle-button mouse click in Calc Keypad window." |
| 551 | ;; FIXME: Why not use "@e" instead to select the buffer? | ||
| 551 | (interactive "e") | 552 | (interactive "e") |
| 552 | (with-current-buffer calc-keypad-buffer | 553 | (with-current-buffer calc-keypad-buffer |
| 553 | (calc-keypad-menu-back))) | 554 | (calc-keypad-menu-back))) |
| @@ -588,7 +589,6 @@ | |||
| 588 | (defun calc-keypad-execute () | 589 | (defun calc-keypad-execute () |
| 589 | (interactive) | 590 | (interactive) |
| 590 | (let* ((prompt "Calc keystrokes: ") | 591 | (let* ((prompt "Calc keystrokes: ") |
| 591 | (flush 'x-flush-mouse-queue) | ||
| 592 | (prefix nil) | 592 | (prefix nil) |
| 593 | keys cmd) | 593 | keys cmd) |
| 594 | (save-excursion | 594 | (save-excursion |
| @@ -605,10 +605,9 @@ | |||
| 605 | (progn | 605 | (progn |
| 606 | (setq last-command-event (aref keys (1- (length keys)))) | 606 | (setq last-command-event (aref keys (1- (length keys)))) |
| 607 | (command-execute cmd) | 607 | (command-execute cmd) |
| 608 | (setq flush 'not-any-more | 608 | (setq prefix t |
| 609 | prefix t | ||
| 610 | prompt (concat prompt (key-description keys) " "))) | 609 | prompt (concat prompt (key-description keys) " "))) |
| 611 | (eq cmd flush))))) ; skip mouse-up event | 610 | nil)))) ; skip mouse-up event |
| 612 | (message "") | 611 | (message "") |
| 613 | (if (commandp cmd) | 612 | (if (commandp cmd) |
| 614 | (command-execute cmd) | 613 | (command-execute cmd) |
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 8a17ad7ce30..2eeb880c34d 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el | |||
| @@ -921,15 +921,12 @@ Used by `calc-user-invocation'.") | |||
| 921 | (put 'calc-mode 'mode-class 'special) | 921 | (put 'calc-mode 'mode-class 'special) |
| 922 | (put 'calc-trail-mode 'mode-class 'special) | 922 | (put 'calc-trail-mode 'mode-class 'special) |
| 923 | 923 | ||
| 924 | ;; Define "inexact-result" as an e-lisp error symbol. | 924 | (define-error 'calc-error "Calc internal error") |
| 925 | (put 'inexact-result 'error-conditions '(error inexact-result calc-error)) | 925 | (define-error 'inexact-result |
| 926 | (put 'inexact-result 'error-message "Calc internal error (inexact-result)") | 926 | "Calc internal error (inexact-result)" 'calc-error) |
| 927 | 927 | ||
| 928 | ;; Define "math-overflow" and "math-underflow" as e-lisp error symbols. | 928 | (define-error 'math-overflow "Floating-point overflow occurred" 'calc-error) |
| 929 | (put 'math-overflow 'error-conditions '(error math-overflow calc-error)) | 929 | (define-error 'math-underflow "Floating-point underflow occurred" 'calc-error) |
| 930 | (put 'math-overflow 'error-message "Floating-point overflow occurred") | ||
| 931 | (put 'math-underflow 'error-conditions '(error math-underflow calc-error)) | ||
| 932 | (put 'math-underflow 'error-message "Floating-point underflow occurred") | ||
| 933 | 930 | ||
| 934 | (defvar calc-trail-pointer nil | 931 | (defvar calc-trail-pointer nil |
| 935 | "The \"current\" entry in trail buffer.") | 932 | "The \"current\" entry in trail buffer.") |
| @@ -1441,7 +1438,7 @@ commands given here will actually operate on the *Calculator* stack." | |||
| 1441 | (calc-keypad)))) | 1438 | (calc-keypad)))) |
| 1442 | (when (get-buffer-window "*Calc Keypad*") | 1439 | (when (get-buffer-window "*Calc Keypad*") |
| 1443 | (calc-keypad) | 1440 | (calc-keypad) |
| 1444 | (set-buffer (window-buffer (selected-window)))) | 1441 | (set-buffer (window-buffer))) |
| 1445 | (if (eq major-mode 'calc-mode) | 1442 | (if (eq major-mode 'calc-mode) |
| 1446 | (calc-quit) | 1443 | (calc-quit) |
| 1447 | (let ((oldbuf (current-buffer))) | 1444 | (let ((oldbuf (current-buffer))) |
diff --git a/lisp/calculator.el b/lisp/calculator.el index 8b253b810f5..c4611c12d87 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; calculator.el --- a [not so] simple calculator for Emacs | 1 | ;;; calculator.el --- a [not so] simple calculator for Emacs -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1998, 2000-2013 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1998, 2000-2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -131,8 +131,8 @@ The displayer is a symbol, a string or an expression. A symbol should | |||
| 131 | be the name of a one-argument function, a string is used with a single | 131 | be the name of a one-argument function, a string is used with a single |
| 132 | argument and an expression will be evaluated with the variable `num' | 132 | argument and an expression will be evaluated with the variable `num' |
| 133 | bound to whatever should be displayed. If it is a function symbol, it | 133 | bound to whatever should be displayed. If it is a function symbol, it |
| 134 | should be able to handle special symbol arguments, currently 'left and | 134 | should be able to handle special symbol arguments, currently `left' and |
| 135 | 'right which will be sent by special keys to modify display parameters | 135 | `right' which will be sent by special keys to modify display parameters |
| 136 | associated with the displayer function (for example to change the number | 136 | associated with the displayer function (for example to change the number |
| 137 | of digits displayed). | 137 | of digits displayed). |
| 138 | 138 | ||
| @@ -241,6 +241,8 @@ Examples: | |||
| 241 | ;;;===================================================================== | 241 | ;;;===================================================================== |
| 242 | ;;; Code: | 242 | ;;; Code: |
| 243 | 243 | ||
| 244 | (eval-when-compile (require 'cl-lib)) | ||
| 245 | |||
| 244 | ;;;--------------------------------------------------------------------- | 246 | ;;;--------------------------------------------------------------------- |
| 245 | ;;; Variables | 247 | ;;; Variables |
| 246 | 248 | ||
| @@ -708,7 +710,7 @@ See the documentation for `calculator-mode' for more information." | |||
| 708 | ;; can't use 'noprompt, bug in electric.el | 710 | ;; can't use 'noprompt, bug in electric.el |
| 709 | (lambda () 'noprompt) | 711 | (lambda () 'noprompt) |
| 710 | nil | 712 | nil |
| 711 | (lambda (x y) (calculator-update-display)))) | 713 | (lambda (_x _y) (calculator-update-display)))) |
| 712 | (and calculator-buffer | 714 | (and calculator-buffer |
| 713 | (catch 'calculator-done (calculator-quit))) | 715 | (catch 'calculator-done (calculator-quit))) |
| 714 | (use-local-map old-l-map) | 716 | (use-local-map old-l-map) |
| @@ -905,9 +907,9 @@ The string is set not to exceed the screen width." | |||
| 905 | value) | 907 | value) |
| 906 | (car (read-from-string | 908 | (car (read-from-string |
| 907 | (cond ((equal "." str) "0.0") | 909 | (cond ((equal "." str) "0.0") |
| 908 | ((string-match "[eE][+-]?$" str) (concat str "0")) | 910 | ((string-match-p "[eE][+-]?$" str) (concat str "0")) |
| 909 | ((string-match "\\.[0-9]\\|[eE]" str) str) | 911 | ((string-match-p "\\.[0-9]\\|[eE]" str) str) |
| 910 | ((string-match "\\." str) | 912 | ((string-match-p "\\." str) |
| 911 | ;; do this because Emacs reads "23." as an integer | 913 | ;; do this because Emacs reads "23." as an integer |
| 912 | (concat str "0")) | 914 | (concat str "0")) |
| 913 | ((stringp str) (concat str ".0")) | 915 | ((stringp str) (concat str ".0")) |
| @@ -1124,11 +1126,10 @@ the 'left or 'right when one of the standard modes is used." | |||
| 1124 | (format calculator-displayer num)) | 1126 | (format calculator-displayer num)) |
| 1125 | ((symbolp calculator-displayer) | 1127 | ((symbolp calculator-displayer) |
| 1126 | (funcall calculator-displayer num)) | 1128 | (funcall calculator-displayer num)) |
| 1127 | ((and (consp calculator-displayer) | 1129 | ((eq 'std (car-safe calculator-displayer)) |
| 1128 | (eq 'std (car calculator-displayer))) | ||
| 1129 | (calculator-standard-displayer num (cadr calculator-displayer))) | 1130 | (calculator-standard-displayer num (cadr calculator-displayer))) |
| 1130 | ((listp calculator-displayer) | 1131 | ((listp calculator-displayer) |
| 1131 | (eval calculator-displayer)) | 1132 | (eval calculator-displayer `((num. ,num)))) |
| 1132 | (t (prin1-to-string num t)))) | 1133 | (t (prin1-to-string num t)))) |
| 1133 | ;; operators are printed here | 1134 | ;; operators are printed here |
| 1134 | (t (prin1-to-string (nth 1 num) t)))) | 1135 | (t (prin1-to-string (nth 1 num) t)))) |
| @@ -1273,29 +1274,24 @@ arguments." | |||
| 1273 | ;; smaller than calculator-epsilon (1e-15). I don't think this is | 1274 | ;; smaller than calculator-epsilon (1e-15). I don't think this is |
| 1274 | ;; necessary now. | 1275 | ;; necessary now. |
| 1275 | (if (symbolp f) | 1276 | (if (symbolp f) |
| 1276 | (cond ((and X Y) (funcall f X Y)) | 1277 | (cond ((and X Y) (funcall f X Y)) |
| 1277 | (X (funcall f X)) | 1278 | (X (funcall f X)) |
| 1278 | (t (funcall f))) | 1279 | (t (funcall f))) |
| 1279 | ;; f is an expression | 1280 | ;; f is an expression |
| 1280 | (let* ((__f__ f) ; so we can get this value below... | 1281 | (let* ((TX (calculator-truncate X)) |
| 1281 | (TX (calculator-truncate X)) | ||
| 1282 | (TY (and Y (calculator-truncate Y))) | 1282 | (TY (and Y (calculator-truncate Y))) |
| 1283 | (DX (if calculator-deg (/ (* X pi) 180) X)) | 1283 | (DX (if calculator-deg (/ (* X pi) 180) X)) |
| 1284 | (L calculator-saved-list) | 1284 | (L calculator-saved-list)) |
| 1285 | (Fbound (fboundp 'F)) | 1285 | (cl-letf (((symbol-function 'F) |
| 1286 | (Fsave (and Fbound (symbol-function 'F))) | 1286 | (lambda (&optional x y) (calculator-funcall f x y))) |
| 1287 | (Dbound (fboundp 'D)) | 1287 | ((symbol-function 'D) |
| 1288 | (Dsave (and Dbound (symbol-function 'D)))) | 1288 | (lambda (x) (if calculator-deg (/ (* x 180) float-pi) x)))) |
| 1289 | ;; a shortened version of flet | 1289 | (eval f `((X . ,X) |
| 1290 | (fset 'F (function | 1290 | (Y . ,Y) |
| 1291 | (lambda (&optional x y) | 1291 | (TX . ,TX) |
| 1292 | (calculator-funcall __f__ x y)))) | 1292 | (TY . ,TY) |
| 1293 | (fset 'D (function | 1293 | (DX . ,DX) |
| 1294 | (lambda (x) | 1294 | (L . ,L)))))) |
| 1295 | (if calculator-deg (/ (* x 180) float-pi) x)))) | ||
| 1296 | (unwind-protect (eval f) | ||
| 1297 | (if Fbound (fset 'F Fsave) (fmakunbound 'F)) | ||
| 1298 | (if Dbound (fset 'D Dsave) (fmakunbound 'D))))) | ||
| 1299 | (error 0))) | 1295 | (error 0))) |
| 1300 | 1296 | ||
| 1301 | ;;;--------------------------------------------------------------------- | 1297 | ;;;--------------------------------------------------------------------- |
| @@ -1366,7 +1362,7 @@ OP is the operator (if any) that caused this call." | |||
| 1366 | (or calculator-display-fragile | 1362 | (or calculator-display-fragile |
| 1367 | (not (numberp (car calculator-stack)))) | 1363 | (not (numberp (car calculator-stack)))) |
| 1368 | (not (and calculator-curnum | 1364 | (not (and calculator-curnum |
| 1369 | (string-match "[.eE]" calculator-curnum)))) | 1365 | (string-match-p "[.eE]" calculator-curnum)))) |
| 1370 | ;; enter the period on the same condition as a digit, only if no | 1366 | ;; enter the period on the same condition as a digit, only if no |
| 1371 | ;; period or exponent entered yet | 1367 | ;; period or exponent entered yet |
| 1372 | (progn | 1368 | (progn |
| @@ -1382,7 +1378,7 @@ OP is the operator (if any) that caused this call." | |||
| 1382 | (if (and (or calculator-display-fragile | 1378 | (if (and (or calculator-display-fragile |
| 1383 | (not (numberp (car calculator-stack)))) | 1379 | (not (numberp (car calculator-stack)))) |
| 1384 | (not (and calculator-curnum | 1380 | (not (and calculator-curnum |
| 1385 | (string-match "[eE]" calculator-curnum)))) | 1381 | (string-match-p "[eE]" calculator-curnum)))) |
| 1386 | ;; same condition as above, also no E so far | 1382 | ;; same condition as above, also no E so far |
| 1387 | (progn | 1383 | (progn |
| 1388 | (calculator-clear-fragile) | 1384 | (calculator-clear-fragile) |
| @@ -1452,7 +1448,7 @@ no need for negative numbers since these are handled by unary operators)." | |||
| 1452 | (interactive) | 1448 | (interactive) |
| 1453 | (if (and (not calculator-display-fragile) | 1449 | (if (and (not calculator-display-fragile) |
| 1454 | calculator-curnum | 1450 | calculator-curnum |
| 1455 | (string-match "[eE]$" calculator-curnum)) | 1451 | (string-match-p "[eE]$" calculator-curnum)) |
| 1456 | (calculator-digit) | 1452 | (calculator-digit) |
| 1457 | (calculator-op))) | 1453 | (calculator-op))) |
| 1458 | 1454 | ||
| @@ -1661,8 +1657,7 @@ Used by `calculator-paste' and `get-register'." | |||
| 1661 | (setq str (concat (or (match-string 1 str) "0") | 1657 | (setq str (concat (or (match-string 1 str) "0") |
| 1662 | (or (match-string 2 str) ".0") | 1658 | (or (match-string 2 str) ".0") |
| 1663 | (or (match-string 3 str) "")))) | 1659 | (or (match-string 3 str) "")))) |
| 1664 | (condition-case nil (calculator-string-to-number str) | 1660 | (ignore-errors (calculator-string-to-number str))))) |
| 1665 | (error nil))))) | ||
| 1666 | 1661 | ||
| 1667 | (defun calculator-get-register (reg) | 1662 | (defun calculator-get-register (reg) |
| 1668 | "Get a value from a register REG." | 1663 | "Get a value from a register REG." |
| @@ -1728,13 +1723,11 @@ Used by `calculator-paste' and `get-register'." | |||
| 1728 | (interactive) | 1723 | (interactive) |
| 1729 | (set-buffer calculator-buffer) | 1724 | (set-buffer calculator-buffer) |
| 1730 | (let ((inhibit-read-only t)) (erase-buffer)) | 1725 | (let ((inhibit-read-only t)) (erase-buffer)) |
| 1731 | (if (not calculator-electric-mode) | 1726 | (unless calculator-electric-mode |
| 1732 | (progn | 1727 | (ignore-errors |
| 1733 | (condition-case nil | 1728 | (while (get-buffer-window calculator-buffer) |
| 1734 | (while (get-buffer-window calculator-buffer) | 1729 | (delete-window (get-buffer-window calculator-buffer)))) |
| 1735 | (delete-window (get-buffer-window calculator-buffer))) | 1730 | (kill-buffer calculator-buffer)) |
| 1736 | (error nil)) | ||
| 1737 | (kill-buffer calculator-buffer))) | ||
| 1738 | (setq calculator-buffer nil) | 1731 | (setq calculator-buffer nil) |
| 1739 | (message "Calculator done.") | 1732 | (message "Calculator done.") |
| 1740 | (if calculator-electric-mode (throw 'calculator-done nil))) | 1733 | (if calculator-electric-mode (throw 'calculator-done nil))) |
| @@ -1768,14 +1761,11 @@ To use this, apply a binary operator (evaluate it), then call this." | |||
| 1768 | 1761 | ||
| 1769 | (defun calculator-integer-p (x) | 1762 | (defun calculator-integer-p (x) |
| 1770 | "Non-nil if X is equal to an integer." | 1763 | "Non-nil if X is equal to an integer." |
| 1771 | (condition-case nil | 1764 | (ignore-errors (= x (ftruncate x)))) |
| 1772 | (= x (ftruncate x)) | ||
| 1773 | (error nil))) | ||
| 1774 | 1765 | ||
| 1775 | (defun calculator-expt (x y) | 1766 | (defun calculator-expt (x y) |
| 1776 | "Compute X^Y, dealing with errors appropriately." | 1767 | "Compute X^Y, dealing with errors appropriately." |
| 1777 | (condition-case | 1768 | (condition-case nil |
| 1778 | nil | ||
| 1779 | (expt x y) | 1769 | (expt x y) |
| 1780 | (domain-error 0.0e+NaN) | 1770 | (domain-error 0.0e+NaN) |
| 1781 | (range-error | 1771 | (range-error |
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index ea3a5b2caf2..97b20f6b02b 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el | |||
| @@ -472,7 +472,7 @@ separate appointment." | |||
| 472 | (shrink-window-if-larger-than-buffer (get-buffer-window appt-disp-buf t)) | 472 | (shrink-window-if-larger-than-buffer (get-buffer-window appt-disp-buf t)) |
| 473 | (set-buffer-modified-p nil) | 473 | (set-buffer-modified-p nil) |
| 474 | (setq buffer-read-only t) | 474 | (setq buffer-read-only t) |
| 475 | (raise-frame (selected-frame)) | 475 | (raise-frame) |
| 476 | (select-window this-window))) | 476 | (select-window this-window))) |
| 477 | 477 | ||
| 478 | (defun appt-delete-window () | 478 | (defun appt-delete-window () |
diff --git a/lisp/calendar/cal-china.el b/lisp/calendar/cal-china.el index 86e6efa9696..ca9af673cc2 100644 --- a/lisp/calendar/cal-china.el +++ b/lisp/calendar/cal-china.el | |||
| @@ -327,19 +327,7 @@ Gregorian year Y-1 to the Chinese month of the solstice of Gregorian year Y." | |||
| 327 | (defvar calendar-chinese-year-cache | 327 | (defvar calendar-chinese-year-cache |
| 328 | ;; Maintainers: delete existing value, position point at start of | 328 | ;; Maintainers: delete existing value, position point at start of |
| 329 | ;; empty line, then call M-: (calendar-chinese-year-cache-init N) | 329 | ;; empty line, then call M-: (calendar-chinese-year-cache-init N) |
| 330 | '((2000 (12 730126) (1 730155) (2 730185) (3 730215) (4 730244) (5 730273) | 330 | '((2005 (12 731956) (1 731986) (2 732015) (3 732045) (4 732074) (5 732104) |
| 331 | (6 730303) (7 730332) (8 730361) (9 730391) (10 730420) (11 730450)) | ||
| 332 | (2001 (12 730480) (1 730509) (2 730539) (3 730569) (4 730598) (4.5 730628) | ||
| 333 | (5 730657) (6 730687) (7 730716) (8 730745) (9 730775) (10 730804) | ||
| 334 | (11 730834)) | ||
| 335 | (2002 (12 730863) (1 730893) (2 730923) (3 730953) (4 730982) (5 731012) | ||
| 336 | (6 731041) (7 731071) (8 731100) (9 731129) (10 731159) (11 731188)) | ||
| 337 | (2003 (12 731218) (1 731247) (2 731277) (3 731307) (4 731336) (5 731366) | ||
| 338 | (6 731396) (7 731425) (8 731455) (9 731484) (10 731513) (11 731543)) | ||
| 339 | (2004 (12 731572) (1 731602) (2 731631) (2.5 731661) (3 731690) (4 731720) | ||
| 340 | (5 731750) (6 731779) (7 731809) (8 731838) (9 731868) (10 731897) | ||
| 341 | (11 731927)) | ||
| 342 | (2005 (12 731956) (1 731986) (2 732015) (3 732045) (4 732074) (5 732104) | ||
| 343 | (6 732133) (7 732163) (8 732193) (9 732222) (10 732252) (11 732281)) | 331 | (6 732133) (7 732163) (8 732193) (9 732222) (10 732252) (11 732281)) |
| 344 | (2006 (12 732311) (1 732340) (2 732370) (3 732399) (4 732429) (5 732458) | 332 | (2006 (12 732311) (1 732340) (2 732370) (3 732399) (4 732429) (5 732458) |
| 345 | (6 732488) (7 732517) (7.5 732547) (8 732576) (9 732606) (10 732636) | 333 | (6 732488) (7 732517) (7.5 732547) (8 732576) (9 732606) (10 732636) |
| @@ -376,7 +364,19 @@ Gregorian year Y-1 to the Chinese month of the solstice of Gregorian year Y." | |||
| 376 | (6 737243) (7 737272) (8 737301) (9 737331) (10 737360) (11 737389)) | 364 | (6 737243) (7 737272) (8 737301) (9 737331) (10 737360) (11 737389)) |
| 377 | (2020 (12 737419) (1 737449) (2 737478) (3 737508) (4 737538) (4.5 737568) | 365 | (2020 (12 737419) (1 737449) (2 737478) (3 737508) (4 737538) (4.5 737568) |
| 378 | (5 737597) (6 737627) (7 737656) (8 737685) (9 737715) (10 737744) | 366 | (5 737597) (6 737627) (7 737656) (8 737685) (9 737715) (10 737744) |
| 379 | (11 737774))) | 367 | (11 737774)) |
| 368 | (2021 (12 737803) (1 737833) (2 737862) (3 737892) (4 737922) (5 737951) | ||
| 369 | (6 737981) (7 738010) (8 738040) (9 738069) (10 738099) (11 738128)) | ||
| 370 | (2022 (12 738158) (1 738187) (2 738217) (3 738246) (4 738276) (5 738305) | ||
| 371 | (6 738335) (7 738365) (8 738394) (9 738424) (10 738453) (11 738483)) | ||
| 372 | (2023 (12 738512) (1 738542) (2 738571) (2.5 738601) (3 738630) (4 738659) | ||
| 373 | (5 738689) (6 738719) (7 738748) (8 738778) (9 738808) (10 738837) | ||
| 374 | (11 738867)) | ||
| 375 | (2024 (12 738896) (1 738926) (2 738955) (3 738985) (4 739014) (5 739043) | ||
| 376 | (6 739073) (7 739102) (8 739132) (9 739162) (10 739191) (11 739221)) | ||
| 377 | (2025 (12 739251) (1 739280) (2 739310) (3 739339) (4 739369) (5 739398) | ||
| 378 | (6 739427) (6.5 739457) (7 739486) (8 739516) (9 739545) (10 739575) | ||
| 379 | (11 739605))) | ||
| 380 | "Alist of Chinese year structures as determined by `chinese-year'. | 380 | "Alist of Chinese year structures as determined by `chinese-year'. |
| 381 | The default can be nil, but some values are precomputed for efficiency.") | 381 | The default can be nil, but some values are precomputed for efficiency.") |
| 382 | 382 | ||
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 20a8684e387..e1f85832dc4 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -259,6 +259,23 @@ See `calendar-holiday-marker'." | |||
| 259 | 259 | ||
| 260 | (define-obsolete-face-alias 'holiday-face 'holiday "22.1") | 260 | (define-obsolete-face-alias 'holiday-face 'holiday "22.1") |
| 261 | 261 | ||
| 262 | (defface calendar-weekday-header '((t :inherit font-lock-constant-face)) | ||
| 263 | "Face used for weekday column headers in the calendar. | ||
| 264 | See also the face `calendar-weekend-header'." | ||
| 265 | :version "24.4" | ||
| 266 | :group 'calendar-faces) | ||
| 267 | |||
| 268 | (defface calendar-weekend-header '((t :inherit font-lock-comment-face)) | ||
| 269 | "Face used for weekend column headers in the calendar. | ||
| 270 | See also the face `calendar-weekday-header'." | ||
| 271 | :version "24.4" | ||
| 272 | :group 'calendar-faces) | ||
| 273 | |||
| 274 | (defface calendar-month-header '((t :inherit font-lock-function-name-face)) | ||
| 275 | "Face used for month headers in the calendar." | ||
| 276 | :version "24.4" | ||
| 277 | :group 'calendar-faces) | ||
| 278 | |||
| 262 | ;; These briefly checked font-lock-mode, but that is broken, since it | 279 | ;; These briefly checked font-lock-mode, but that is broken, since it |
| 263 | ;; is a buffer-local variable, and which buffer happens to be current | 280 | ;; is a buffer-local variable, and which buffer happens to be current |
| 264 | ;; when this file is loaded shouldn't make a difference. One could | 281 | ;; when this file is loaded shouldn't make a difference. One could |
| @@ -447,7 +464,6 @@ rightmost column." | |||
| 447 | (push (cons i (calendar-month-edges i)) calendar-month-edges)) | 464 | (push (cons i (calendar-month-edges i)) calendar-month-edges)) |
| 448 | (setq calendar-month-edges (reverse calendar-month-edges))) | 465 | (setq calendar-month-edges (reverse calendar-month-edges))) |
| 449 | 466 | ||
| 450 | ;; FIXME add font-lock-keywords. | ||
| 451 | (defun calendar-set-layout-variable (symbol value &optional minmax) | 467 | (defun calendar-set-layout-variable (symbol value &optional minmax) |
| 452 | "Set SYMBOL's value to VALUE, an integer. | 468 | "Set SYMBOL's value to VALUE, an integer. |
| 453 | A positive/negative MINMAX enforces a minimum/maximum value. | 469 | A positive/negative MINMAX enforces a minimum/maximum value. |
| @@ -491,12 +507,25 @@ Then redraw the calendar, if necessary." | |||
| 491 | :type 'integer | 507 | :type 'integer |
| 492 | :version "23.1") | 508 | :version "23.1") |
| 493 | 509 | ||
| 510 | (defun calendar-day-header-construct (&optional width) | ||
| 511 | "Return the default value for `calendar-day-header-array'. | ||
| 512 | WIDTH defaults to `calendar-day-header-width'." | ||
| 513 | (or width (setq width calendar-day-header-width)) | ||
| 514 | (calendar-abbrev-construct (if (<= width calendar-abbrev-length) | ||
| 515 | calendar-day-abbrev-array | ||
| 516 | calendar-day-name-array) | ||
| 517 | width)) | ||
| 518 | |||
| 519 | ;; FIXME better to use a format spec? | ||
| 494 | (defcustom calendar-day-header-width 2 | 520 | (defcustom calendar-day-header-width 2 |
| 495 | "Width of the day column headers in the calendar. | 521 | "Width of the day column headers in the calendar. |
| 496 | Must be at least one less than `calendar-column-width'." | 522 | Must be at least one less than `calendar-column-width'." |
| 497 | :group 'calendar | 523 | :group 'calendar |
| 498 | :initialize 'custom-initialize-default | 524 | :initialize 'custom-initialize-default |
| 499 | :set (lambda (sym val) | 525 | :set (lambda (sym val) |
| 526 | (or (calendar-customized-p 'calendar-day-header-array) | ||
| 527 | (setq calendar-day-header-array | ||
| 528 | (calendar-day-header-construct val))) | ||
| 500 | (calendar-set-layout-variable sym val (- 1 calendar-column-width))) | 529 | (calendar-set-layout-variable sym val (- 1 calendar-column-width))) |
| 501 | :type 'integer | 530 | :type 'integer |
| 502 | :version "23.1") | 531 | :version "23.1") |
| @@ -924,33 +953,33 @@ styles." | |||
| 924 | 953 | ||
| 925 | (defcustom calendar-american-month-header | 954 | (defcustom calendar-american-month-header |
| 926 | '(propertize (format "%s %d" (calendar-month-name month) year) | 955 | '(propertize (format "%s %d" (calendar-month-name month) year) |
| 927 | 'font-lock-face 'font-lock-function-name-face) | 956 | 'font-lock-face 'calendar-month-header) |
| 928 | "Default format for calendar month headings with the American date style. | 957 | "Default format for calendar month headings with the American date style. |
| 929 | Normally you should not customize this, but `calender-month-header'." | 958 | Normally you should not customize this, but `calender-month-header'." |
| 930 | :group 'calendar | 959 | :group 'calendar |
| 931 | :risky t | 960 | :risky t |
| 932 | :type 'sexp | 961 | :type 'sexp |
| 933 | :version "24.3") | 962 | :version "24.4") ; font-lock-function-name-face -> calendar-month-header |
| 934 | 963 | ||
| 935 | (defcustom calendar-european-month-header | 964 | (defcustom calendar-european-month-header |
| 936 | '(propertize (format "%s %d" (calendar-month-name month) year) | 965 | '(propertize (format "%s %d" (calendar-month-name month) year) |
| 937 | 'font-lock-face 'font-lock-function-name-face) | 966 | 'font-lock-face 'calendar-month-header) |
| 938 | "Default format for calendar month headings with the European date style. | 967 | "Default format for calendar month headings with the European date style. |
| 939 | Normally you should not customize this, but `calender-month-header'." | 968 | Normally you should not customize this, but `calender-month-header'." |
| 940 | :group 'calendar | 969 | :group 'calendar |
| 941 | :risky t | 970 | :risky t |
| 942 | :type 'sexp | 971 | :type 'sexp |
| 943 | :version "24.3") | 972 | :version "24.4") ; font-lock-function-name-face -> calendar-month-header |
| 944 | 973 | ||
| 945 | (defcustom calendar-iso-month-header | 974 | (defcustom calendar-iso-month-header |
| 946 | '(propertize (format "%d %s" year (calendar-month-name month)) | 975 | '(propertize (format "%d %s" year (calendar-month-name month)) |
| 947 | 'font-lock-face 'font-lock-function-name-face) | 976 | 'font-lock-face 'calendar-month-header) |
| 948 | "Default format for calendar month headings with the ISO date style. | 977 | "Default format for calendar month headings with the ISO date style. |
| 949 | Normally you should not customize this, but `calender-month-header'." | 978 | Normally you should not customize this, but `calender-month-header'." |
| 950 | :group 'calendar | 979 | :group 'calendar |
| 951 | :risky t | 980 | :risky t |
| 952 | :type 'sexp | 981 | :type 'sexp |
| 953 | :version "24.3") | 982 | :version "24.4") ; font-lock-function-name-face -> calendar-month-header |
| 954 | 983 | ||
| 955 | (defcustom calendar-month-header | 984 | (defcustom calendar-month-header |
| 956 | (cond ((eq calendar-date-style 'iso) | 985 | (cond ((eq calendar-date-style 'iso) |
| @@ -1422,7 +1451,7 @@ Optional integers MON and YR are used instead of today's date." | |||
| 1422 | (year (calendar-extract-year today)) | 1451 | (year (calendar-extract-year today)) |
| 1423 | (today-visible (or (not mon) | 1452 | (today-visible (or (not mon) |
| 1424 | (<= (abs (calendar-interval mon yr month year)) 1))) | 1453 | (<= (abs (calendar-interval mon yr month year)) 1))) |
| 1425 | (in-calendar-window (eq (window-buffer (selected-window)) | 1454 | (in-calendar-window (eq (window-buffer) |
| 1426 | (get-buffer calendar-buffer)))) | 1455 | (get-buffer calendar-buffer)))) |
| 1427 | (calendar-generate (or mon month) (or yr year)) | 1456 | (calendar-generate (or mon month) (or yr year)) |
| 1428 | (calendar-update-mode-line) | 1457 | (calendar-update-mode-line) |
| @@ -1517,8 +1546,7 @@ line." | |||
| 1517 | (last (calendar-last-day-of-month month year)) | 1546 | (last (calendar-last-day-of-month month year)) |
| 1518 | (trunc (min calendar-intermonth-spacing | 1547 | (trunc (min calendar-intermonth-spacing |
| 1519 | (1- calendar-left-margin))) | 1548 | (1- calendar-left-margin))) |
| 1520 | (day 1) | 1549 | (day 1)) |
| 1521 | string) | ||
| 1522 | (goto-char (point-min)) | 1550 | (goto-char (point-min)) |
| 1523 | (calendar-move-to-column indent) | 1551 | (calendar-move-to-column indent) |
| 1524 | (insert | 1552 | (insert |
| @@ -1526,15 +1554,16 @@ line." | |||
| 1526 | ?\s calendar-month-digit-width)) | 1554 | ?\s calendar-month-digit-width)) |
| 1527 | (calendar-ensure-newline) | 1555 | (calendar-ensure-newline) |
| 1528 | (calendar-insert-at-column indent calendar-intermonth-header trunc) | 1556 | (calendar-insert-at-column indent calendar-intermonth-header trunc) |
| 1529 | ;; Use the first two characters of each day to head the columns. | 1557 | ;; Use the first N characters of each day to head the columns. |
| 1530 | (dotimes (i 7) | 1558 | (dotimes (i 7) |
| 1531 | (insert | 1559 | (insert |
| 1532 | (progn | 1560 | (truncate-string-to-width |
| 1533 | (setq string | 1561 | (propertize (calendar-day-name (mod (+ calendar-week-start-day i) 7) |
| 1534 | (calendar-day-name (mod (+ calendar-week-start-day i) 7) nil t)) | 1562 | 'header t) |
| 1535 | (if enable-multibyte-characters | 1563 | 'font-lock-face (if (memq i '(0 6)) |
| 1536 | (truncate-string-to-width string calendar-day-header-width) | 1564 | 'calendar-weekend-header |
| 1537 | (substring string 0 calendar-day-header-width))) | 1565 | 'calendar-weekday-header)) |
| 1566 | calendar-day-header-width nil ?\s) | ||
| 1538 | (make-string (- calendar-column-width calendar-day-header-width) ?\s))) | 1567 | (make-string (- calendar-column-width calendar-day-header-width) ?\s))) |
| 1539 | (calendar-ensure-newline) | 1568 | (calendar-ensure-newline) |
| 1540 | (calendar-insert-at-column indent calendar-intermonth-text trunc) | 1569 | (calendar-insert-at-column indent calendar-intermonth-text trunc) |
| @@ -1544,15 +1573,15 @@ line." | |||
| 1544 | (dotimes (i last) | 1573 | (dotimes (i last) |
| 1545 | (setq day (1+ i)) | 1574 | (setq day (1+ i)) |
| 1546 | ;; TODO should numbers be left-justified, centered...? | 1575 | ;; TODO should numbers be left-justified, centered...? |
| 1547 | (insert (format (format "%%%dd%%s" calendar-day-digit-width) day | 1576 | (insert (propertize |
| 1548 | (make-string | 1577 | (format (format "%%%dd" calendar-day-digit-width) day) |
| 1549 | (- calendar-column-width calendar-day-digit-width) ?\s))) | 1578 | 'mouse-face 'highlight |
| 1550 | ;; 'date property prevents intermonth text confusing re-searches. | 1579 | 'help-echo (eval calendar-date-echo-text) |
| 1551 | ;; (Tried intangible, it did not really work.) | 1580 | ;; 'date property prevents intermonth text confusing re-searches. |
| 1552 | (set-text-properties | 1581 | ;; (Tried intangible, it did not really work.) |
| 1553 | (- (point) (1+ calendar-day-digit-width)) (1- (point)) | 1582 | 'date t) |
| 1554 | `(mouse-face highlight help-echo ,(eval calendar-date-echo-text) | 1583 | (make-string |
| 1555 | date t)) | 1584 | (- calendar-column-width calendar-day-digit-width) ?\s)) |
| 1556 | (when (and (zerop (mod (+ day blank-days) 7)) | 1585 | (when (and (zerop (mod (+ day blank-days) 7)) |
| 1557 | (/= day last)) | 1586 | (/= day last)) |
| 1558 | (calendar-ensure-newline) | 1587 | (calendar-ensure-newline) |
| @@ -1810,8 +1839,9 @@ For a complete description, see the info node `Calendar/Diary'. | |||
| 1810 | ;; soon in calendar-generate, but better safe than sorry. | 1839 | ;; soon in calendar-generate, but better safe than sorry. |
| 1811 | (unless (boundp 'displayed-month) (setq displayed-month 1)) | 1840 | (unless (boundp 'displayed-month) (setq displayed-month 1)) |
| 1812 | (unless (boundp 'displayed-year) (setq displayed-year 2001)) | 1841 | (unless (boundp 'displayed-year) (setq displayed-year 2001)) |
| 1813 | (set (make-local-variable 'font-lock-defaults) | 1842 | (if (bound-and-true-p calendar-font-lock-keywords) |
| 1814 | '(calendar-font-lock-keywords t))) | 1843 | (set (make-local-variable 'font-lock-defaults) |
| 1844 | '(calendar-font-lock-keywords t)))) | ||
| 1815 | 1845 | ||
| 1816 | (defun calendar-string-spread (strings char length) | 1846 | (defun calendar-string-spread (strings char length) |
| 1817 | "Concatenate list of STRINGS separated with copies of CHAR to fill LENGTH. | 1847 | "Concatenate list of STRINGS separated with copies of CHAR to fill LENGTH. |
| @@ -2081,33 +2111,41 @@ is a string to insert in the minibuffer before reading." | |||
| 2081 | (and standard | 2111 | (and standard |
| 2082 | (not (equal (eval (car standard)) (default-value symbol))))))) | 2112 | (not (equal (eval (car standard)) (default-value symbol))))))) |
| 2083 | 2113 | ||
| 2084 | (defun calendar-abbrev-construct (full) | 2114 | (defun calendar-abbrev-construct (full &optional maxlen) |
| 2085 | "From sequence FULL, return a vector of abbreviations. | 2115 | "From sequence FULL, return a vector of abbreviations. |
| 2086 | Each abbreviation is no longer than `calendar-abbrev-length' characters." | 2116 | Each abbreviation is no longer than MAXLEN (default `calendar-abbrev-length') |
| 2117 | characters." | ||
| 2118 | (or maxlen (setq maxlen calendar-abbrev-length)) | ||
| 2087 | (apply 'vector (mapcar | 2119 | (apply 'vector (mapcar |
| 2088 | (lambda (f) | 2120 | (lambda (f) |
| 2089 | (substring f 0 (min calendar-abbrev-length (length f)))) | 2121 | ;; TODO? truncate-string-to-width? |
| 2122 | (substring f 0 (min maxlen (length f)))) | ||
| 2090 | full))) | 2123 | full))) |
| 2091 | 2124 | ||
| 2092 | (defcustom calendar-day-name-array | 2125 | (defcustom calendar-day-name-array |
| 2093 | ["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday"] | 2126 | ["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday"] |
| 2094 | "Array of capitalized strings giving, in order from Sunday, the day names. | 2127 | "Array of capitalized strings giving, in order from Sunday, the day names. |
| 2095 | The first two characters of each string will be used to head the | ||
| 2096 | day columns in the calendar. | ||
| 2097 | If you change this without using customize after the calendar has loaded, | 2128 | If you change this without using customize after the calendar has loaded, |
| 2098 | then you may also want to change `calendar-day-abbrev-array'." | 2129 | then you may also want to change `calendar-day-abbrev-array' |
| 2130 | and `calendar-day-header-array'." | ||
| 2099 | :group 'calendar | 2131 | :group 'calendar |
| 2100 | :initialize 'custom-initialize-default | 2132 | :initialize 'custom-initialize-default |
| 2101 | :set (lambda (symbol value) | 2133 | :set (lambda (symbol value) |
| 2102 | (let ((dcustomized (calendar-customized-p 'calendar-day-abbrev-array)) | 2134 | (let ((dcustomized (calendar-customized-p 'calendar-day-abbrev-array)) |
| 2103 | (hcustomized (calendar-customized-p 'cal-html-day-abbrev-array))) | 2135 | (hcustomized (calendar-customized-p 'cal-html-day-abbrev-array)) |
| 2136 | (ccustomized (calendar-customized-p 'calendar-day-header-array))) | ||
| 2104 | (set symbol value) | 2137 | (set symbol value) |
| 2105 | (or dcustomized | 2138 | (or dcustomized |
| 2106 | (setq calendar-day-abbrev-array | 2139 | (setq calendar-day-abbrev-array |
| 2107 | (calendar-abbrev-construct calendar-day-name-array))) | 2140 | (calendar-abbrev-construct calendar-day-name-array))) |
| 2108 | (and (not hcustomized) | 2141 | (and (not hcustomized) |
| 2109 | (boundp 'cal-html-day-abbrev-array) | 2142 | (boundp 'cal-html-day-abbrev-array) |
| 2110 | (setq cal-html-day-abbrev-array calendar-day-abbrev-array)))) | 2143 | (setq cal-html-day-abbrev-array calendar-day-abbrev-array)) |
| 2144 | (or ccustomized | ||
| 2145 | (equal calendar-day-header-array | ||
| 2146 | (setq calendar-day-header-array | ||
| 2147 | (calendar-day-header-construct))) | ||
| 2148 | (calendar-redraw)))) | ||
| 2111 | :type '(vector (string :tag "Sunday") | 2149 | :type '(vector (string :tag "Sunday") |
| 2112 | (string :tag "Monday") | 2150 | (string :tag "Monday") |
| 2113 | (string :tag "Tuesday") | 2151 | (string :tag "Tuesday") |
| @@ -2127,7 +2165,8 @@ then you may also want to change `calendar-day-abbrev-array' and | |||
| 2127 | (let ((dcustomized (calendar-customized-p 'calendar-day-abbrev-array)) | 2165 | (let ((dcustomized (calendar-customized-p 'calendar-day-abbrev-array)) |
| 2128 | (mcustomized (calendar-customized-p | 2166 | (mcustomized (calendar-customized-p |
| 2129 | 'calendar-month-abbrev-array)) | 2167 | 'calendar-month-abbrev-array)) |
| 2130 | (hcustomized (calendar-customized-p 'cal-html-day-abbrev-array))) | 2168 | (hcustomized (calendar-customized-p 'cal-html-day-abbrev-array)) |
| 2169 | (ccustomized (calendar-customized-p 'calendar-day-header-array))) | ||
| 2131 | (set symbol value) | 2170 | (set symbol value) |
| 2132 | (or dcustomized | 2171 | (or dcustomized |
| 2133 | (setq calendar-day-abbrev-array | 2172 | (setq calendar-day-abbrev-array |
| @@ -2137,7 +2176,12 @@ then you may also want to change `calendar-day-abbrev-array' and | |||
| 2137 | (calendar-abbrev-construct calendar-month-name-array))) | 2176 | (calendar-abbrev-construct calendar-month-name-array))) |
| 2138 | (and (not hcustomized) | 2177 | (and (not hcustomized) |
| 2139 | (boundp 'cal-html-day-abbrev-array) | 2178 | (boundp 'cal-html-day-abbrev-array) |
| 2140 | (setq cal-html-day-abbrev-array calendar-day-abbrev-array)))) | 2179 | (setq cal-html-day-abbrev-array calendar-day-abbrev-array)) |
| 2180 | (or ccustomized | ||
| 2181 | (equal calendar-day-header-array | ||
| 2182 | (setq calendar-day-header-array | ||
| 2183 | (calendar-day-header-construct))) | ||
| 2184 | (calendar-redraw)))) | ||
| 2141 | :type 'integer) | 2185 | :type 'integer) |
| 2142 | 2186 | ||
| 2143 | (defcustom calendar-day-abbrev-array | 2187 | (defcustom calendar-day-abbrev-array |
| @@ -2154,11 +2198,17 @@ full name." | |||
| 2154 | :initialize 'custom-initialize-default | 2198 | :initialize 'custom-initialize-default |
| 2155 | :set-after '(calendar-abbrev-length calendar-day-name-array) | 2199 | :set-after '(calendar-abbrev-length calendar-day-name-array) |
| 2156 | :set (lambda (symbol value) | 2200 | :set (lambda (symbol value) |
| 2157 | (let ((hcustomized (calendar-customized-p 'cal-html-day-abbrev-array))) | 2201 | (let ((hcustomized (calendar-customized-p 'cal-html-day-abbrev-array)) |
| 2202 | (ccustomized (calendar-customized-p 'calendar-day-header-array))) | ||
| 2158 | (set symbol value) | 2203 | (set symbol value) |
| 2159 | (and (not hcustomized) | 2204 | (and (not hcustomized) |
| 2160 | (boundp 'cal-html-day-abbrev-array) | 2205 | (boundp 'cal-html-day-abbrev-array) |
| 2161 | (setq cal-html-day-abbrev-array calendar-day-abbrev-array)))) | 2206 | (setq cal-html-day-abbrev-array calendar-day-abbrev-array)) |
| 2207 | (or ccustomized | ||
| 2208 | (equal calendar-day-header-array | ||
| 2209 | (setq calendar-day-header-array | ||
| 2210 | (calendar-day-header-construct))) | ||
| 2211 | (calendar-redraw)))) | ||
| 2162 | :type '(vector (string :tag "Sun") | 2212 | :type '(vector (string :tag "Sun") |
| 2163 | (string :tag "Mon") | 2213 | (string :tag "Mon") |
| 2164 | (string :tag "Tue") | 2214 | (string :tag "Tue") |
| @@ -2169,6 +2219,33 @@ full name." | |||
| 2169 | ;; Made defcustom, changed defaults from nil nil... | 2219 | ;; Made defcustom, changed defaults from nil nil... |
| 2170 | :version "24.1") | 2220 | :version "24.1") |
| 2171 | 2221 | ||
| 2222 | (defcustom calendar-day-header-array (calendar-day-header-construct) | ||
| 2223 | "Array of strings to use for the headers of the calendar's day columns. | ||
| 2224 | The order should be the same as in `calendar-day-name-array'. | ||
| 2225 | In use, the calendar truncates elements to no more than | ||
| 2226 | `calendar-day-header-width' columns wide. | ||
| 2227 | Emacs constructs the default from either `calendar-day-name-array' | ||
| 2228 | \(if `calendar-day-header-width' is more than `calendar-abbrev-length'), | ||
| 2229 | or from `calendar-day-abbrev-array' (assuming that the abbreviated | ||
| 2230 | name are more likely to be unique when truncated)." | ||
| 2231 | :group 'calendar | ||
| 2232 | :initialize 'custom-initialize-default | ||
| 2233 | :set-after '(calendar-day-header-width | ||
| 2234 | calendar-abbrev-length calendar-day-name-array | ||
| 2235 | calendar-day-abbrev-array) | ||
| 2236 | :set (lambda (symbol value) | ||
| 2237 | (or (equal calendar-day-header-array | ||
| 2238 | (set symbol value)) | ||
| 2239 | (calendar-redraw))) | ||
| 2240 | :type '(vector (string :tag "Su") | ||
| 2241 | (string :tag "Mo") | ||
| 2242 | (string :tag "Tu") | ||
| 2243 | (string :tag "We") | ||
| 2244 | (string :tag "Th") | ||
| 2245 | (string :tag "Fr") | ||
| 2246 | (string :tag "Sa")) | ||
| 2247 | :version "24.4") | ||
| 2248 | |||
| 2172 | (defcustom calendar-month-name-array | 2249 | (defcustom calendar-month-name-array |
| 2173 | ["January" "February" "March" "April" "May" "June" | 2250 | ["January" "February" "March" "April" "May" "June" |
| 2174 | "July" "August" "September" "October" "November" "December"] | 2251 | "July" "August" "September" "October" "November" "December"] |
| @@ -2283,35 +2360,25 @@ Negative years are interpreted as years BC; -1 being 1 BC, and so on." | |||
| 2283 | (+ (* 12 (- yr2 yr1)) | 2360 | (+ (* 12 (- yr2 yr1)) |
| 2284 | (- mon2 mon1))) | 2361 | (- mon2 mon1))) |
| 2285 | 2362 | ||
| 2286 | (defvar calendar-font-lock-keywords | 2363 | (defvar calendar-font-lock-keywords nil |
| 2287 | ;; Month and year. Not really needed now that calendar-month-header | ||
| 2288 | ;; contains propertize, and not correct for non-american forms | ||
| 2289 | ;; of that variable. | ||
| 2290 | `((,(concat (regexp-opt (mapcar 'identity calendar-month-name-array) t) | ||
| 2291 | " -?[0-9]+") | ||
| 2292 | . font-lock-function-name-face) | ||
| 2293 | (,(regexp-opt | ||
| 2294 | (list (substring (aref calendar-day-name-array 6) | ||
| 2295 | 0 calendar-day-header-width) | ||
| 2296 | (substring (aref calendar-day-name-array 0) | ||
| 2297 | 0 calendar-day-header-width))) | ||
| 2298 | ;; Saturdays and Sundays are highlighted differently. | ||
| 2299 | . font-lock-comment-face) | ||
| 2300 | ;; First two chars of each day are used in the calendar. | ||
| 2301 | (,(regexp-opt (mapcar (lambda (x) (substring x 0 calendar-day-header-width)) | ||
| 2302 | calendar-day-name-array)) | ||
| 2303 | . font-lock-constant-face)) | ||
| 2304 | "Default keywords to highlight in Calendar mode.") | 2364 | "Default keywords to highlight in Calendar mode.") |
| 2305 | 2365 | ||
| 2366 | (make-obsolete-variable 'calendar-font-lock-keywords | ||
| 2367 | "set font-lock keywords in `calendar-mode-hook', \ | ||
| 2368 | or customize calendar faces." "24.4") | ||
| 2369 | |||
| 2306 | (defun calendar-day-name (date &optional abbrev absolute) | 2370 | (defun calendar-day-name (date &optional abbrev absolute) |
| 2307 | "Return a string with the name of the day of the week of DATE. | 2371 | "Return a string with the name of the day of the week of DATE. |
| 2308 | DATE should be a list in the format (MONTH DAY YEAR), unless the | 2372 | DATE should be a list in the format (MONTH DAY YEAR), unless the |
| 2309 | optional argument ABSOLUTE is non-nil, in which case DATE should | 2373 | optional argument ABSOLUTE is non-nil, in which case DATE should |
| 2310 | be an integer in the range 0 to 6 corresponding to the day of the | 2374 | be an integer in the range 0 to 6 corresponding to the day of the |
| 2311 | week. Day names are taken from the variable `calendar-day-name-array', | 2375 | week. Day names are taken from the variable `calendar-day-name-array', |
| 2312 | unless the optional argument ABBREV is non-nil, in which case | 2376 | unless the optional argument ABBREV is non-nil: |
| 2313 | the variable `calendar-day-abbrev-array' is used." | 2377 | `header' means to use `calendar-day-header-array'; |
| 2314 | (aref (if abbrev calendar-day-abbrev-array calendar-day-name-array) | 2378 | t to use `calendar-day-abbrev-array'." |
| 2379 | (aref (cond ((eq abbrev 'header) calendar-day-header-array) | ||
| 2380 | (abbrev calendar-day-abbrev-array) | ||
| 2381 | (t calendar-day-name-array)) | ||
| 2315 | (if absolute date (calendar-day-of-week date)))) | 2382 | (if absolute date (calendar-day-of-week date)))) |
| 2316 | 2383 | ||
| 2317 | (defun calendar-month-name (month &optional abbrev) | 2384 | (defun calendar-month-name (month &optional abbrev) |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 7bdb3cd49f6..6b89677554f 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -1011,8 +1011,7 @@ Entries that do not apply are made invisible. Holidays are shown | |||
| 1011 | in the mode line. This is an option for `diary-display-function'." | 1011 | in the mode line. This is an option for `diary-display-function'." |
| 1012 | ;; If selected window is dedicated (to the calendar), need a new one | 1012 | ;; If selected window is dedicated (to the calendar), need a new one |
| 1013 | ;; to display the diary. | 1013 | ;; to display the diary. |
| 1014 | (let* ((pop-up-frames (or pop-up-frames | 1014 | (let* ((pop-up-frames (or pop-up-frames (window-dedicated-p))) |
| 1015 | (window-dedicated-p (selected-window)))) | ||
| 1016 | (dbuff (find-buffer-visiting diary-file)) | 1015 | (dbuff (find-buffer-visiting diary-file)) |
| 1017 | (empty (diary-display-no-entries))) | 1016 | (empty (diary-display-no-entries))) |
| 1018 | ;; This may be too wide, but when simple diary is used there is | 1017 | ;; This may be too wide, but when simple diary is used there is |
| @@ -1216,8 +1215,7 @@ all entries, not just some, are visible. If there is no diary buffer, one | |||
| 1216 | is created." | 1215 | is created." |
| 1217 | (interactive) | 1216 | (interactive) |
| 1218 | (let* ((d-file (diary-check-diary-file)) | 1217 | (let* ((d-file (diary-check-diary-file)) |
| 1219 | (pop-up-frames (or pop-up-frames | 1218 | (pop-up-frames (or pop-up-frames (window-dedicated-p))) |
| 1220 | (window-dedicated-p (selected-window)))) | ||
| 1221 | (win (selected-window)) | 1219 | (win (selected-window)) |
| 1222 | (height (window-height))) | 1220 | (height (window-height))) |
| 1223 | (with-current-buffer (or (find-buffer-visiting d-file) | 1221 | (with-current-buffer (or (find-buffer-visiting d-file) |
| @@ -2116,8 +2114,7 @@ calendar." | |||
| 2116 | "Insert a diary entry STRING which may be NONMARKING in FILE. | 2114 | "Insert a diary entry STRING which may be NONMARKING in FILE. |
| 2117 | If omitted, NONMARKING defaults to nil and FILE defaults to | 2115 | If omitted, NONMARKING defaults to nil and FILE defaults to |
| 2118 | `diary-file'." | 2116 | `diary-file'." |
| 2119 | (let ((pop-up-frames (or pop-up-frames | 2117 | (let ((pop-up-frames (or pop-up-frames (window-dedicated-p)))) |
| 2120 | (window-dedicated-p (selected-window))))) | ||
| 2121 | (find-file-other-window (or file diary-file))) | 2118 | (find-file-other-window (or file diary-file))) |
| 2122 | (when (eq major-mode (default-value 'major-mode)) (diary-mode)) | 2119 | (when (eq major-mode (default-value 'major-mode)) (diary-mode)) |
| 2123 | (widen) | 2120 | (widen) |
diff --git a/lisp/calendar/timeclock.el b/lisp/calendar/timeclock.el index 70d064143dc..da074d377b5 100644 --- a/lisp/calendar/timeclock.el +++ b/lisp/calendar/timeclock.el | |||
| @@ -136,7 +136,7 @@ This variable only has effect if set with \\[customize]." | |||
| 136 | (if value | 136 | (if value |
| 137 | (add-hook 'kill-emacs-query-functions 'timeclock-query-out) | 137 | (add-hook 'kill-emacs-query-functions 'timeclock-query-out) |
| 138 | (remove-hook 'kill-emacs-query-functions 'timeclock-query-out)) | 138 | (remove-hook 'kill-emacs-query-functions 'timeclock-query-out)) |
| 139 | (setq timeclock-ask-before-exiting value)) | 139 | (set symbol value)) |
| 140 | :type 'boolean | 140 | :type 'boolean |
| 141 | :group 'timeclock) | 141 | :group 'timeclock) |
| 142 | 142 | ||
| @@ -174,11 +174,12 @@ a positive argument to force an update." | |||
| 174 | timeclock-update-timer))) | 174 | timeclock-update-timer))) |
| 175 | (setq currently-displaying nil)) | 175 | (setq currently-displaying nil)) |
| 176 | (and currently-displaying | 176 | (and currently-displaying |
| 177 | (set-variable 'timeclock-mode-line-display nil)) | 177 | (setq timeclock-mode-line-display nil)) |
| 178 | (setq timeclock-use-display-time value) | 178 | (set symbol value) |
| 179 | (and currently-displaying | 179 | (and currently-displaying |
| 180 | (set-variable 'timeclock-mode-line-display t)) | 180 | (setq timeclock-mode-line-display t)) |
| 181 | timeclock-use-display-time)) | 181 | ;; FIXME: The return value isn't used, AFAIK! |
| 182 | value)) | ||
| 182 | :type 'boolean | 183 | :type 'boolean |
| 183 | :group 'timeclock | 184 | :group 'timeclock |
| 184 | :require 'time) | 185 | :require 'time) |
| @@ -269,9 +270,11 @@ The time is bracketed by <> if you are clocked in, otherwise by [].") | |||
| 269 | 270 | ||
| 270 | (define-obsolete-function-alias 'timeclock-modeline-display | 271 | (define-obsolete-function-alias 'timeclock-modeline-display |
| 271 | 'timeclock-mode-line-display "24.3") | 272 | 'timeclock-mode-line-display "24.3") |
| 273 | (define-obsolete-variable-alias 'timeclock-modeline-display | ||
| 274 | 'timeclock-mode-line-display "24.3") | ||
| 272 | 275 | ||
| 273 | ;;;###autoload | 276 | ;;;###autoload |
| 274 | (defun timeclock-mode-line-display (&optional arg) | 277 | (define-minor-mode timeclock-mode-line-display |
| 275 | "Toggle display of the amount of time left today in the mode line. | 278 | "Toggle display of the amount of time left today in the mode line. |
| 276 | If `timeclock-use-display-time' is non-nil (the default), then | 279 | If `timeclock-use-display-time' is non-nil (the default), then |
| 277 | the function `display-time-mode' must be active, and the mode line | 280 | the function `display-time-mode' must be active, and the mode line |
| @@ -280,61 +283,41 @@ the timeclock will use its own sixty second timer to do its | |||
| 280 | updating. With prefix ARG, turn mode line display on if and only | 283 | updating. With prefix ARG, turn mode line display on if and only |
| 281 | if ARG is positive. Returns the new status of timeclock mode line | 284 | if ARG is positive. Returns the new status of timeclock mode line |
| 282 | display (non-nil means on)." | 285 | display (non-nil means on)." |
| 283 | (interactive "P") | 286 | :global t |
| 284 | ;; cf display-time-mode. | 287 | ;; cf display-time-mode. |
| 285 | (setq timeclock-mode-string "") | 288 | (setq timeclock-mode-string "") |
| 286 | (or global-mode-string (setq global-mode-string '(""))) | 289 | (or global-mode-string (setq global-mode-string '(""))) |
| 287 | (let ((on-p (if arg | 290 | (if timeclock-mode-line-display |
| 288 | (> (prefix-numeric-value arg) 0) | 291 | (progn |
| 289 | (not timeclock-mode-line-display)))) | 292 | (or (memq 'timeclock-mode-string global-mode-string) |
| 290 | (if on-p | 293 | (setq global-mode-string |
| 291 | (progn | 294 | (append global-mode-string '(timeclock-mode-string)))) |
| 292 | (or (memq 'timeclock-mode-string global-mode-string) | 295 | (add-hook 'timeclock-event-hook 'timeclock-update-mode-line) |
| 293 | (setq global-mode-string | 296 | (when timeclock-update-timer |
| 294 | (append global-mode-string '(timeclock-mode-string)))) | 297 | (cancel-timer timeclock-update-timer) |
| 295 | (add-hook 'timeclock-event-hook 'timeclock-update-mode-line) | 298 | (setq timeclock-update-timer nil)) |
| 296 | (when timeclock-update-timer | 299 | (if (boundp 'display-time-hook) |
| 297 | (cancel-timer timeclock-update-timer) | 300 | (remove-hook 'display-time-hook 'timeclock-update-mode-line)) |
| 298 | (setq timeclock-update-timer nil)) | 301 | (if timeclock-use-display-time |
| 299 | (if (boundp 'display-time-hook) | 302 | (progn |
| 300 | (remove-hook 'display-time-hook 'timeclock-update-mode-line)) | 303 | ;; Update immediately so there is a visible change |
| 301 | (if timeclock-use-display-time | 304 | ;; on calling this function. |
| 302 | (progn | 305 | (if display-time-mode |
| 303 | ;; Update immediately so there is a visible change | 306 | (timeclock-update-mode-line) |
| 304 | ;; on calling this function. | 307 | (message "Activate `display-time-mode' or turn off \ |
| 305 | (if display-time-mode | ||
| 306 | (timeclock-update-mode-line) | ||
| 307 | (message "Activate `display-time-mode' or turn off \ | ||
| 308 | `timeclock-use-display-time' to see timeclock information")) | 308 | `timeclock-use-display-time' to see timeclock information")) |
| 309 | (add-hook 'display-time-hook 'timeclock-update-mode-line)) | 309 | (add-hook 'display-time-hook 'timeclock-update-mode-line)) |
| 310 | (setq timeclock-update-timer | 310 | (setq timeclock-update-timer |
| 311 | (run-at-time nil 60 'timeclock-update-mode-line)))) | 311 | (run-at-time nil 60 'timeclock-update-mode-line)))) |
| 312 | (setq global-mode-string | 312 | (setq global-mode-string |
| 313 | (delq 'timeclock-mode-string global-mode-string)) | 313 | (delq 'timeclock-mode-string global-mode-string)) |
| 314 | (remove-hook 'timeclock-event-hook 'timeclock-update-mode-line) | 314 | (remove-hook 'timeclock-event-hook 'timeclock-update-mode-line) |
| 315 | (if (boundp 'display-time-hook) | 315 | (if (boundp 'display-time-hook) |
| 316 | (remove-hook 'display-time-hook | 316 | (remove-hook 'display-time-hook |
| 317 | 'timeclock-update-mode-line)) | 317 | 'timeclock-update-mode-line)) |
| 318 | (when timeclock-update-timer | 318 | (when timeclock-update-timer |
| 319 | (cancel-timer timeclock-update-timer) | 319 | (cancel-timer timeclock-update-timer) |
| 320 | (setq timeclock-update-timer nil))) | 320 | (setq timeclock-update-timer nil)))) |
| 321 | (force-mode-line-update) | ||
| 322 | (setq timeclock-mode-line-display on-p))) | ||
| 323 | |||
| 324 | (define-obsolete-variable-alias 'timeclock-modeline-display | ||
| 325 | 'timeclock-mode-line-display "24.3") | ||
| 326 | |||
| 327 | ;; This has to be here so that the function definition of | ||
| 328 | ;; `timeclock-mode-line-display' is known to the "set" function. | ||
| 329 | (defcustom timeclock-mode-line-display nil | ||
| 330 | "Toggle mode line display of time remaining. | ||
| 331 | You must modify via \\[customize] for this variable to have an effect." | ||
| 332 | :set (lambda (symbol value) | ||
| 333 | (setq timeclock-mode-line-display | ||
| 334 | (timeclock-mode-line-display (or value 0)))) | ||
| 335 | :type 'boolean | ||
| 336 | :group 'timeclock | ||
| 337 | :require 'timeclock) | ||
| 338 | 321 | ||
| 339 | (defsubst timeclock-time-to-date (time) | 322 | (defsubst timeclock-time-to-date (time) |
| 340 | "Convert the TIME value to a textual date string." | 323 | "Convert the TIME value to a textual date string." |
| @@ -835,25 +818,24 @@ This is only provided for coherency when used by | |||
| 835 | "Return a list of all the projects in DAY." | 818 | "Return a list of all the projects in DAY." |
| 836 | (timeclock-entry-list-projects (cddr day))) | 819 | (timeclock-entry-list-projects (cddr day))) |
| 837 | 820 | ||
| 838 | (defmacro timeclock-day-list-template (func) | 821 | (defun timeclock-day-list-template (func day-list) |
| 839 | "Template for summing the result of FUNC on each element of DAY-LIST." | 822 | "Template for summing the result of FUNC on each element of DAY-LIST." |
| 840 | `(let ((length 0)) | 823 | (let ((length 0)) |
| 841 | (while day-list | 824 | (dolist (day day-list) |
| 842 | (setq length (+ length (,(eval func) (car day-list))) | 825 | (setq length (+ length (funcall func day)))) |
| 843 | day-list (cdr day-list))) | 826 | length)) |
| 844 | length)) | ||
| 845 | 827 | ||
| 846 | (defun timeclock-day-list-required (day-list) | 828 | (defun timeclock-day-list-required (day-list) |
| 847 | "Return total required length of DAY-LIST, in seconds." | 829 | "Return total required length of DAY-LIST, in seconds." |
| 848 | (timeclock-day-list-template 'timeclock-day-required)) | 830 | (timeclock-day-list-template #'timeclock-day-required day-list)) |
| 849 | 831 | ||
| 850 | (defun timeclock-day-list-length (day-list) | 832 | (defun timeclock-day-list-length (day-list) |
| 851 | "Return actual length of DAY-LIST, in seconds." | 833 | "Return actual length of DAY-LIST, in seconds." |
| 852 | (timeclock-day-list-template 'timeclock-day-length)) | 834 | (timeclock-day-list-template #'timeclock-day-length day-list)) |
| 853 | 835 | ||
| 854 | (defun timeclock-day-list-debt (day-list) | 836 | (defun timeclock-day-list-debt (day-list) |
| 855 | "Return total debt (required - actual) of DAY-LIST." | 837 | "Return total debt (required - actual) of DAY-LIST." |
| 856 | (timeclock-day-list-template 'timeclock-day-debt)) | 838 | (timeclock-day-list-template #'timeclock-day-debt day-list)) |
| 857 | 839 | ||
| 858 | (defsubst timeclock-day-list-begin (day-list) | 840 | (defsubst timeclock-day-list-begin (day-list) |
| 859 | "Return the start time of DAY-LIST." | 841 | "Return the start time of DAY-LIST." |
| @@ -865,11 +847,11 @@ This is only provided for coherency when used by | |||
| 865 | 847 | ||
| 866 | (defun timeclock-day-list-span (day-list) | 848 | (defun timeclock-day-list-span (day-list) |
| 867 | "Return the span of DAY-LIST." | 849 | "Return the span of DAY-LIST." |
| 868 | (timeclock-day-list-template 'timeclock-day-span)) | 850 | (timeclock-day-list-template #'timeclock-day-span day-list)) |
| 869 | 851 | ||
| 870 | (defun timeclock-day-list-break (day-list) | 852 | (defun timeclock-day-list-break (day-list) |
| 871 | "Return the total break of DAY-LIST." | 853 | "Return the total break of DAY-LIST." |
| 872 | (timeclock-day-list-template 'timeclock-day-break)) | 854 | (timeclock-day-list-template #'timeclock-day-break day-list)) |
| 873 | 855 | ||
| 874 | (defun timeclock-day-list-projects (day-list) | 856 | (defun timeclock-day-list-projects (day-list) |
| 875 | "Return a list of all the projects in DAY-LIST." | 857 | "Return a list of all the projects in DAY-LIST." |
diff --git a/lisp/comint.el b/lisp/comint.el index 217bd4e8b6d..0ce7053c031 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -636,7 +636,7 @@ Entry to this mode runs the hooks on `comint-mode-hook'." | |||
| 636 | (setq-local comint-last-input-start (point-min-marker)) | 636 | (setq-local comint-last-input-start (point-min-marker)) |
| 637 | (setq-local comint-last-input-end (point-min-marker)) | 637 | (setq-local comint-last-input-end (point-min-marker)) |
| 638 | (setq-local comint-last-output-start (make-marker)) | 638 | (setq-local comint-last-output-start (make-marker)) |
| 639 | (make-local-variable 'comint-last-prompt-overlay) | 639 | (make-local-variable 'comint-last-prompt) |
| 640 | (make-local-variable 'comint-prompt-regexp) ; Don't set; default | 640 | (make-local-variable 'comint-prompt-regexp) ; Don't set; default |
| 641 | (make-local-variable 'comint-input-ring-size) ; ...to global val. | 641 | (make-local-variable 'comint-input-ring-size) ; ...to global val. |
| 642 | (make-local-variable 'comint-input-ring) | 642 | (make-local-variable 'comint-input-ring) |
| @@ -1562,8 +1562,9 @@ or to the last history element for a backward search." | |||
| 1562 | "Save a function restoring the state of input history search. | 1562 | "Save a function restoring the state of input history search. |
| 1563 | Save `comint-input-ring-index' to the additional state parameter | 1563 | Save `comint-input-ring-index' to the additional state parameter |
| 1564 | in the search status stack." | 1564 | in the search status stack." |
| 1565 | `(lambda (cmd) | 1565 | (let ((index comint-input-ring-index)) |
| 1566 | (comint-history-isearch-pop-state cmd ,comint-input-ring-index))) | 1566 | (lambda (cmd) |
| 1567 | (comint-history-isearch-pop-state cmd index)))) | ||
| 1567 | 1568 | ||
| 1568 | (defun comint-history-isearch-pop-state (_cmd hist-pos) | 1569 | (defun comint-history-isearch-pop-state (_cmd hist-pos) |
| 1569 | "Restore the input history search state. | 1570 | "Restore the input history search state. |
| @@ -1902,21 +1903,24 @@ either globally or locally.") | |||
| 1902 | "If nil, Comint will interpret `carriage control' characters in output. | 1903 | "If nil, Comint will interpret `carriage control' characters in output. |
| 1903 | See `comint-carriage-motion' for details.") | 1904 | See `comint-carriage-motion' for details.") |
| 1904 | 1905 | ||
| 1905 | ;; When non-nil, this is an overlay over the last recognized prompt in | 1906 | (defvar comint-last-prompt nil |
| 1906 | ;; the buffer; it is used when highlighting the prompt. | 1907 | "Markers pointing to the last prompt. |
| 1907 | (defvar comint-last-prompt-overlay nil) | 1908 | If non-nil, a cons cell containing markers. The car points to |
| 1909 | the start, the cdr to the end of the last prompt recognized.") | ||
| 1908 | 1910 | ||
| 1909 | (defun comint-snapshot-last-prompt () | 1911 | (defun comint-snapshot-last-prompt () |
| 1910 | "`snapshot' any current `comint-last-prompt-overlay'. | 1912 | "Snapshot the current `comint-last-prompt'. |
| 1911 | Freeze its attributes in place, even when more input comes along | 1913 | Freezes the `font-lock-face' text property in place." |
| 1912 | and moves the prompt overlay." | 1914 | (when comint-last-prompt |
| 1913 | (when comint-last-prompt-overlay | 1915 | (with-silent-modifications |
| 1914 | (let ((inhibit-read-only t)) | 1916 | (add-text-properties |
| 1915 | (with-silent-modifications | 1917 | (car comint-last-prompt) |
| 1916 | (add-text-properties | 1918 | (cdr comint-last-prompt) |
| 1917 | (overlay-start comint-last-prompt-overlay) | 1919 | '(font-lock-face comint-highlight-prompt))) |
| 1918 | (overlay-end comint-last-prompt-overlay) | 1920 | ;; Reset comint-last-prompt so later on comint-output-filter does |
| 1919 | (overlay-properties comint-last-prompt-overlay)))))) | 1921 | ;; not remove the font-lock-face text property of the previous |
| 1922 | ;; (this) prompt. | ||
| 1923 | (setq comint-last-prompt nil))) | ||
| 1920 | 1924 | ||
| 1921 | (defun comint-carriage-motion (start end) | 1925 | (defun comint-carriage-motion (start end) |
| 1922 | "Interpret carriage control characters in the region from START to END. | 1926 | "Interpret carriage control characters in the region from START to END. |
| @@ -2063,20 +2067,15 @@ Make backspaces delete the previous character." | |||
| 2063 | (add-text-properties | 2067 | (add-text-properties |
| 2064 | prompt-start (point) | 2068 | prompt-start (point) |
| 2065 | '(read-only t rear-nonsticky t front-sticky (read-only))))) | 2069 | '(read-only t rear-nonsticky t front-sticky (read-only))))) |
| 2066 | (unless (and (bolp) (null comint-last-prompt-overlay)) | 2070 | (when comint-last-prompt |
| 2067 | ;; Need to create or move the prompt overlay (in the case | 2071 | (remove-text-properties (car comint-last-prompt) |
| 2068 | ;; where there is no prompt ((bolp) == t), we still do | 2072 | (cdr comint-last-prompt) |
| 2069 | ;; this if there's already an existing overlay). | 2073 | '(font-lock-face))) |
| 2070 | (if comint-last-prompt-overlay | 2074 | (setq comint-last-prompt |
| 2071 | ;; Just move an existing overlay | 2075 | (cons (copy-marker prompt-start) (point-marker))) |
| 2072 | (move-overlay comint-last-prompt-overlay | 2076 | (add-text-properties (car comint-last-prompt) |
| 2073 | prompt-start (point)) | 2077 | (cdr comint-last-prompt) |
| 2074 | ;; Need to create the overlay | 2078 | '(font-lock-face comint-highlight-prompt))) |
| 2075 | (setq comint-last-prompt-overlay | ||
| 2076 | (make-overlay prompt-start (point))) | ||
| 2077 | (overlay-put comint-last-prompt-overlay | ||
| 2078 | 'font-lock-face 'comint-highlight-prompt)))) | ||
| 2079 | |||
| 2080 | (goto-char saved-point))))))) | 2079 | (goto-char saved-point))))))) |
| 2081 | 2080 | ||
| 2082 | (defun comint-preinput-scroll-to-bottom () | 2081 | (defun comint-preinput-scroll-to-bottom () |
| @@ -2296,7 +2295,7 @@ Security bug: your string can still be temporarily recovered with | |||
| 2296 | (interactive "P") ; Defeat snooping via C-x ESC ESC | 2295 | (interactive "P") ; Defeat snooping via C-x ESC ESC |
| 2297 | (let ((proc (get-buffer-process (current-buffer))) | 2296 | (let ((proc (get-buffer-process (current-buffer))) |
| 2298 | (prefix | 2297 | (prefix |
| 2299 | (if (eq (window-buffer (selected-window)) (current-buffer)) | 2298 | (if (eq (window-buffer) (current-buffer)) |
| 2300 | "" | 2299 | "" |
| 2301 | (format "(In buffer %s) " | 2300 | (format "(In buffer %s) " |
| 2302 | (current-buffer))))) | 2301 | (current-buffer))))) |
| @@ -3108,7 +3107,7 @@ completions listing is dependent on the value of `comint-completion-autolist'. | |||
| 3108 | Returns t if successful." | 3107 | Returns t if successful." |
| 3109 | (interactive) | 3108 | (interactive) |
| 3110 | (when (comint--match-partial-filename) | 3109 | (when (comint--match-partial-filename) |
| 3111 | (unless (window-minibuffer-p (selected-window)) | 3110 | (unless (window-minibuffer-p) |
| 3112 | (message "Completing file name...")) | 3111 | (message "Completing file name...")) |
| 3113 | (let ((data (comint--complete-file-name-data))) | 3112 | (let ((data (comint--complete-file-name-data))) |
| 3114 | (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data))))) | 3113 | (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data))))) |
| @@ -3211,7 +3210,7 @@ Return `listed' if a completion listing was shown. | |||
| 3211 | See also `comint-dynamic-complete-filename'." | 3210 | See also `comint-dynamic-complete-filename'." |
| 3212 | (declare (obsolete completion-in-region "24.1")) | 3211 | (declare (obsolete completion-in-region "24.1")) |
| 3213 | (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin))) | 3212 | (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin))) |
| 3214 | (minibuffer-p (window-minibuffer-p (selected-window))) | 3213 | (minibuffer-p (window-minibuffer-p)) |
| 3215 | (suffix (cond ((not comint-completion-addsuffix) "") | 3214 | (suffix (cond ((not comint-completion-addsuffix) "") |
| 3216 | ((not (consp comint-completion-addsuffix)) " ") | 3215 | ((not (consp comint-completion-addsuffix)) " ") |
| 3217 | (t (cdr comint-completion-addsuffix)))) | 3216 | (t (cdr comint-completion-addsuffix)))) |
| @@ -3308,7 +3307,7 @@ Typing SPC flushes the completions buffer." | |||
| 3308 | (current-window-configuration)) | 3307 | (current-window-configuration)) |
| 3309 | (with-output-to-temp-buffer "*Completions*" | 3308 | (with-output-to-temp-buffer "*Completions*" |
| 3310 | (display-completion-list completions common-substring)) | 3309 | (display-completion-list completions common-substring)) |
| 3311 | (if (window-minibuffer-p (selected-window)) | 3310 | (if (window-minibuffer-p) |
| 3312 | (minibuffer-message "Type space to flush; repeat completion command to scroll") | 3311 | (minibuffer-message "Type space to flush; repeat completion command to scroll") |
| 3313 | (message "Type space to flush; repeat completion command to scroll"))) | 3312 | (message "Type space to flush; repeat completion command to scroll"))) |
| 3314 | 3313 | ||
diff --git a/lisp/completion.el b/lisp/completion.el index 3fbc3c05fb4..ee0234536aa 100644 --- a/lisp/completion.el +++ b/lisp/completion.el | |||
| @@ -343,9 +343,6 @@ are automatically added to the completion database." | |||
| 343 | :type '(set (const lisp) (const c)) | 343 | :type '(set (const lisp) (const c)) |
| 344 | :group 'completion) | 344 | :group 'completion) |
| 345 | 345 | ||
| 346 | ;;(defvar *record-cmpl-statistics-p* nil | ||
| 347 | ;; "If non-nil, record completion statistics.") | ||
| 348 | |||
| 349 | ;;(defvar *completion-auto-save-period* 1800 | 346 | ;;(defvar *completion-auto-save-period* 1800 |
| 350 | ;; "The period in seconds to wait for emacs to be idle before autosaving | 347 | ;; "The period in seconds to wait for emacs to be idle before autosaving |
| 351 | ;;the completions. Default is a 1/2 hour.") | 348 | ;;the completions. Default is a 1/2 hour.") |
| @@ -692,16 +689,6 @@ Returns nil if there isn't one longer than `completion-min-length'." | |||
| 692 | ;; are in completion-stats.el. | 689 | ;; are in completion-stats.el. |
| 693 | 690 | ||
| 694 | ;;----------------------------------------------- | 691 | ;;----------------------------------------------- |
| 695 | ;; Conditionalizing code on *record-cmpl-statistics-p* | ||
| 696 | ;;----------------------------------------------- | ||
| 697 | ;; All statistics code outside this block should use this | ||
| 698 | (defmacro cmpl-statistics-block (&rest _body)) | ||
| 699 | ;; "Only executes body if we are recording statistics." | ||
| 700 | ;; (list 'cond | ||
| 701 | ;; (list* '*record-cmpl-statistics-p* body) | ||
| 702 | ;; )) | ||
| 703 | |||
| 704 | ;;----------------------------------------------- | ||
| 705 | ;; Completion Sources | 692 | ;; Completion Sources |
| 706 | ;;----------------------------------------------- | 693 | ;;----------------------------------------------- |
| 707 | 694 | ||
| @@ -1004,9 +991,7 @@ Each symbol is bound to a single completion entry.") | |||
| 1004 | "Initialize the completion storage. All existing completions are lost." | 991 | "Initialize the completion storage. All existing completions are lost." |
| 1005 | (interactive) | 992 | (interactive) |
| 1006 | (setq cmpl-prefix-obarray (make-vector cmpl-obarray-length 0)) | 993 | (setq cmpl-prefix-obarray (make-vector cmpl-obarray-length 0)) |
| 1007 | (setq cmpl-obarray (make-vector cmpl-obarray-length 0)) | 994 | (setq cmpl-obarray (make-vector cmpl-obarray-length 0))) |
| 1008 | (cmpl-statistics-block | ||
| 1009 | (record-clear-all-completions))) | ||
| 1010 | 995 | ||
| 1011 | (defvar completions-list-return-value) | 996 | (defvar completions-list-return-value) |
| 1012 | 997 | ||
| @@ -1154,9 +1139,6 @@ Returns the completion entry." | |||
| 1154 | (set-cmpl-prefix-entry-tail prefix-entry entry)) | 1139 | (set-cmpl-prefix-entry-tail prefix-entry entry)) |
| 1155 | (t | 1140 | (t |
| 1156 | (set cmpl-db-prefix-symbol (make-cmpl-prefix-entry entry)))) | 1141 | (set cmpl-db-prefix-symbol (make-cmpl-prefix-entry entry)))) |
| 1157 | ;; statistics | ||
| 1158 | (cmpl-statistics-block | ||
| 1159 | (note-added-completion)) | ||
| 1160 | ;; set symbol | 1142 | ;; set symbol |
| 1161 | (set cmpl-db-symbol (car entry))))) | 1143 | (set cmpl-db-symbol (car entry))))) |
| 1162 | 1144 | ||
| @@ -1206,9 +1188,6 @@ Returns the completion entry." | |||
| 1206 | (t | 1188 | (t |
| 1207 | ;; Start new prefix entry | 1189 | ;; Start new prefix entry |
| 1208 | (set cmpl-db-prefix-symbol (make-cmpl-prefix-entry entry)))) | 1190 | (set cmpl-db-prefix-symbol (make-cmpl-prefix-entry entry)))) |
| 1209 | ;; statistics | ||
| 1210 | (cmpl-statistics-block | ||
| 1211 | (note-added-completion)) | ||
| 1212 | ;; Add it to the symbol | 1191 | ;; Add it to the symbol |
| 1213 | (set cmpl-db-symbol (car entry))))) | 1192 | (set cmpl-db-symbol (car entry))))) |
| 1214 | 1193 | ||
| @@ -1236,9 +1215,7 @@ String must be longer than `completion-prefix-min-length'." | |||
| 1236 | (or (set-cmpl-prefix-entry-head | 1215 | (or (set-cmpl-prefix-entry-head |
| 1237 | prefix-entry (cdr (cmpl-prefix-entry-head prefix-entry))) | 1216 | prefix-entry (cdr (cmpl-prefix-entry-head prefix-entry))) |
| 1238 | ;; List is now empty | 1217 | ;; List is now empty |
| 1239 | (set cmpl-db-prefix-symbol nil)))) | 1218 | (set cmpl-db-prefix-symbol nil))))) |
| 1240 | (cmpl-statistics-block | ||
| 1241 | (note-completion-deleted))) | ||
| 1242 | (error "Unknown completion `%s'" completion-string))) | 1219 | (error "Unknown completion `%s'" completion-string))) |
| 1243 | 1220 | ||
| 1244 | ;; Tests -- | 1221 | ;; Tests -- |
| @@ -1372,8 +1349,6 @@ Completions added this way will automatically be saved if | |||
| 1372 | (let ((string (and enable-completion (symbol-before-point))) | 1349 | (let ((string (and enable-completion (symbol-before-point))) |
| 1373 | (current-completion-source cmpl-source-separator) | 1350 | (current-completion-source cmpl-source-separator) |
| 1374 | entry) | 1351 | entry) |
| 1375 | (cmpl-statistics-block | ||
| 1376 | (note-separator-character string)) | ||
| 1377 | (cond (string | 1352 | (cond (string |
| 1378 | (setq entry (add-completion-to-head string)) | 1353 | (setq entry (add-completion-to-head string)) |
| 1379 | (if (and completion-on-separator-character | 1354 | (if (and completion-on-separator-character |
| @@ -1614,9 +1589,6 @@ Prefix args :: | |||
| 1614 | completion-prefix-min-length))) | 1589 | completion-prefix-min-length))) |
| 1615 | ;; get index | 1590 | ;; get index |
| 1616 | (setq cmpl-current-index (if current-prefix-arg arg 0)) | 1591 | (setq cmpl-current-index (if current-prefix-arg arg 0)) |
| 1617 | ;; statistics | ||
| 1618 | (cmpl-statistics-block | ||
| 1619 | (note-complete-entered-afresh cmpl-original-string)) | ||
| 1620 | ;; reset database | 1592 | ;; reset database |
| 1621 | (completion-search-reset cmpl-original-string) | 1593 | (completion-search-reset cmpl-original-string) |
| 1622 | ;; erase what we've got | 1594 | ;; erase what we've got |
| @@ -1626,7 +1598,7 @@ Prefix args :: | |||
| 1626 | ;; Get the next completion | 1598 | ;; Get the next completion |
| 1627 | (let* ((print-status-p | 1599 | (let* ((print-status-p |
| 1628 | (and (>= baud-rate completion-prompt-speed-threshold) | 1600 | (and (>= baud-rate completion-prompt-speed-threshold) |
| 1629 | (not (window-minibuffer-p (selected-window))))) | 1601 | (not (window-minibuffer-p)))) |
| 1630 | (insert-point (point)) | 1602 | (insert-point (point)) |
| 1631 | (entry (completion-search-next cmpl-current-index)) | 1603 | (entry (completion-search-next cmpl-current-index)) |
| 1632 | string) | 1604 | string) |
| @@ -1649,9 +1621,6 @@ Prefix args :: | |||
| 1649 | (goto-char insert-point)) | 1621 | (goto-char insert-point)) |
| 1650 | (t;; point at end, | 1622 | (t;; point at end, |
| 1651 | (setq cmpl-last-insert-location insert-point))) | 1623 | (setq cmpl-last-insert-location insert-point))) |
| 1652 | ;; statistics | ||
| 1653 | (cmpl-statistics-block | ||
| 1654 | (note-complete-inserted entry cmpl-current-index)) | ||
| 1655 | ;; Done ! cmpl-stat-complete-successful | 1624 | ;; Done ! cmpl-stat-complete-successful |
| 1656 | ;;display the next completion | 1625 | ;;display the next completion |
| 1657 | (cond | 1626 | (cond |
| @@ -1677,9 +1646,6 @@ Prefix args :: | |||
| 1677 | (if (and print-status-p (sit-for 0)) | 1646 | (if (and print-status-p (sit-for 0)) |
| 1678 | (message "No %scompletions." | 1647 | (message "No %scompletions." |
| 1679 | (if (eq this-command last-command) "more " ""))) | 1648 | (if (eq this-command last-command) "more " ""))) |
| 1680 | ;; statistics | ||
| 1681 | (cmpl-statistics-block | ||
| 1682 | (record-complete-failed cmpl-current-index)) | ||
| 1683 | ;; Pretend that we were never here | 1649 | ;; Pretend that we were never here |
| 1684 | (setq this-command 'failed-complete))))) | 1650 | (setq this-command 'failed-complete))))) |
| 1685 | 1651 | ||
| @@ -1709,25 +1675,14 @@ Prefix args :: | |||
| 1709 | 1675 | ||
| 1710 | (defun add-completions-from-buffer () | 1676 | (defun add-completions-from-buffer () |
| 1711 | (interactive) | 1677 | (interactive) |
| 1712 | (let ((current-completion-source cmpl-source-file-parsing) | 1678 | (let ((current-completion-source cmpl-source-file-parsing)) |
| 1713 | (start-num | ||
| 1714 | (cmpl-statistics-block | ||
| 1715 | (aref completion-add-count-vector cmpl-source-file-parsing))) | ||
| 1716 | mode) | ||
| 1717 | (cond ((memq major-mode '(emacs-lisp-mode lisp-mode)) | 1679 | (cond ((memq major-mode '(emacs-lisp-mode lisp-mode)) |
| 1718 | (add-completions-from-lisp-buffer) | 1680 | (add-completions-from-lisp-buffer)) |
| 1719 | (setq mode 'lisp)) | ||
| 1720 | ((memq major-mode '(c-mode)) | 1681 | ((memq major-mode '(c-mode)) |
| 1721 | (add-completions-from-c-buffer) | 1682 | (add-completions-from-c-buffer)) |
| 1722 | (setq mode 'c)) | ||
| 1723 | (t | 1683 | (t |
| 1724 | (error "Cannot parse completions in %s buffers" | 1684 | (error "Cannot parse completions in %s buffers" |
| 1725 | major-mode))) | 1685 | major-mode))))) |
| 1726 | (cmpl-statistics-block | ||
| 1727 | (record-cmpl-parse-file | ||
| 1728 | mode (point-max) | ||
| 1729 | (- (aref completion-add-count-vector cmpl-source-file-parsing) | ||
| 1730 | start-num))))) | ||
| 1731 | 1686 | ||
| 1732 | ;; Find file hook | 1687 | ;; Find file hook |
| 1733 | (defun completion-find-file-hook () | 1688 | (defun completion-find-file-hook () |
| @@ -1960,8 +1915,7 @@ Prefix args :: | |||
| 1960 | ((not cmpl-completions-accepted-p) | 1915 | ((not cmpl-completions-accepted-p) |
| 1961 | (message "Completions database has not changed - not writing.")) | 1916 | (message "Completions database has not changed - not writing.")) |
| 1962 | (t | 1917 | (t |
| 1963 | (save-completions-to-file)))) | 1918 | (save-completions-to-file))))) |
| 1964 | (cmpl-statistics-block (record-cmpl-kill-emacs))) | ||
| 1965 | 1919 | ||
| 1966 | ;; There is no point bothering to change this again | 1920 | ;; There is no point bothering to change this again |
| 1967 | ;; unless the package changes so much that it matters | 1921 | ;; unless the package changes so much that it matters |
| @@ -2066,9 +2020,7 @@ If file name is not specified, use `save-completions-file-name'." | |||
| 2066 | (set-buffer-modified-p nil) | 2020 | (set-buffer-modified-p nil) |
| 2067 | (message "Couldn't save completion file `%s'" filename))) | 2021 | (message "Couldn't save completion file `%s'" filename))) |
| 2068 | ;; Reset accepted-p flag | 2022 | ;; Reset accepted-p flag |
| 2069 | (setq cmpl-completions-accepted-p nil) ) | 2023 | (setq cmpl-completions-accepted-p nil) ))))) |
| 2070 | (cmpl-statistics-block | ||
| 2071 | (record-save-completions total-in-db total-perm total-saved)))))) | ||
| 2072 | 2024 | ||
| 2073 | ;;(defun auto-save-completions () | 2025 | ;;(defun auto-save-completions () |
| 2074 | ;; (if (and save-completions-flag enable-completion cmpl-initialized-p | 2026 | ;; (if (and save-completions-flag enable-completion cmpl-initialized-p |
| @@ -2103,9 +2055,6 @@ If file is not specified, then use `save-completions-file-name'." | |||
| 2103 | string entry last-use-time | 2055 | string entry last-use-time |
| 2104 | cmpl-entry cmpl-last-use-time | 2056 | cmpl-entry cmpl-last-use-time |
| 2105 | (current-completion-source cmpl-source-init-file) | 2057 | (current-completion-source cmpl-source-init-file) |
| 2106 | (start-num | ||
| 2107 | (cmpl-statistics-block | ||
| 2108 | (aref completion-add-count-vector cmpl-source-file-parsing))) | ||
| 2109 | (total-in-file 0) (total-perm 0)) | 2058 | (total-in-file 0) (total-perm 0)) |
| 2110 | ;; insert the file into a buffer | 2059 | ;; insert the file into a buffer |
| 2111 | (condition-case nil | 2060 | (condition-case nil |
| @@ -2163,12 +2112,6 @@ If file is not specified, then use `save-completions-file-name'." | |||
| 2163 | (message "Loading completions from file %s . . . Done." | 2112 | (message "Loading completions from file %s . . . Done." |
| 2164 | filename)) | 2113 | filename)) |
| 2165 | (message "End of file while reading completions.")))))) | 2114 | (message "End of file while reading completions.")))))) |
| 2166 | |||
| 2167 | (cmpl-statistics-block | ||
| 2168 | (record-load-completions | ||
| 2169 | total-in-file total-perm | ||
| 2170 | (- (aref completion-add-count-vector cmpl-source-init-file) | ||
| 2171 | start-num))) | ||
| 2172 | )))))) | 2115 | )))))) |
| 2173 | 2116 | ||
| 2174 | (defun completion-initialize () | 2117 | (defun completion-initialize () |
| @@ -2201,9 +2144,7 @@ Patched to remove the most recent completion." | |||
| 2201 | (cond ((eq last-command 'complete) | 2144 | (cond ((eq last-command 'complete) |
| 2202 | (delete-region (point) cmpl-last-insert-location) | 2145 | (delete-region (point) cmpl-last-insert-location) |
| 2203 | (insert cmpl-original-string) | 2146 | (insert cmpl-original-string) |
| 2204 | (setq completion-to-accept nil) | 2147 | (setq completion-to-accept nil)) |
| 2205 | (cmpl-statistics-block | ||
| 2206 | (record-complete-failed))) | ||
| 2207 | (t | 2148 | (t |
| 2208 | (kill-region beg end)))) | 2149 | (kill-region beg end)))) |
| 2209 | 2150 | ||
| @@ -2263,15 +2204,10 @@ TYPE is the type of the wrapper to be added. Can be :before or :under." | |||
| 2263 | (use-completion-before-separator))) | 2204 | (use-completion-before-separator))) |
| 2264 | 2205 | ||
| 2265 | (defun use-completion-backward-under () | 2206 | (defun use-completion-backward-under () |
| 2266 | (use-completion-under-point) | 2207 | (use-completion-under-point)) |
| 2267 | (if (eq last-command 'complete) | ||
| 2268 | ;; probably a failed completion if you have to back up | ||
| 2269 | (cmpl-statistics-block (record-complete-failed)))) | ||
| 2270 | 2208 | ||
| 2271 | (defun use-completion-backward () | 2209 | (defun use-completion-backward () |
| 2272 | (if (eq last-command 'complete) | 2210 | nil) |
| 2273 | ;; probably a failed completion if you have to back up | ||
| 2274 | (cmpl-statistics-block (record-complete-failed)))) | ||
| 2275 | 2211 | ||
| 2276 | (defun completion-before-command () | 2212 | (defun completion-before-command () |
| 2277 | (funcall (or (and (symbolp this-command) | 2213 | (funcall (or (and (symbolp this-command) |
| @@ -2428,9 +2364,6 @@ if ARG is omitted or nil." | |||
| 2428 | ;; fooquux | 2364 | ;; fooquux |
| 2429 | ;; fooper | 2365 | ;; fooper |
| 2430 | 2366 | ||
| 2431 | (cmpl-statistics-block | ||
| 2432 | (record-completion-file-loaded)) | ||
| 2433 | |||
| 2434 | (completion-initialize))) | 2367 | (completion-initialize))) |
| 2435 | 2368 | ||
| 2436 | ;;----------------------------------------------- | 2369 | ;;----------------------------------------------- |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index b50c1a5155b..176440f91bb 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; cus-edit.el --- tools for customizing Emacs and Lisp packages | 1 | ;;; cus-edit.el --- tools for customizing Emacs and Lisp packages -*- lexical-binding:t -*- |
| 2 | ;; | 2 | ;; |
| 3 | ;; Copyright (C) 1996-1997, 1999-2013 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1996-1997, 1999-2013 Free Software Foundation, Inc. |
| 4 | ;; | 4 | ;; |
| @@ -1057,8 +1057,8 @@ the resulting list value now. Otherwise, add an entry to | |||
| 1057 | (let ((coding-system-for-read nil)) | 1057 | (let ((coding-system-for-read nil)) |
| 1058 | (customize-save-variable list-var (eval list-var))) | 1058 | (customize-save-variable list-var (eval list-var))) |
| 1059 | (add-hook 'after-init-hook | 1059 | (add-hook 'after-init-hook |
| 1060 | `(lambda () | 1060 | (lambda () |
| 1061 | (customize-push-and-save ',list-var ',elts))))) | 1061 | (customize-push-and-save list-var elts))))) |
| 1062 | 1062 | ||
| 1063 | ;;;###autoload | 1063 | ;;;###autoload |
| 1064 | (defun customize () | 1064 | (defun customize () |
| @@ -1415,6 +1415,7 @@ suggest to customize that face, if it's customizable." | |||
| 1415 | "*Customize Saved*")))) | 1415 | "*Customize Saved*")))) |
| 1416 | 1416 | ||
| 1417 | (declare-function apropos-parse-pattern "apropos" (pattern)) | 1417 | (declare-function apropos-parse-pattern "apropos" (pattern)) |
| 1418 | (defvar apropos-regexp) | ||
| 1418 | 1419 | ||
| 1419 | ;;;###autoload | 1420 | ;;;###autoload |
| 1420 | (defun customize-apropos (pattern &optional type) | 1421 | (defun customize-apropos (pattern &optional type) |
| @@ -1431,23 +1432,23 @@ If TYPE is `groups', include only groups." | |||
| 1431 | (require 'apropos) | 1432 | (require 'apropos) |
| 1432 | (unless (memq type '(nil options faces groups)) | 1433 | (unless (memq type '(nil options faces groups)) |
| 1433 | (error "Invalid setting type %s" (symbol-name type))) | 1434 | (error "Invalid setting type %s" (symbol-name type))) |
| 1434 | (apropos-parse-pattern pattern) | 1435 | (apropos-parse-pattern pattern) ;Sets apropos-regexp by side-effect: Yuck! |
| 1435 | (let (found) | 1436 | (let (found) |
| 1436 | (mapatoms | 1437 | (mapatoms |
| 1437 | `(lambda (symbol) | 1438 | (lambda (symbol) |
| 1438 | (when (string-match-p apropos-regexp (symbol-name symbol)) | 1439 | (when (string-match-p apropos-regexp (symbol-name symbol)) |
| 1439 | ,(if (memq type '(nil groups)) | 1440 | (if (memq type '(nil groups)) |
| 1440 | '(if (get symbol 'custom-group) | 1441 | (if (get symbol 'custom-group) |
| 1441 | (push (list symbol 'custom-group) found))) | 1442 | (push (list symbol 'custom-group) found))) |
| 1442 | ,(if (memq type '(nil faces)) | 1443 | (if (memq type '(nil faces)) |
| 1443 | '(if (custom-facep symbol) | 1444 | (if (custom-facep symbol) |
| 1444 | (push (list symbol 'custom-face) found))) | 1445 | (push (list symbol 'custom-face) found))) |
| 1445 | ,(if (memq type '(nil options)) | 1446 | (if (memq type '(nil options)) |
| 1446 | `(if (and (boundp symbol) | 1447 | (if (and (boundp symbol) |
| 1447 | (eq (indirect-variable symbol) symbol) | 1448 | (eq (indirect-variable symbol) symbol) |
| 1448 | (or (get symbol 'saved-value) | 1449 | (or (get symbol 'saved-value) |
| 1449 | (custom-variable-p symbol))) | 1450 | (custom-variable-p symbol))) |
| 1450 | (push (list symbol 'custom-variable) found)))))) | 1451 | (push (list symbol 'custom-variable) found)))))) |
| 1451 | (unless found | 1452 | (unless found |
| 1452 | (error "No customizable %s matching %s" (symbol-name type) pattern)) | 1453 | (error "No customizable %s matching %s" (symbol-name type) pattern)) |
| 1453 | (custom-buffer-create | 1454 | (custom-buffer-create |
| @@ -1621,8 +1622,8 @@ or a regular expression.") | |||
| 1621 | (widget-create | 1622 | (widget-create |
| 1622 | 'editable-field | 1623 | 'editable-field |
| 1623 | :size 40 :help-echo echo | 1624 | :size 40 :help-echo echo |
| 1624 | :action `(lambda (widget &optional event) | 1625 | :action (lambda (widget &optional _event) |
| 1625 | (customize-apropos (split-string (widget-value widget))))))) | 1626 | (customize-apropos (split-string (widget-value widget))))))) |
| 1626 | (widget-insert " ") | 1627 | (widget-insert " ") |
| 1627 | (widget-create-child-and-convert | 1628 | (widget-create-child-and-convert |
| 1628 | search-widget 'push-button | 1629 | search-widget 'push-button |
diff --git a/lisp/cus-start.el b/lisp/cus-start.el index cf94b6300dd..24f8ac3bade 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el | |||
| @@ -457,7 +457,12 @@ since it could result in memory overflow and make Emacs crash." | |||
| 457 | (scroll-margin windows integer) | 457 | (scroll-margin windows integer) |
| 458 | (hscroll-margin windows integer "22.1") | 458 | (hscroll-margin windows integer "22.1") |
| 459 | (hscroll-step windows number "22.1") | 459 | (hscroll-step windows number "22.1") |
| 460 | (truncate-partial-width-windows display boolean "23.1") | 460 | (truncate-partial-width-windows |
| 461 | display | ||
| 462 | (choice (integer :tag "Truncate if narrower than") | ||
| 463 | (const :tag "Respect `truncate-lines'" nil) | ||
| 464 | (other :tag "Truncate if not full-width" t)) | ||
| 465 | "23.1") | ||
| 461 | (make-cursor-line-fully-visible windows boolean) | 466 | (make-cursor-line-fully-visible windows boolean) |
| 462 | (mode-line-in-non-selected-windows mode-line boolean "22.1") | 467 | (mode-line-in-non-selected-windows mode-line boolean "22.1") |
| 463 | (line-number-display-limit display | 468 | (line-number-display-limit display |
diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el index d1bdd3f52be..e2aeb4ea19b 100644 --- a/lisp/dabbrev.el +++ b/lisp/dabbrev.el | |||
| @@ -457,7 +457,7 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]." | |||
| 457 | (markerp dabbrev--last-abbrev-location) | 457 | (markerp dabbrev--last-abbrev-location) |
| 458 | (marker-position dabbrev--last-abbrev-location) | 458 | (marker-position dabbrev--last-abbrev-location) |
| 459 | (or (eq last-command this-command) | 459 | (or (eq last-command this-command) |
| 460 | (and (window-minibuffer-p (selected-window)) | 460 | (and (window-minibuffer-p) |
| 461 | (= dabbrev--last-abbrev-location | 461 | (= dabbrev--last-abbrev-location |
| 462 | (point))))) | 462 | (point))))) |
| 463 | ;; Find a different expansion for the same abbrev as last time. | 463 | ;; Find a different expansion for the same abbrev as last time. |
| @@ -793,7 +793,7 @@ of the start of the occurrence." | |||
| 793 | ;; In a minibuffer, search the buffer it was activated from, | 793 | ;; In a minibuffer, search the buffer it was activated from, |
| 794 | ;; first after the minibuffer itself. Unless we aren't supposed | 794 | ;; first after the minibuffer itself. Unless we aren't supposed |
| 795 | ;; to search the current buffer either. | 795 | ;; to search the current buffer either. |
| 796 | (if (and (window-minibuffer-p (selected-window)) | 796 | (if (and (window-minibuffer-p) |
| 797 | (not dabbrev-search-these-buffers-only)) | 797 | (not dabbrev-search-these-buffers-only)) |
| 798 | (setq list | 798 | (setq list |
| 799 | (cons (dabbrev--minibuffer-origin) | 799 | (cons (dabbrev--minibuffer-origin) |
diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 774ee92a146..134dbdfb33b 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; descr-text.el --- describe text mode | 1 | ;;; descr-text.el --- describe text mode -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1994-1996, 2001-2013 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1994-1996, 2001-2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -23,7 +23,7 @@ | |||
| 23 | 23 | ||
| 24 | ;;; Commentary: | 24 | ;;; Commentary: |
| 25 | 25 | ||
| 26 | ;;; Describe-Text Mode. | 26 | ;; Describe-Text Mode. |
| 27 | 27 | ||
| 28 | ;;; Code: | 28 | ;;; Code: |
| 29 | 29 | ||
| @@ -36,8 +36,7 @@ | |||
| 36 | "Insert text to describe WIDGET in the current buffer." | 36 | "Insert text to describe WIDGET in the current buffer." |
| 37 | (insert-text-button | 37 | (insert-text-button |
| 38 | (symbol-name (if (symbolp widget) widget (car widget))) | 38 | (symbol-name (if (symbolp widget) widget (car widget))) |
| 39 | 'action `(lambda (&rest ignore) | 39 | 'action (lambda (&rest _ignore) (widget-browse widget)) |
| 40 | (widget-browse ',widget)) | ||
| 41 | 'help-echo "mouse-2, RET: browse this widget") | 40 | 'help-echo "mouse-2, RET: browse this widget") |
| 42 | (insert " ") | 41 | (insert " ") |
| 43 | (insert-text-button | 42 | (insert-text-button |
| @@ -55,10 +54,10 @@ | |||
| 55 | (<= (length pp) (- (window-width) (current-column)))) | 54 | (<= (length pp) (- (window-width) (current-column)))) |
| 56 | (insert pp) | 55 | (insert pp) |
| 57 | (insert-text-button | 56 | (insert-text-button |
| 58 | "[Show]" 'action `(lambda (&rest ignore) | 57 | "[Show]" 'action (lambda (&rest _ignore) |
| 59 | (with-output-to-temp-buffer | 58 | (with-output-to-temp-buffer |
| 60 | "*Pp Eval Output*" | 59 | "*Pp Eval Output*" |
| 61 | (princ ',pp))) | 60 | (princ pp))) |
| 62 | 'help-echo "mouse-2, RET: pretty print value in another buffer")))) | 61 | 'help-echo "mouse-2, RET: pretty print value in another buffer")))) |
| 63 | 62 | ||
| 64 | (defun describe-property-list (properties) | 63 | (defun describe-property-list (properties) |
| @@ -81,8 +80,8 @@ into help buttons that call `describe-text-category' or | |||
| 81 | (cond ((eq key 'category) | 80 | (cond ((eq key 'category) |
| 82 | (insert-text-button | 81 | (insert-text-button |
| 83 | (symbol-name value) | 82 | (symbol-name value) |
| 84 | 'action `(lambda (&rest ignore) | 83 | 'action (lambda (&rest _ignore) |
| 85 | (describe-text-category ',value)) | 84 | (describe-text-category value)) |
| 86 | 'follow-link t | 85 | 'follow-link t |
| 87 | 'help-echo "mouse-2, RET: describe this category")) | 86 | 'help-echo "mouse-2, RET: describe this category")) |
| 88 | ((memq key '(face font-lock-face mouse-face)) | 87 | ((memq key '(face font-lock-face mouse-face)) |
| @@ -663,7 +662,7 @@ relevant to POS." | |||
| 663 | ((and (< char 32) (not (memq char '(9 10)))) | 662 | ((and (< char 32) (not (memq char '(9 10)))) |
| 664 | 'escape-glyph))))) | 663 | 'escape-glyph))))) |
| 665 | (if face (list (list "hardcoded face" | 664 | (if face (list (list "hardcoded face" |
| 666 | `(insert-text-button | 665 | `(insert-text-button ;FIXME: Wrap in lambda! |
| 667 | ,(symbol-name face) | 666 | ,(symbol-name face) |
| 668 | 'type 'help-face | 667 | 'type 'help-face |
| 669 | 'help-args '(,face)))))) | 668 | 'help-args '(,face)))))) |
diff --git a/lisp/desktop.el b/lisp/desktop.el index 778c37484e1..1bbc33cb244 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; desktop.el --- save partial status of Emacs when killed | 1 | ;;; desktop.el --- save partial status of Emacs when killed -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1993-1995, 1997, 2000-2013 Free Software Foundation, | 3 | ;; Copyright (C) 1993-1995, 1997, 2000-2013 Free Software Foundation, |
| 4 | ;; Inc. | 4 | ;; Inc. |
| @@ -390,12 +390,12 @@ If `delete', frames on other displays are deleted instead of restored." | |||
| 390 | 390 | ||
| 391 | (defcustom desktop-restore-forces-onscreen t | 391 | (defcustom desktop-restore-forces-onscreen t |
| 392 | "If t, offscreen frames are restored onscreen instead. | 392 | "If t, offscreen frames are restored onscreen instead. |
| 393 | If `all', frames that are partially offscreen are also forced onscren. | 393 | If `:all', frames that are partially offscreen are also forced onscreen. |
| 394 | NOTE: Checking of frame boundaries is only approximate and can fail | 394 | NOTE: Checking of frame boundaries is only approximate and can fail |
| 395 | to reliably detect frames whose onscreen/offscreen state depends on a | 395 | to reliably detect frames whose onscreen/offscreen state depends on a |
| 396 | few pixels, especially near the right / bottom borders of the screen." | 396 | few pixels, especially near the right / bottom borders of the screen." |
| 397 | :type '(choice (const :tag "Only fully offscreen frames" t) | 397 | :type '(choice (const :tag "Only fully offscreen frames" t) |
| 398 | (const :tag "Also partially offscreen frames" 'all) | 398 | (const :tag "Also partially offscreen frames" :all) |
| 399 | (const :tag "Do not force frames onscreen" nil)) | 399 | (const :tag "Do not force frames onscreen" nil)) |
| 400 | :group 'desktop | 400 | :group 'desktop |
| 401 | :version "24.4") | 401 | :version "24.4") |
| @@ -403,10 +403,10 @@ few pixels, especially near the right / bottom borders of the screen." | |||
| 403 | (defcustom desktop-restore-reuses-frames t | 403 | (defcustom desktop-restore-reuses-frames t |
| 404 | "If t, restoring frames reuses existing frames. | 404 | "If t, restoring frames reuses existing frames. |
| 405 | If nil, existing frames are deleted. | 405 | If nil, existing frames are deleted. |
| 406 | If `keep', existing frames are kept and not reused." | 406 | If `:keep', existing frames are kept and not reused." |
| 407 | :type '(choice (const :tag "Reuse existing frames" t) | 407 | :type '(choice (const :tag "Reuse existing frames" t) |
| 408 | (const :tag "Delete existing frames" nil) | 408 | (const :tag "Delete existing frames" nil) |
| 409 | (const :tag "Keep existing frames" 'keep)) | 409 | (const :tag "Keep existing frames" :keep)) |
| 410 | :group 'desktop | 410 | :group 'desktop |
| 411 | :version "24.4") | 411 | :version "24.4") |
| 412 | 412 | ||
| @@ -670,8 +670,8 @@ if different)." | |||
| 670 | ;; which already takes care of frame restoration and deletion. | 670 | ;; which already takes care of frame restoration and deletion. |
| 671 | (called-interactively-p 'any)) | 671 | (called-interactively-p 'any)) |
| 672 | (let* ((this (selected-frame)) | 672 | (let* ((this (selected-frame)) |
| 673 | (mini (window-frame (minibuffer-window this)))) ; in case they difer | 673 | (mini (window-frame (minibuffer-window this)))) ; in case they differ |
| 674 | (dolist (frame (sort (frame-list) #'frameset-sort-frames-for-deletion)) | 674 | (dolist (frame (sort (frame-list) #'frameset-minibufferless-first-p)) |
| 675 | (condition-case err | 675 | (condition-case err |
| 676 | (unless (or (eq frame this) | 676 | (unless (or (eq frame this) |
| 677 | (eq frame mini) | 677 | (eq frame mini) |
| @@ -900,25 +900,6 @@ DIRNAME must be the directory in which the desktop file will be saved." | |||
| 900 | 900 | ||
| 901 | 901 | ||
| 902 | ;; ---------------------------------------------------------------------------- | 902 | ;; ---------------------------------------------------------------------------- |
| 903 | (defvar desktop-filter-parameters-alist | ||
| 904 | (append '((font-backend . t) | ||
| 905 | (name . t) | ||
| 906 | (outer-window-id . t) | ||
| 907 | (parent-id . t) | ||
| 908 | (tty . desktop--filter-tty*) | ||
| 909 | (tty-type . desktop--filter-tty*) | ||
| 910 | (window-id . t) | ||
| 911 | (window-system . t)) | ||
| 912 | frameset-filter-alist) | ||
| 913 | "Alist of frame parameters and filtering functions. | ||
| 914 | Its format is identical to `frameset-filter-alist' (which see).") | ||
| 915 | |||
| 916 | (defun desktop--filter-tty* (_current parameters saving) | ||
| 917 | ;; Remove tty and tty-type parameters when switching | ||
| 918 | ;; to a GUI frame. | ||
| 919 | (or saving | ||
| 920 | (not (frameset-switch-to-gui-p parameters)))) | ||
| 921 | |||
| 922 | (defun desktop--check-dont-save (frame) | 903 | (defun desktop--check-dont-save (frame) |
| 923 | (not (frame-parameter frame 'desktop-dont-save))) | 904 | (not (frame-parameter frame 'desktop-dont-save))) |
| 924 | 905 | ||
| @@ -929,13 +910,10 @@ Its format is identical to `frameset-filter-alist' (which see).") | |||
| 929 | Frames with a non-nil `desktop-dont-save' parameter are not saved." | 910 | Frames with a non-nil `desktop-dont-save' parameter are not saved." |
| 930 | (setq desktop-saved-frameset | 911 | (setq desktop-saved-frameset |
| 931 | (and desktop-restore-frames | 912 | (and desktop-restore-frames |
| 932 | (let ((name (concat user-login-name "@" system-name | 913 | (frameset-save nil |
| 933 | (format-time-string " %Y-%m-%d %T")))) | 914 | :app desktop--app-id |
| 934 | (frameset-save nil | 915 | :name (concat user-login-name "@" system-name) |
| 935 | :filters desktop-filter-parameters-alist | 916 | :predicate #'desktop--check-dont-save)))) |
| 936 | :predicate #'desktop--check-dont-save | ||
| 937 | :properties (list :app desktop--app-id | ||
| 938 | :name name)))))) | ||
| 939 | 917 | ||
| 940 | ;;;###autoload | 918 | ;;;###autoload |
| 941 | (defun desktop-save (dirname &optional release auto-save) | 919 | (defun desktop-save (dirname &optional release auto-save) |
| @@ -1049,13 +1027,12 @@ This function depends on the value of `desktop-saved-frameset' | |||
| 1049 | being set (usually, by reading it from the desktop)." | 1027 | being set (usually, by reading it from the desktop)." |
| 1050 | (when (desktop-restoring-frameset-p) | 1028 | (when (desktop-restoring-frameset-p) |
| 1051 | (frameset-restore desktop-saved-frameset | 1029 | (frameset-restore desktop-saved-frameset |
| 1052 | :filters desktop-filter-parameters-alist | ||
| 1053 | :reuse-frames desktop-restore-reuses-frames | 1030 | :reuse-frames desktop-restore-reuses-frames |
| 1054 | :force-display desktop-restore-in-current-display | 1031 | :force-display desktop-restore-in-current-display |
| 1055 | :force-onscreen desktop-restore-forces-onscreen))) | 1032 | :force-onscreen desktop-restore-forces-onscreen))) |
| 1056 | 1033 | ||
| 1057 | ;; Just to silence the byte compiler. | 1034 | ;; Just to silence the byte compiler. |
| 1058 | ;; Dynamicaly bound in `desktop-read'. | 1035 | ;; Dynamically bound in `desktop-read'. |
| 1059 | (defvar desktop-first-buffer) | 1036 | (defvar desktop-first-buffer) |
| 1060 | (defvar desktop-buffer-ok-count) | 1037 | (defvar desktop-buffer-ok-count) |
| 1061 | (defvar desktop-buffer-fail-count) | 1038 | (defvar desktop-buffer-fail-count) |
diff --git a/lisp/dframe.el b/lisp/dframe.el index 21b508512d3..66967075e34 100644 --- a/lisp/dframe.el +++ b/lisp/dframe.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; dframe --- dedicate frame support modes | 1 | ;;; dframe --- dedicate frame support modes -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1996-2013 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1996-2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -259,9 +259,15 @@ This buffer will have `dframe-frame-mode' run on it. | |||
| 259 | FRAME-NAME is the name of the frame to create. | 259 | FRAME-NAME is the name of the frame to create. |
| 260 | LOCAL-MODE-FN is the function used to call this one. | 260 | LOCAL-MODE-FN is the function used to call this one. |
| 261 | PARAMETERS are frame parameters to apply to this dframe. | 261 | PARAMETERS are frame parameters to apply to this dframe. |
| 262 | DELETE-HOOK are hooks to run when deleting a frame. | 262 | DELETE-HOOK is a hook to run when deleting a frame. |
| 263 | POPUP-HOOK are hooks to run before showing a frame. | 263 | POPUP-HOOK is a hook to run before showing a frame. |
| 264 | CREATE-HOOK are hooks to run after creating a frame." | 264 | CREATE-HOOK is a hook to run after creating a frame." |
| 265 | (let ((conv-hook (lambda (val) | ||
| 266 | (let ((sym (make-symbol "hook"))) | ||
| 267 | (set sym val) sym)))) | ||
| 268 | (if (consp delete-hook) (setq delete-hook (funcall conv-hook delete-hook))) | ||
| 269 | (if (consp create-hook) (setq create-hook (funcall conv-hook create-hook))) | ||
| 270 | (if (consp popup-hook) (setq popup-hook (funcall conv-hook popup-hook)))) | ||
| 265 | ;; toggle frame on and off. | 271 | ;; toggle frame on and off. |
| 266 | (if (not arg) (if (dframe-live-p (symbol-value frame-var)) | 272 | (if (not arg) (if (dframe-live-p (symbol-value frame-var)) |
| 267 | (setq arg -1) (setq arg 1))) | 273 | (setq arg -1) (setq arg 1))) |
| @@ -270,7 +276,7 @@ CREATE-HOOK are hooks to run after creating a frame." | |||
| 270 | ;; turn the frame off on neg number | 276 | ;; turn the frame off on neg number |
| 271 | (if (and (numberp arg) (< arg 0)) | 277 | (if (and (numberp arg) (< arg 0)) |
| 272 | (progn | 278 | (progn |
| 273 | (run-hooks 'delete-hook) | 279 | (run-hooks delete-hook) |
| 274 | (if (and (symbol-value frame-var) | 280 | (if (and (symbol-value frame-var) |
| 275 | (frame-live-p (symbol-value frame-var))) | 281 | (frame-live-p (symbol-value frame-var))) |
| 276 | (progn | 282 | (progn |
| @@ -279,7 +285,7 @@ CREATE-HOOK are hooks to run after creating a frame." | |||
| 279 | (set frame-var nil)) | 285 | (set frame-var nil)) |
| 280 | ;; Set this as our currently attached frame | 286 | ;; Set this as our currently attached frame |
| 281 | (setq dframe-attached-frame (selected-frame)) | 287 | (setq dframe-attached-frame (selected-frame)) |
| 282 | (run-hooks 'popup-hook) | 288 | (run-hooks popup-hook) |
| 283 | ;; Updated the buffer passed in to contain all the hacks needed | 289 | ;; Updated the buffer passed in to contain all the hacks needed |
| 284 | ;; to make it work well in a dedicated window. | 290 | ;; to make it work well in a dedicated window. |
| 285 | (with-current-buffer (symbol-value buffer-var) | 291 | (with-current-buffer (symbol-value buffer-var) |
| @@ -331,15 +337,15 @@ CREATE-HOOK are hooks to run after creating a frame." | |||
| 331 | (setq temp-buffer-show-function 'dframe-temp-buffer-show-function) | 337 | (setq temp-buffer-show-function 'dframe-temp-buffer-show-function) |
| 332 | ;; If this buffer is killed, we must make sure that we destroy | 338 | ;; If this buffer is killed, we must make sure that we destroy |
| 333 | ;; the frame the dedicated window is in. | 339 | ;; the frame the dedicated window is in. |
| 334 | (add-hook 'kill-buffer-hook `(lambda () | 340 | (add-hook 'kill-buffer-hook (lambda () |
| 335 | (let ((skilling (boundp 'skilling))) | 341 | (let ((skilling (boundp 'skilling))) |
| 336 | (if skilling | 342 | (if skilling |
| 337 | nil | 343 | nil |
| 338 | (if dframe-controlled | 344 | (if dframe-controlled |
| 339 | (progn | 345 | (progn |
| 340 | (funcall dframe-controlled -1) | 346 | (funcall dframe-controlled -1) |
| 341 | (setq ,buffer-var nil) | 347 | (set buffer-var nil) |
| 342 | ))))) | 348 | ))))) |
| 343 | t t) | 349 | t t) |
| 344 | ) | 350 | ) |
| 345 | ;; Get the frame to work in | 351 | ;; Get the frame to work in |
| @@ -396,7 +402,7 @@ CREATE-HOOK are hooks to run after creating a frame." | |||
| 396 | (switch-to-buffer (symbol-value buffer-var)) | 402 | (switch-to-buffer (symbol-value buffer-var)) |
| 397 | (set-window-dedicated-p (selected-window) t)) | 403 | (set-window-dedicated-p (selected-window) t)) |
| 398 | ;; Run hooks (like reposition) | 404 | ;; Run hooks (like reposition) |
| 399 | (run-hooks 'create-hook) | 405 | (run-hooks create-hook) |
| 400 | ;; Frame name | 406 | ;; Frame name |
| 401 | (if (and (or (null window-system) (eq window-system 'pc)) | 407 | (if (and (or (null window-system) (eq window-system 'pc)) |
| 402 | (fboundp 'set-frame-name)) | 408 | (fboundp 'set-frame-name)) |
| @@ -602,7 +608,7 @@ Argument E is the event deleting the frame." | |||
| 602 | If the selected frame is not in the symbol FRAME-VAR, then FRAME-VAR | 608 | If the selected frame is not in the symbol FRAME-VAR, then FRAME-VAR |
| 603 | frame is selected. If the FRAME-VAR is active, then select the | 609 | frame is selected. If the FRAME-VAR is active, then select the |
| 604 | attached frame. If FRAME-VAR is nil, ACTIVATOR is called to | 610 | attached frame. If FRAME-VAR is nil, ACTIVATOR is called to |
| 605 | created it. HOOK is an optional argument of hooks to run when | 611 | created it. HOOK is an optional hook to run when |
| 606 | selecting FRAME-VAR." | 612 | selecting FRAME-VAR." |
| 607 | (interactive) | 613 | (interactive) |
| 608 | (if (eq (selected-frame) (symbol-value frame-var)) | 614 | (if (eq (selected-frame) (symbol-value frame-var)) |
| @@ -616,7 +622,7 @@ selecting FRAME-VAR." | |||
| 616 | ) | 622 | ) |
| 617 | (other-frame 0) | 623 | (other-frame 0) |
| 618 | ;; If updates are off, then refresh the frame (they want it now...) | 624 | ;; If updates are off, then refresh the frame (they want it now...) |
| 619 | (run-hooks 'hook)) | 625 | (run-hooks hook)) |
| 620 | 626 | ||
| 621 | 627 | ||
| 622 | (defun dframe-close-frame () | 628 | (defun dframe-close-frame () |
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 7cb63f6b012..31d0495175a 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -286,7 +286,7 @@ List has a form of (file-name full-file-name (attribute-list))." | |||
| 286 | (if (eq op-symbol 'touch) | 286 | (if (eq op-symbol 'touch) |
| 287 | (list "-t" new-attribute) | 287 | (list "-t" new-attribute) |
| 288 | (list new-attribute))) | 288 | (list new-attribute))) |
| 289 | (if (string-match "gnu" system-configuration) | 289 | (if (string-match-p "gnu" system-configuration) |
| 290 | '("--") nil)) | 290 | '("--") nil)) |
| 291 | files)) | 291 | files)) |
| 292 | (dired-do-redisplay arg);; moves point if ARG is an integer | 292 | (dired-do-redisplay arg);; moves point if ARG is an integer |
| @@ -327,7 +327,7 @@ into the minibuffer." | |||
| 327 | ;; We used to treat empty input as DEFAULT, but that is not | 327 | ;; We used to treat empty input as DEFAULT, but that is not |
| 328 | ;; such a good idea (Bug#9361). | 328 | ;; such a good idea (Bug#9361). |
| 329 | (error "No file mode specified")) | 329 | (error "No file mode specified")) |
| 330 | ((string-match "^[0-7]+" modes) | 330 | ((string-match-p "^[0-7]+" modes) |
| 331 | (setq num-modes (string-to-number modes 8)))) | 331 | (setq num-modes (string-to-number modes 8)))) |
| 332 | 332 | ||
| 333 | (dolist (file files) | 333 | (dolist (file files) |
| @@ -500,7 +500,7 @@ with a prefix argument." | |||
| 500 | (goto-char (point-min)) | 500 | (goto-char (point-min)) |
| 501 | (while (not (eobp)) | 501 | (while (not (eobp)) |
| 502 | (save-excursion | 502 | (save-excursion |
| 503 | (and (not (looking-at dired-re-dir)) | 503 | (and (not (looking-at-p dired-re-dir)) |
| 504 | (not (eolp)) | 504 | (not (eolp)) |
| 505 | (setq file (dired-get-filename nil t)) ; nil on non-file | 505 | (setq file (dired-get-filename nil t)) ; nil on non-file |
| 506 | (progn (end-of-line) | 506 | (progn (end-of-line) |
| @@ -530,7 +530,7 @@ with a prefix argument." | |||
| 530 | dired-file-version-alist))))))) | 530 | dired-file-version-alist))))))) |
| 531 | 531 | ||
| 532 | (defun dired-trample-file-versions (fn) | 532 | (defun dired-trample-file-versions (fn) |
| 533 | (let* ((start-vn (string-match "\\.~[0-9]+~$" fn)) | 533 | (let* ((start-vn (string-match-p "\\.~[0-9]+~$" fn)) |
| 534 | base-version-list) | 534 | base-version-list) |
| 535 | (and start-vn | 535 | (and start-vn |
| 536 | (setq base-version-list ; there was a base version to which | 536 | (setq base-version-list ; there was a base version to which |
| @@ -602,7 +602,7 @@ The output appears in the buffer `*Async Shell Command*'." | |||
| 602 | (dired-read-shell-command "& on %s: " current-prefix-arg files) | 602 | (dired-read-shell-command "& on %s: " current-prefix-arg files) |
| 603 | current-prefix-arg | 603 | current-prefix-arg |
| 604 | files))) | 604 | files))) |
| 605 | (unless (string-match "&[ \t]*\\'" command) | 605 | (unless (string-match-p "&[ \t]*\\'" command) |
| 606 | (setq command (concat command " &"))) | 606 | (setq command (concat command " &"))) |
| 607 | (dired-do-shell-command command arg file-list)) | 607 | (dired-do-shell-command command arg file-list)) |
| 608 | 608 | ||
| @@ -663,10 +663,10 @@ can be produced by `dired-get-marked-files', for example." | |||
| 663 | (dired-read-shell-command "! on %s: " current-prefix-arg files) | 663 | (dired-read-shell-command "! on %s: " current-prefix-arg files) |
| 664 | current-prefix-arg | 664 | current-prefix-arg |
| 665 | files))) | 665 | files))) |
| 666 | (let* ((on-each (not (string-match dired-star-subst-regexp command))) | 666 | (let* ((on-each (not (string-match-p dired-star-subst-regexp command))) |
| 667 | (no-subst (not (string-match dired-quark-subst-regexp command))) | 667 | (no-subst (not (string-match-p dired-quark-subst-regexp command))) |
| 668 | (star (string-match "\\*" command)) | 668 | (star (string-match-p "\\*" command)) |
| 669 | (qmark (string-match "\\?" command))) | 669 | (qmark (string-match-p "\\?" command))) |
| 670 | ;; Get confirmation for wildcards that may have been meant | 670 | ;; Get confirmation for wildcards that may have been meant |
| 671 | ;; to control substitution of a file name or the file name list. | 671 | ;; to control substitution of a file name or the file name list. |
| 672 | (if (cond ((not (or on-each no-subst)) | 672 | (if (cond ((not (or on-each no-subst)) |
| @@ -713,8 +713,8 @@ can be produced by `dired-get-marked-files', for example." | |||
| 713 | (substring command 0 (match-beginning 0)) | 713 | (substring command 0 (match-beginning 0)) |
| 714 | command)) | 714 | command)) |
| 715 | (stuff-it | 715 | (stuff-it |
| 716 | (if (or (string-match dired-star-subst-regexp command) | 716 | (if (or (string-match-p dired-star-subst-regexp command) |
| 717 | (string-match dired-quark-subst-regexp command)) | 717 | (string-match-p dired-quark-subst-regexp command)) |
| 718 | (lambda (x) | 718 | (lambda (x) |
| 719 | (let ((retval command)) | 719 | (let ((retval command)) |
| 720 | (while (string-match | 720 | (while (string-match |
| @@ -840,9 +840,7 @@ command with a prefix argument (the value does not matter)." | |||
| 840 | (if new-file | 840 | (if new-file |
| 841 | (let ((start (point))) | 841 | (let ((start (point))) |
| 842 | ;; Remove any preexisting entry for the name NEW-FILE. | 842 | ;; Remove any preexisting entry for the name NEW-FILE. |
| 843 | (condition-case nil | 843 | (ignore-errors (dired-remove-entry new-file)) |
| 844 | (dired-remove-entry new-file) | ||
| 845 | (error nil)) | ||
| 846 | (goto-char start) | 844 | (goto-char start) |
| 847 | ;; Now replace the current line with an entry for NEW-FILE. | 845 | ;; Now replace the current line with an entry for NEW-FILE. |
| 848 | (dired-update-file-line new-file) nil) | 846 | (dired-update-file-line new-file) nil) |
| @@ -883,7 +881,7 @@ Otherwise, the rule is a compression rule, and compression is done with gzip.") | |||
| 883 | ;; See if any suffix rule matches this file name. | 881 | ;; See if any suffix rule matches this file name. |
| 884 | (while suffixes | 882 | (while suffixes |
| 885 | (let (case-fold-search) | 883 | (let (case-fold-search) |
| 886 | (if (string-match (car (car suffixes)) file) | 884 | (if (string-match-p (car (car suffixes)) file) |
| 887 | (setq suffix (car suffixes) suffixes nil)) | 885 | (setq suffix (car suffixes) suffixes nil)) |
| 888 | (setq suffixes (cdr suffixes)))) | 886 | (setq suffixes (cdr suffixes)))) |
| 889 | ;; If so, compute desired new name. | 887 | ;; If so, compute desired new name. |
| @@ -1143,16 +1141,16 @@ files matching `dired-omit-regexp'." | |||
| 1143 | ;; Avoid calling ls for files that are going to be omitted anyway. | 1141 | ;; Avoid calling ls for files that are going to be omitted anyway. |
| 1144 | (let ((omit-re (dired-omit-regexp))) | 1142 | (let ((omit-re (dired-omit-regexp))) |
| 1145 | (or (string= omit-re "") | 1143 | (or (string= omit-re "") |
| 1146 | (not (string-match omit-re | 1144 | (not (string-match-p omit-re |
| 1147 | (cond | 1145 | (cond |
| 1148 | ((eq 'no-dir dired-omit-localp) | 1146 | ((eq 'no-dir dired-omit-localp) |
| 1149 | filename) | 1147 | filename) |
| 1150 | ((eq t dired-omit-localp) | 1148 | ((eq t dired-omit-localp) |
| 1151 | (dired-make-relative filename)) | 1149 | (dired-make-relative filename)) |
| 1152 | (t | 1150 | (t |
| 1153 | (dired-make-absolute | 1151 | (dired-make-absolute |
| 1154 | filename | 1152 | filename |
| 1155 | (file-name-directory filename))))))))) | 1153 | (file-name-directory filename))))))))) |
| 1156 | ;; Do it! | 1154 | ;; Do it! |
| 1157 | (progn | 1155 | (progn |
| 1158 | (setq filename (directory-file-name filename)) | 1156 | (setq filename (directory-file-name filename)) |
| @@ -1180,7 +1178,7 @@ files matching `dired-omit-regexp'." | |||
| 1180 | ;; else try to find correct place to insert | 1178 | ;; else try to find correct place to insert |
| 1181 | (if (dired-goto-subdir directory) | 1179 | (if (dired-goto-subdir directory) |
| 1182 | (progn ;; unhide if necessary | 1180 | (progn ;; unhide if necessary |
| 1183 | (if (looking-at "\r") | 1181 | (if (looking-at-p "\r") |
| 1184 | ;; Point is at end of subdir line. | 1182 | ;; Point is at end of subdir line. |
| 1185 | (dired-unhide-subdir)) | 1183 | (dired-unhide-subdir)) |
| 1186 | ;; found - skip subdir and `total' line | 1184 | ;; found - skip subdir and `total' line |
| @@ -2090,7 +2088,7 @@ This function takes some pains to conform to `ls -lR' output." | |||
| 2090 | (and (not switches) cons (setq switches (cdr cons))) | 2088 | (and (not switches) cons (setq switches (cdr cons))) |
| 2091 | (dired-insert-subdir-validate dirname switches) | 2089 | (dired-insert-subdir-validate dirname switches) |
| 2092 | ;; case-fold-search is nil now, so we can test for capital `R': | 2090 | ;; case-fold-search is nil now, so we can test for capital `R': |
| 2093 | (if (setq switches-have-R (and switches (string-match "R" switches))) | 2091 | (if (setq switches-have-R (and switches (string-match-p "R" switches))) |
| 2094 | ;; avoid duplicated subdirs | 2092 | ;; avoid duplicated subdirs |
| 2095 | (setq mark-alist (dired-kill-tree dirname t))) | 2093 | (setq mark-alist (dired-kill-tree dirname t))) |
| 2096 | (if elt | 2094 | (if elt |
| @@ -2128,8 +2126,8 @@ This function takes some pains to conform to `ls -lR' output." | |||
| 2128 | (mapcar | 2126 | (mapcar |
| 2129 | (function | 2127 | (function |
| 2130 | (lambda (x) | 2128 | (lambda (x) |
| 2131 | (or (eq (null (string-match x real-switches)) | 2129 | (or (eq (null (string-match-p x real-switches)) |
| 2132 | (null (string-match x dired-actual-switches))) | 2130 | (null (string-match-p x dired-actual-switches))) |
| 2133 | (error | 2131 | (error |
| 2134 | "Can't have dirs with and without -%s switches together" x)))) | 2132 | "Can't have dirs with and without -%s switches together" x)))) |
| 2135 | ;; all switches that make a difference to dired-get-filename: | 2133 | ;; all switches that make a difference to dired-get-filename: |
| @@ -2170,7 +2168,7 @@ of marked files. If KILL-ROOT is non-nil, kill DIRNAME as well." | |||
| 2170 | (defun dired-insert-subdir-newpos (new-dir) | 2168 | (defun dired-insert-subdir-newpos (new-dir) |
| 2171 | ;; Find pos for new subdir, according to tree order. | 2169 | ;; Find pos for new subdir, according to tree order. |
| 2172 | ;;(goto-char (point-max)) | 2170 | ;;(goto-char (point-max)) |
| 2173 | (let ((alist dired-subdir-alist) elt dir pos new-pos) | 2171 | (let ((alist dired-subdir-alist) elt dir new-pos) |
| 2174 | (while alist | 2172 | (while alist |
| 2175 | (setq elt (car alist) | 2173 | (setq elt (car alist) |
| 2176 | alist (cdr alist) | 2174 | alist (cdr alist) |
| @@ -2421,7 +2419,7 @@ Lower levels are unaffected." | |||
| 2421 | (and selective-display | 2419 | (and selective-display |
| 2422 | (save-excursion | 2420 | (save-excursion |
| 2423 | (dired-goto-subdir dir) | 2421 | (dired-goto-subdir dir) |
| 2424 | (looking-at "\r")))) | 2422 | (looking-at-p "\r")))) |
| 2425 | 2423 | ||
| 2426 | ;;;###autoload | 2424 | ;;;###autoload |
| 2427 | (defun dired-hide-subdir (arg) | 2425 | (defun dired-hide-subdir (arg) |
| @@ -2491,18 +2489,21 @@ a file name. Otherwise, it searches the whole buffer without restrictions." | |||
| 2491 | :group 'dired | 2489 | :group 'dired |
| 2492 | :version "23.1") | 2490 | :version "23.1") |
| 2493 | 2491 | ||
| 2494 | (defun dired-isearch-filenames-toggle () | 2492 | (define-minor-mode dired-isearch-filenames-mode |
| 2495 | "Toggle file names searching on or off. | 2493 | "Toggle file names searching on or off. |
| 2496 | When on, Isearch skips matches outside file names using the predicate | 2494 | When on, Isearch skips matches outside file names using the predicate |
| 2497 | `dired-isearch-filter-filenames' that matches only at file names. | 2495 | `dired-isearch-filter-filenames' that matches only at file names. |
| 2498 | When off, it uses the original predicate." | 2496 | When off, it uses the original predicate." |
| 2499 | (interactive) | 2497 | nil nil nil |
| 2500 | (setq isearch-filter-predicates | 2498 | (if dired-isearch-filenames-mode |
| 2501 | (if (memq 'dired-isearch-filter-filenames isearch-filter-predicates) | 2499 | (add-function :before-while (local 'isearch-filter-predicate) |
| 2502 | (delq 'dired-isearch-filter-filenames isearch-filter-predicates) | 2500 | #'dired-isearch-filter-filenames |
| 2503 | (cons 'dired-isearch-filter-filenames isearch-filter-predicates))) | 2501 | '((isearch-message-prefix . "filename "))) |
| 2504 | (setq isearch-success t isearch-adjusted t) | 2502 | (remove-function (local 'isearch-filter-predicate) |
| 2505 | (isearch-update)) | 2503 | #'dired-isearch-filter-filenames)) |
| 2504 | (when isearch-mode | ||
| 2505 | (setq isearch-success t isearch-adjusted t) | ||
| 2506 | (isearch-update))) | ||
| 2506 | 2507 | ||
| 2507 | ;;;###autoload | 2508 | ;;;###autoload |
| 2508 | (defun dired-isearch-filenames-setup () | 2509 | (defun dired-isearch-filenames-setup () |
| @@ -2511,15 +2512,14 @@ Intended to be added to `isearch-mode-hook'." | |||
| 2511 | (when (or (eq dired-isearch-filenames t) | 2512 | (when (or (eq dired-isearch-filenames t) |
| 2512 | (and (eq dired-isearch-filenames 'dwim) | 2513 | (and (eq dired-isearch-filenames 'dwim) |
| 2513 | (get-text-property (point) 'dired-filename))) | 2514 | (get-text-property (point) 'dired-filename))) |
| 2514 | (define-key isearch-mode-map "\M-sff" 'dired-isearch-filenames-toggle) | 2515 | (define-key isearch-mode-map "\M-sff" 'dired-isearch-filenames-mode) |
| 2515 | (add-hook 'isearch-filter-predicates 'dired-isearch-filter-filenames nil t) | 2516 | (dired-isearch-filenames-mode 1) |
| 2516 | (add-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end nil t))) | 2517 | (add-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end nil t))) |
| 2517 | 2518 | ||
| 2518 | (defun dired-isearch-filenames-end () | 2519 | (defun dired-isearch-filenames-end () |
| 2519 | "Clean up the Dired file name search after terminating isearch." | 2520 | "Clean up the Dired file name search after terminating isearch." |
| 2520 | (setq isearch-message-prefix-add nil) | ||
| 2521 | (define-key isearch-mode-map "\M-sff" nil) | 2521 | (define-key isearch-mode-map "\M-sff" nil) |
| 2522 | (remove-hook 'isearch-filter-predicates 'dired-isearch-filter-filenames t) | 2522 | (dired-isearch-filenames-mode -1) |
| 2523 | (remove-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end t)) | 2523 | (remove-hook 'isearch-mode-end-hook 'dired-isearch-filenames-end t)) |
| 2524 | 2524 | ||
| 2525 | (defun dired-isearch-filter-filenames (beg end) | 2525 | (defun dired-isearch-filter-filenames (beg end) |
| @@ -2531,8 +2531,6 @@ name (has the text property `dired-filename')." | |||
| 2531 | 'dired-filename nil) | 2531 | 'dired-filename nil) |
| 2532 | t)) | 2532 | t)) |
| 2533 | 2533 | ||
| 2534 | (put 'dired-isearch-filter-filenames 'isearch-message-prefix "filename ") | ||
| 2535 | |||
| 2536 | ;;;###autoload | 2534 | ;;;###autoload |
| 2537 | (defun dired-isearch-filenames () | 2535 | (defun dired-isearch-filenames () |
| 2538 | "Search for a string using Isearch only in file names in the Dired buffer." | 2536 | "Search for a string using Isearch only in file names in the Dired buffer." |
diff --git a/lisp/dired.el b/lisp/dired.el index c871761bb3c..f830623a255 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -34,6 +34,9 @@ | |||
| 34 | 34 | ||
| 35 | ;;; Code: | 35 | ;;; Code: |
| 36 | 36 | ||
| 37 | (declare-function dired-buffer-more-recently-used-p | ||
| 38 | "dired-x" (buffer1 buffer2)) | ||
| 39 | |||
| 37 | ;;; Customizable variables | 40 | ;;; Customizable variables |
| 38 | 41 | ||
| 39 | (defgroup dired nil | 42 | (defgroup dired nil |
| @@ -1225,7 +1228,7 @@ see `dired-use-ls-dired' for more details.") | |||
| 1225 | (save-excursion | 1228 | (save-excursion |
| 1226 | (goto-char opoint) | 1229 | (goto-char opoint) |
| 1227 | (when (and (or hdr wildcard) | 1230 | (when (and (or hdr wildcard) |
| 1228 | (not (and (looking-at-p "^ \\(.*\\):$") | 1231 | (not (and (looking-at "^ \\(.*\\):$") |
| 1229 | (file-name-absolute-p (match-string 1))))) | 1232 | (file-name-absolute-p (match-string 1))))) |
| 1230 | ;; Note that dired-build-subdir-alist will replace the name | 1233 | ;; Note that dired-build-subdir-alist will replace the name |
| 1231 | ;; by its expansion, so it does not matter whether what we insert | 1234 | ;; by its expansion, so it does not matter whether what we insert |
| @@ -1242,26 +1245,25 @@ see `dired-use-ls-dired' for more details.") | |||
| 1242 | (save-excursion | 1245 | (save-excursion |
| 1243 | (goto-char beg) | 1246 | (goto-char beg) |
| 1244 | (while (< (point) end) | 1247 | (while (< (point) end) |
| 1245 | (condition-case nil | 1248 | (ignore-errors |
| 1246 | (if (not (dired-move-to-filename)) | 1249 | (if (not (dired-move-to-filename)) |
| 1247 | (put-text-property (line-beginning-position) | 1250 | (put-text-property (line-beginning-position) |
| 1248 | (1+ (line-end-position)) | 1251 | (1+ (line-end-position)) |
| 1249 | 'invisible 'dired-hide-details-information) | 1252 | 'invisible 'dired-hide-details-information) |
| 1250 | (put-text-property (+ (line-beginning-position) 1) (1- (point)) | 1253 | (put-text-property (+ (line-beginning-position) 1) (1- (point)) |
| 1251 | 'invisible 'dired-hide-details-detail) | 1254 | 'invisible 'dired-hide-details-detail) |
| 1252 | (add-text-properties | 1255 | (add-text-properties |
| 1253 | (point) | 1256 | (point) |
| 1254 | (progn | 1257 | (progn |
| 1255 | (dired-move-to-end-of-filename) | 1258 | (dired-move-to-end-of-filename) |
| 1256 | (point)) | 1259 | (point)) |
| 1257 | '(mouse-face | 1260 | '(mouse-face |
| 1258 | highlight | 1261 | highlight |
| 1259 | dired-filename t | 1262 | dired-filename t |
| 1260 | help-echo "mouse-2: visit this file in other window")) | 1263 | help-echo "mouse-2: visit this file in other window")) |
| 1261 | (when (< (+ (point) 4) (line-end-position)) | 1264 | (when (< (+ (point) 4) (line-end-position)) |
| 1262 | (put-text-property (+ (point) 4) (line-end-position) | 1265 | (put-text-property (+ (point) 4) (line-end-position) |
| 1263 | 'invisible 'dired-hide-details-link))) | 1266 | 'invisible 'dired-hide-details-link)))) |
| 1264 | (error nil)) | ||
| 1265 | (forward-line 1)))) | 1267 | (forward-line 1)))) |
| 1266 | 1268 | ||
| 1267 | ;; Reverting a dired buffer | 1269 | ;; Reverting a dired buffer |
| @@ -1401,11 +1403,9 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." | |||
| 1401 | (setq elt (car old-subdir-alist) | 1403 | (setq elt (car old-subdir-alist) |
| 1402 | old-subdir-alist (cdr old-subdir-alist) | 1404 | old-subdir-alist (cdr old-subdir-alist) |
| 1403 | dir (car elt)) | 1405 | dir (car elt)) |
| 1404 | (condition-case () | 1406 | (ignore-errors |
| 1405 | (progn | 1407 | (dired-uncache dir) |
| 1406 | (dired-uncache dir) | 1408 | (dired-insert-subdir dir)))))) |
| 1407 | (dired-insert-subdir dir)) | ||
| 1408 | (error nil)))))) | ||
| 1409 | 1409 | ||
| 1410 | (defun dired-uncache (dir) | 1410 | (defun dired-uncache (dir) |
| 1411 | "Remove directory DIR from any directory cache." | 1411 | "Remove directory DIR from any directory cache." |
| @@ -3849,22 +3849,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." | |||
| 3849 | 3849 | ||
| 3850 | ;;; Start of automatically extracted autoloads. | 3850 | ;;; Start of automatically extracted autoloads. |
| 3851 | 3851 | ||
| 3852 | ;;;### (autoloads (dired-show-file-type dired-do-query-replace-regexp | 3852 | ;;;### (autoloads nil "dired-aux" "dired-aux.el" "04b4cb6bde3220f55574eb1d99ac0d29") |
| 3853 | ;;;;;; dired-do-search dired-do-isearch-regexp dired-do-isearch | ||
| 3854 | ;;;;;; dired-isearch-filenames-regexp dired-isearch-filenames dired-isearch-filenames-setup | ||
| 3855 | ;;;;;; dired-hide-all dired-hide-subdir dired-tree-down dired-tree-up | ||
| 3856 | ;;;;;; dired-kill-subdir dired-mark-subdir-files dired-goto-subdir | ||
| 3857 | ;;;;;; dired-prev-subdir dired-insert-subdir dired-maybe-insert-subdir | ||
| 3858 | ;;;;;; dired-downcase dired-upcase dired-do-symlink-regexp dired-do-hardlink-regexp | ||
| 3859 | ;;;;;; dired-do-copy-regexp dired-do-rename-regexp dired-do-rename | ||
| 3860 | ;;;;;; dired-do-hardlink dired-do-symlink dired-do-copy dired-create-directory | ||
| 3861 | ;;;;;; dired-rename-file dired-copy-file dired-relist-file dired-remove-file | ||
| 3862 | ;;;;;; dired-add-file dired-do-redisplay dired-do-load dired-do-byte-compile | ||
| 3863 | ;;;;;; dired-do-compress dired-query dired-compress-file dired-do-kill-lines | ||
| 3864 | ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command | ||
| 3865 | ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown | ||
| 3866 | ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff | ||
| 3867 | ;;;;;; dired-diff) "dired-aux" "dired-aux.el" "8f5af3aa4eee1b3448525896fa6f39a3") | ||
| 3868 | ;;; Generated autoloads from dired-aux.el | 3853 | ;;; Generated autoloads from dired-aux.el |
| 3869 | 3854 | ||
| 3870 | (autoload 'dired-diff "dired-aux" "\ | 3855 | (autoload 'dired-diff "dired-aux" "\ |
diff --git a/lisp/disp-table.el b/lisp/disp-table.el index 423648f70b5..7c75b38c9d4 100644 --- a/lisp/disp-table.el +++ b/lisp/disp-table.el | |||
| @@ -119,7 +119,7 @@ Valid symbols are `truncation', `wrap', `escape', `control', | |||
| 119 | (defun describe-current-display-table () | 119 | (defun describe-current-display-table () |
| 120 | "Describe the display table in use in the selected window and buffer." | 120 | "Describe the display table in use in the selected window and buffer." |
| 121 | (interactive) | 121 | (interactive) |
| 122 | (let ((disptab (or (window-display-table (selected-window)) | 122 | (let ((disptab (or (window-display-table) |
| 123 | buffer-display-table | 123 | buffer-display-table |
| 124 | standard-display-table))) | 124 | standard-display-table))) |
| 125 | (if disptab | 125 | (if disptab |
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 10968f7f8dd..589a57b64c2 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el | |||
| @@ -1262,7 +1262,7 @@ ARGS is a list of image descriptors." | |||
| 1262 | (car (image-size image 'pixels))) | 1262 | (car (image-size image 'pixels))) |
| 1263 | img-width) | 1263 | img-width) |
| 1264 | img-width)) | 1264 | img-width)) |
| 1265 | (window-width (window-width (selected-window)))) | 1265 | (window-width (window-width))) |
| 1266 | (setf (doc-view-current-image) image) | 1266 | (setf (doc-view-current-image) image) |
| 1267 | (move-overlay ol (point-min) (point-max)) | 1267 | (move-overlay ol (point-min) (point-max)) |
| 1268 | ;; In case the window is wider than the image, center the image | 1268 | ;; In case the window is wider than the image, center the image |
diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el index 10d8e025067..9ac62b68272 100644 --- a/lisp/ebuff-menu.el +++ b/lisp/ebuff-menu.el | |||
| @@ -227,7 +227,7 @@ Select buffer at point and display buffers marked \">\" in other windows." | |||
| 227 | (defun Electric-buffer-menu-mouse-select (event) | 227 | (defun Electric-buffer-menu-mouse-select (event) |
| 228 | (interactive "e") | 228 | (interactive "e") |
| 229 | (select-window (posn-window (event-end event))) | 229 | (select-window (posn-window (event-end event))) |
| 230 | (set-buffer (window-buffer (selected-window))) | 230 | (set-buffer (window-buffer)) |
| 231 | (goto-char (posn-point (event-end event))) | 231 | (goto-char (posn-point (event-end event))) |
| 232 | (throw 'electric-buffer-menu-select (point))) | 232 | (throw 'electric-buffer-menu-select (point))) |
| 233 | 233 | ||
diff --git a/lisp/ehelp.el b/lisp/ehelp.el index 88fc87b5b7a..b2007909209 100644 --- a/lisp/ehelp.el +++ b/lisp/ehelp.el | |||
| @@ -146,7 +146,7 @@ BUFFER is put back into its original major mode." | |||
| 146 | (unwind-protect | 146 | (unwind-protect |
| 147 | (save-excursion | 147 | (save-excursion |
| 148 | (when one | 148 | (when one |
| 149 | (goto-char (window-start (selected-window)))) | 149 | (goto-char (window-start))) |
| 150 | (let ((pop-up-windows t)) | 150 | (let ((pop-up-windows t)) |
| 151 | (pop-to-buffer buffer)) | 151 | (pop-to-buffer buffer)) |
| 152 | (with-current-buffer buffer | 152 | (with-current-buffer buffer |
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index eb1d63e788b..861054e777f 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el | |||
| @@ -2140,14 +2140,6 @@ See Info node `(elisp)Computed Advice' for detailed documentation." | |||
| 2140 | "Take a macro function DEFINITION and make a lambda out of it." | 2140 | "Take a macro function DEFINITION and make a lambda out of it." |
| 2141 | `(cdr ,definition)) | 2141 | `(cdr ,definition)) |
| 2142 | 2142 | ||
| 2143 | (defmacro ad-subr-p (definition) | ||
| 2144 | ;;"non-nil if DEFINITION is a subr." | ||
| 2145 | (list 'subrp definition)) | ||
| 2146 | |||
| 2147 | (defmacro ad-macro-p (definition) | ||
| 2148 | ;;"non-nil if DEFINITION is a macro." | ||
| 2149 | `(eq (car-safe ,definition) 'macro)) | ||
| 2150 | |||
| 2151 | (defmacro ad-lambda-p (definition) | 2143 | (defmacro ad-lambda-p (definition) |
| 2152 | ;;"non-nil if DEFINITION is a lambda expression." | 2144 | ;;"non-nil if DEFINITION is a lambda expression." |
| 2153 | `(eq (car-safe ,definition) 'lambda)) | 2145 | `(eq (car-safe ,definition) 'lambda)) |
| @@ -2160,12 +2152,12 @@ See Info node `(elisp)Computed Advice' for detailed documentation." | |||
| 2160 | (defmacro ad-compiled-p (definition) | 2152 | (defmacro ad-compiled-p (definition) |
| 2161 | "Return non-nil if DEFINITION is a compiled byte-code object." | 2153 | "Return non-nil if DEFINITION is a compiled byte-code object." |
| 2162 | `(or (byte-code-function-p ,definition) | 2154 | `(or (byte-code-function-p ,definition) |
| 2163 | (and (ad-macro-p ,definition) | 2155 | (and (macrop ,definition) |
| 2164 | (byte-code-function-p (ad-lambdafy ,definition))))) | 2156 | (byte-code-function-p (ad-lambdafy ,definition))))) |
| 2165 | 2157 | ||
| 2166 | (defmacro ad-compiled-code (compiled-definition) | 2158 | (defmacro ad-compiled-code (compiled-definition) |
| 2167 | "Return the byte-code object of a COMPILED-DEFINITION." | 2159 | "Return the byte-code object of a COMPILED-DEFINITION." |
| 2168 | `(if (ad-macro-p ,compiled-definition) | 2160 | `(if (macrop ,compiled-definition) |
| 2169 | (ad-lambdafy ,compiled-definition) | 2161 | (ad-lambdafy ,compiled-definition) |
| 2170 | ,compiled-definition)) | 2162 | ,compiled-definition)) |
| 2171 | 2163 | ||
| @@ -2173,7 +2165,7 @@ See Info node `(elisp)Computed Advice' for detailed documentation." | |||
| 2173 | "Return the lambda expression of a function/macro/advice DEFINITION." | 2165 | "Return the lambda expression of a function/macro/advice DEFINITION." |
| 2174 | (cond ((ad-lambda-p definition) | 2166 | (cond ((ad-lambda-p definition) |
| 2175 | definition) | 2167 | definition) |
| 2176 | ((ad-macro-p definition) | 2168 | ((macrop definition) |
| 2177 | (ad-lambdafy definition)) | 2169 | (ad-lambdafy definition)) |
| 2178 | ((ad-advice-p definition) | 2170 | ((ad-advice-p definition) |
| 2179 | (cdr definition)) | 2171 | (cdr definition)) |
| @@ -2183,7 +2175,7 @@ See Info node `(elisp)Computed Advice' for detailed documentation." | |||
| 2183 | "Return the argument list of DEFINITION." | 2175 | "Return the argument list of DEFINITION." |
| 2184 | (require 'help-fns) | 2176 | (require 'help-fns) |
| 2185 | (help-function-arglist | 2177 | (help-function-arglist |
| 2186 | (if (or (ad-macro-p definition) (ad-advice-p definition)) | 2178 | (if (or (macrop definition) (ad-advice-p definition)) |
| 2187 | (cdr definition) | 2179 | (cdr definition) |
| 2188 | definition) | 2180 | definition) |
| 2189 | 'preserve-names)) | 2181 | 'preserve-names)) |
| @@ -2229,7 +2221,7 @@ definition (see the code for `documentation')." | |||
| 2229 | (defun ad-advised-definition-p (definition) | 2221 | (defun ad-advised-definition-p (definition) |
| 2230 | "Return non-nil if DEFINITION was generated from advice information." | 2222 | "Return non-nil if DEFINITION was generated from advice information." |
| 2231 | (if (or (ad-lambda-p definition) | 2223 | (if (or (ad-lambda-p definition) |
| 2232 | (ad-macro-p definition) | 2224 | (macrop definition) |
| 2233 | (ad-compiled-p definition)) | 2225 | (ad-compiled-p definition)) |
| 2234 | (let ((docstring (ad-docstring definition))) | 2226 | (let ((docstring (ad-docstring definition))) |
| 2235 | (and (stringp docstring) | 2227 | (and (stringp docstring) |
| @@ -2242,8 +2234,8 @@ definition (see the code for `documentation')." | |||
| 2242 | ;; representations, so cache entries preactivated with version | 2234 | ;; representations, so cache entries preactivated with version |
| 2243 | ;; 1 can't be used. | 2235 | ;; 1 can't be used. |
| 2244 | (cond | 2236 | (cond |
| 2245 | ((ad-macro-p definition) 'macro2) | 2237 | ((macrop definition) 'macro2) |
| 2246 | ((ad-subr-p definition) 'subr2) | 2238 | ((subrp definition) 'subr2) |
| 2247 | ((or (ad-lambda-p definition) (ad-compiled-p definition)) 'fun2) | 2239 | ((or (ad-lambda-p definition) (ad-compiled-p definition)) 'fun2) |
| 2248 | ((ad-advice-p definition) 'advice2))) ;; FIXME: Can this ever happen? | 2240 | ((ad-advice-p definition) 'advice2))) ;; FIXME: Can this ever happen? |
| 2249 | 2241 | ||
| @@ -2273,7 +2265,7 @@ For that it has to be fbound with a non-autoload definition." | |||
| 2273 | "True if FUNCTION has an interpreted definition that can be compiled." | 2265 | "True if FUNCTION has an interpreted definition that can be compiled." |
| 2274 | (and (ad-has-proper-definition function) | 2266 | (and (ad-has-proper-definition function) |
| 2275 | (or (ad-lambda-p (symbol-function function)) | 2267 | (or (ad-lambda-p (symbol-function function)) |
| 2276 | (ad-macro-p (symbol-function function))) | 2268 | (macrop (symbol-function function))) |
| 2277 | (not (ad-compiled-p (symbol-function function))))) | 2269 | (not (ad-compiled-p (symbol-function function))))) |
| 2278 | 2270 | ||
| 2279 | (defvar warning-suppress-types) ;From warnings.el. | 2271 | (defvar warning-suppress-types) ;From warnings.el. |
| @@ -2902,7 +2894,7 @@ If COMPILE is nil then the result depends on the value of | |||
| 2902 | ((eq ad-default-compilation-action 'never) nil) | 2894 | ((eq ad-default-compilation-action 'never) nil) |
| 2903 | ((eq ad-default-compilation-action 'always) t) | 2895 | ((eq ad-default-compilation-action 'always) t) |
| 2904 | ((eq ad-default-compilation-action 'like-original) | 2896 | ((eq ad-default-compilation-action 'like-original) |
| 2905 | (or (ad-subr-p (ad-get-orig-definition function)) | 2897 | (or (subrp (ad-get-orig-definition function)) |
| 2906 | (ad-compiled-p (ad-get-orig-definition function)))) | 2898 | (ad-compiled-p (ad-get-orig-definition function)))) |
| 2907 | ;; everything else means `maybe': | 2899 | ;; everything else means `maybe': |
| 2908 | (t (featurep 'byte-compile)))) | 2900 | (t (featurep 'byte-compile)))) |
| @@ -3249,7 +3241,7 @@ usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...) | |||
| 3249 | `((ad-set-cache | 3241 | `((ad-set-cache |
| 3250 | ',function | 3242 | ',function |
| 3251 | ;; the function will get compiled: | 3243 | ;; the function will get compiled: |
| 3252 | ,(cond ((ad-macro-p (car preactivation)) | 3244 | ,(cond ((macrop (car preactivation)) |
| 3253 | `(ad-macrofy | 3245 | `(ad-macrofy |
| 3254 | (function | 3246 | (function |
| 3255 | ,(ad-lambdafy | 3247 | ,(ad-lambdafy |
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 8f0999b2f80..0bb04950dfd 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el | |||
| @@ -83,7 +83,6 @@ The return value of this function is not used." | |||
| 83 | (list 'quote f) (list 'quote new-name) (list 'quote when)))) | 83 | (list 'quote f) (list 'quote new-name) (list 'quote when)))) |
| 84 | (list 'compiler-macro | 84 | (list 'compiler-macro |
| 85 | #'(lambda (f args compiler-function) | 85 | #'(lambda (f args compiler-function) |
| 86 | ;; FIXME: Make it possible to just reuse `args'. | ||
| 87 | `(eval-and-compile | 86 | `(eval-and-compile |
| 88 | (put ',f 'compiler-macro | 87 | (put ',f 'compiler-macro |
| 89 | ,(if (eq (car-safe compiler-function) 'lambda) | 88 | ,(if (eq (car-safe compiler-function) 'lambda) |
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index f4e79dc4886..164cdb12952 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; bytecomp.el --- compilation of Lisp code into byte code -*- lexical-binding: t -*- | 1 | ;;; bytecomp.el --- compilation of Lisp code into byte code -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985-1987, 1992, 1994, 1998, 2000-2013 Free Software | 3 | ;; Copyright (C) 1985-1987, 1992, 1994, 1998, 2000-2013 |
| 4 | ;; Foundation, Inc. | 4 | ;; Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Jamie Zawinski <jwz@lucid.com> | 6 | ;; Author: Jamie Zawinski <jwz@lucid.com> |
| 7 | ;; Hallvard Furuseth <hbf@ulrik.uio.no> | 7 | ;; Hallvard Furuseth <hbf@ulrik.uio.no> |
| @@ -1224,6 +1224,24 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." | |||
| 1224 | (format "%d" (car signature))) | 1224 | (format "%d" (car signature))) |
| 1225 | (t (format "%d-%d" (car signature) (cdr signature))))) | 1225 | (t (format "%d-%d" (car signature) (cdr signature))))) |
| 1226 | 1226 | ||
| 1227 | (defun byte-compile-function-warn (f nargs def) | ||
| 1228 | (when (get f 'byte-obsolete-info) | ||
| 1229 | (byte-compile-warn-obsolete f)) | ||
| 1230 | |||
| 1231 | ;; Check to see if the function will be available at runtime | ||
| 1232 | ;; and/or remember its arity if it's unknown. | ||
| 1233 | (or (and (or def (fboundp f)) ; might be a subr or autoload. | ||
| 1234 | (not (memq f byte-compile-noruntime-functions))) | ||
| 1235 | (eq f byte-compile-current-form) ; ## This doesn't work | ||
| 1236 | ; with recursion. | ||
| 1237 | ;; It's a currently-undefined function. | ||
| 1238 | ;; Remember number of args in call. | ||
| 1239 | (let ((cons (assq f byte-compile-unresolved-functions))) | ||
| 1240 | (if cons | ||
| 1241 | (or (memq nargs (cdr cons)) | ||
| 1242 | (push nargs (cdr cons))) | ||
| 1243 | (push (list f nargs) | ||
| 1244 | byte-compile-unresolved-functions))))) | ||
| 1227 | 1245 | ||
| 1228 | ;; Warn if the form is calling a function with the wrong number of arguments. | 1246 | ;; Warn if the form is calling a function with the wrong number of arguments. |
| 1229 | (defun byte-compile-callargs-warn (form) | 1247 | (defun byte-compile-callargs-warn (form) |
| @@ -1261,21 +1279,7 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." | |||
| 1261 | "accepts only") | 1279 | "accepts only") |
| 1262 | (byte-compile-arglist-signature-string sig)))) | 1280 | (byte-compile-arglist-signature-string sig)))) |
| 1263 | (byte-compile-format-warn form) | 1281 | (byte-compile-format-warn form) |
| 1264 | ;; Check to see if the function will be available at runtime | 1282 | (byte-compile-function-warn (car form) (length (cdr form)) def))) |
| 1265 | ;; and/or remember its arity if it's unknown. | ||
| 1266 | (or (and (or def (fboundp (car form))) ; might be a subr or autoload. | ||
| 1267 | (not (memq (car form) byte-compile-noruntime-functions))) | ||
| 1268 | (eq (car form) byte-compile-current-form) ; ## This doesn't work | ||
| 1269 | ; with recursion. | ||
| 1270 | ;; It's a currently-undefined function. | ||
| 1271 | ;; Remember number of args in call. | ||
| 1272 | (let ((cons (assq (car form) byte-compile-unresolved-functions)) | ||
| 1273 | (n (length (cdr form)))) | ||
| 1274 | (if cons | ||
| 1275 | (or (memq n (cdr cons)) | ||
| 1276 | (setcdr cons (cons n (cdr cons)))) | ||
| 1277 | (push (list (car form) n) | ||
| 1278 | byte-compile-unresolved-functions)))))) | ||
| 1279 | 1283 | ||
| 1280 | (defun byte-compile-format-warn (form) | 1284 | (defun byte-compile-format-warn (form) |
| 1281 | "Warn if FORM is `format'-like with inconsistent args. | 1285 | "Warn if FORM is `format'-like with inconsistent args. |
| @@ -1364,7 +1368,10 @@ extra args." | |||
| 1364 | ;; This is the first definition. See if previous calls are compatible. | 1368 | ;; This is the first definition. See if previous calls are compatible. |
| 1365 | (let ((calls (assq name byte-compile-unresolved-functions)) | 1369 | (let ((calls (assq name byte-compile-unresolved-functions)) |
| 1366 | nums sig min max) | 1370 | nums sig min max) |
| 1367 | (when calls | 1371 | (setq byte-compile-unresolved-functions |
| 1372 | (delq calls byte-compile-unresolved-functions)) | ||
| 1373 | (setq calls (delq t calls)) ;Ignore higher-order uses of the function. | ||
| 1374 | (when (cdr calls) | ||
| 1368 | (when (and (symbolp name) | 1375 | (when (and (symbolp name) |
| 1369 | (eq (function-get name 'byte-optimizer) | 1376 | (eq (function-get name 'byte-optimizer) |
| 1370 | 'byte-compile-inline-expand)) | 1377 | 'byte-compile-inline-expand)) |
| @@ -1382,10 +1389,7 @@ extra args." | |||
| 1382 | name | 1389 | name |
| 1383 | (byte-compile-arglist-signature-string sig) | 1390 | (byte-compile-arglist-signature-string sig) |
| 1384 | (if (equal sig '(1 . 1)) " arg" " args") | 1391 | (if (equal sig '(1 . 1)) " arg" " args") |
| 1385 | (byte-compile-arglist-signature-string (cons min max)))) | 1392 | (byte-compile-arglist-signature-string (cons min max))))))))) |
| 1386 | |||
| 1387 | (setq byte-compile-unresolved-functions | ||
| 1388 | (delq calls byte-compile-unresolved-functions))))))) | ||
| 1389 | 1393 | ||
| 1390 | (defvar byte-compile-cl-functions nil | 1394 | (defvar byte-compile-cl-functions nil |
| 1391 | "List of functions defined in CL.") | 1395 | "List of functions defined in CL.") |
| @@ -1589,14 +1593,14 @@ that already has a `.elc' file." | |||
| 1589 | (message "Checking %s..." directory) | 1593 | (message "Checking %s..." directory) |
| 1590 | (dolist (file (directory-files directory)) | 1594 | (dolist (file (directory-files directory)) |
| 1591 | (let ((source (expand-file-name file directory))) | 1595 | (let ((source (expand-file-name file directory))) |
| 1592 | (if (and (not (member file '("RCS" "CVS"))) | 1596 | (if (file-directory-p source) |
| 1593 | (not (eq ?\. (aref file 0))) | 1597 | (and (not (member file '("RCS" "CVS"))) |
| 1594 | (file-directory-p source) | 1598 | (not (eq ?\. (aref file 0))) |
| 1595 | (not (file-symlink-p source))) | 1599 | (not (file-symlink-p source)) |
| 1596 | ;; This file is a subdirectory. Handle them differently. | 1600 | ;; This file is a subdirectory. Handle them differently. |
| 1597 | (when (or (null arg) (eq 0 arg) | 1601 | (or (null arg) (eq 0 arg) |
| 1598 | (y-or-n-p (concat "Check " source "? "))) | 1602 | (y-or-n-p (concat "Check " source "? "))) |
| 1599 | (setq directories (nconc directories (list source)))) | 1603 | (setq directories (nconc directories (list source)))) |
| 1600 | ;; It is an ordinary file. Decide whether to compile it. | 1604 | ;; It is an ordinary file. Decide whether to compile it. |
| 1601 | (if (and (string-match emacs-lisp-file-regexp source) | 1605 | (if (and (string-match emacs-lisp-file-regexp source) |
| 1602 | ;; The next 2 tests avoid compiling lock files | 1606 | ;; The next 2 tests avoid compiling lock files |
| @@ -2214,37 +2218,33 @@ list that represents a doc string reference. | |||
| 2214 | (defun byte-compile-file-form-autoload (form) | 2218 | (defun byte-compile-file-form-autoload (form) |
| 2215 | (and (let ((form form)) | 2219 | (and (let ((form form)) |
| 2216 | (while (if (setq form (cdr form)) (macroexp-const-p (car form)))) | 2220 | (while (if (setq form (cdr form)) (macroexp-const-p (car form)))) |
| 2217 | (null form)) ;Constants only | 2221 | (null form)) ;Constants only |
| 2218 | (memq (eval (nth 5 form)) '(t macro)) ;Macro | 2222 | (memq (eval (nth 5 form)) '(t macro)) ;Macro |
| 2219 | (eval form)) ;Define the autoload. | 2223 | (eval form)) ;Define the autoload. |
| 2220 | ;; Avoid undefined function warnings for the autoload. | 2224 | ;; Avoid undefined function warnings for the autoload. |
| 2221 | (when (and (consp (nth 1 form)) | 2225 | (pcase (nth 1 form) |
| 2222 | (eq (car (nth 1 form)) 'quote) | 2226 | (`',(and (pred symbolp) funsym) |
| 2223 | (consp (cdr (nth 1 form))) | 2227 | ;; Don't add it if it's already defined. Otherwise, it might |
| 2224 | (symbolp (nth 1 (nth 1 form)))) | 2228 | ;; hide the actual definition. However, do remove any entry from |
| 2225 | ;; Don't add it if it's already defined. Otherwise, it might | 2229 | ;; byte-compile-noruntime-functions, in case we have an autoload |
| 2226 | ;; hide the actual definition. However, do remove any entry from | 2230 | ;; of foo-func following an (eval-when-compile (require 'foo)). |
| 2227 | ;; byte-compile-noruntime-functions, in case we have an autoload | 2231 | (unless (fboundp funsym) |
| 2228 | ;; of foo-func following an (eval-when-compile (require 'foo)). | 2232 | (push (cons funsym (cons 'autoload (cdr (cdr form)))) |
| 2229 | (unless (fboundp (nth 1 (nth 1 form))) | 2233 | byte-compile-function-environment)) |
| 2230 | (push (cons (nth 1 (nth 1 form)) | 2234 | ;; If an autoload occurs _before_ the first call to a function, |
| 2231 | (cons 'autoload (cdr (cdr form)))) | 2235 | ;; byte-compile-callargs-warn does not add an entry to |
| 2232 | byte-compile-function-environment)) | 2236 | ;; byte-compile-unresolved-functions. Here we mimic the logic |
| 2233 | ;; If an autoload occurs _before_ the first call to a function, | 2237 | ;; of byte-compile-callargs-warn so as not to warn if the |
| 2234 | ;; byte-compile-callargs-warn does not add an entry to | 2238 | ;; autoload comes _after_ the function call. |
| 2235 | ;; byte-compile-unresolved-functions. Here we mimic the logic | 2239 | ;; Alternatively, similar logic could go in |
| 2236 | ;; of byte-compile-callargs-warn so as not to warn if the | 2240 | ;; byte-compile-warn-about-unresolved-functions. |
| 2237 | ;; autoload comes _after_ the function call. | 2241 | (if (memq funsym byte-compile-noruntime-functions) |
| 2238 | ;; Alternatively, similar logic could go in | 2242 | (setq byte-compile-noruntime-functions |
| 2239 | ;; byte-compile-warn-about-unresolved-functions. | 2243 | (delq funsym byte-compile-noruntime-functions) |
| 2240 | (if (memq (nth 1 (nth 1 form)) byte-compile-noruntime-functions) | 2244 | byte-compile-noruntime-functions) |
| 2241 | (setq byte-compile-noruntime-functions | 2245 | (setq byte-compile-unresolved-functions |
| 2242 | (delq (nth 1 (nth 1 form)) byte-compile-noruntime-functions) | 2246 | (delq (assq funsym byte-compile-unresolved-functions) |
| 2243 | byte-compile-noruntime-functions) | 2247 | byte-compile-unresolved-functions))))) |
| 2244 | (setq byte-compile-unresolved-functions | ||
| 2245 | (delq (assq (nth 1 (nth 1 form)) | ||
| 2246 | byte-compile-unresolved-functions) | ||
| 2247 | byte-compile-unresolved-functions)))) | ||
| 2248 | (if (stringp (nth 3 form)) | 2248 | (if (stringp (nth 3 form)) |
| 2249 | form | 2249 | form |
| 2250 | ;; No doc string, so we can compile this as a normal form. | 2250 | ;; No doc string, so we can compile this as a normal form. |
| @@ -2964,8 +2964,6 @@ That command is designed for interactive use only" fn)) | |||
| 2964 | '(custom-declare-group custom-declare-variable | 2964 | '(custom-declare-group custom-declare-variable |
| 2965 | custom-declare-face)) | 2965 | custom-declare-face)) |
| 2966 | (byte-compile-nogroup-warn form)) | 2966 | (byte-compile-nogroup-warn form)) |
| 2967 | (when (get (car form) 'byte-obsolete-info) | ||
| 2968 | (byte-compile-warn-obsolete (car form))) | ||
| 2969 | (byte-compile-callargs-warn form)) | 2967 | (byte-compile-callargs-warn form)) |
| 2970 | (if byte-compile-generate-call-tree | 2968 | (if byte-compile-generate-call-tree |
| 2971 | (byte-compile-annotate-call-tree form)) | 2969 | (byte-compile-annotate-call-tree form)) |
| @@ -3574,10 +3572,15 @@ discarding." | |||
| 3574 | ;; and (funcall (function foo)) will lose with autoloads. | 3572 | ;; and (funcall (function foo)) will lose with autoloads. |
| 3575 | 3573 | ||
| 3576 | (defun byte-compile-function-form (form) | 3574 | (defun byte-compile-function-form (form) |
| 3577 | (byte-compile-constant (if (eq 'lambda (car-safe (nth 1 form))) | 3575 | (let ((f (nth 1 form))) |
| 3578 | (byte-compile-lambda (nth 1 form)) | 3576 | (when (and (symbolp f) |
| 3579 | (nth 1 form)))) | 3577 | (byte-compile-warning-enabled-p 'callargs)) |
| 3580 | 3578 | (byte-compile-function-warn f t (byte-compile-fdefinition f nil))) | |
| 3579 | |||
| 3580 | (byte-compile-constant (if (eq 'lambda (car-safe f)) | ||
| 3581 | (byte-compile-lambda f) | ||
| 3582 | f)))) | ||
| 3583 | |||
| 3581 | (defun byte-compile-indent-to (form) | 3584 | (defun byte-compile-indent-to (form) |
| 3582 | (let ((len (length form))) | 3585 | (let ((len (length form))) |
| 3583 | (cond ((= len 2) | 3586 | (cond ((= len 2) |
| @@ -4271,7 +4274,7 @@ binding slots have been popped." | |||
| 4271 | (if (and (eq (car-safe (car-safe (cdr-safe form))) 'quote) | 4274 | (if (and (eq (car-safe (car-safe (cdr-safe form))) 'quote) |
| 4272 | (byte-compile-warning-enabled-p 'make-local)) | 4275 | (byte-compile-warning-enabled-p 'make-local)) |
| 4273 | (byte-compile-warn | 4276 | (byte-compile-warn |
| 4274 | "`make-variable-buffer-local' should be called at toplevel")) | 4277 | "`make-variable-buffer-local' not called at toplevel")) |
| 4275 | (byte-compile-normal-call form)) | 4278 | (byte-compile-normal-call form)) |
| 4276 | (put 'make-variable-buffer-local | 4279 | (put 'make-variable-buffer-local |
| 4277 | 'byte-hunk-handler 'byte-compile-form-make-variable-buffer-local) | 4280 | 'byte-hunk-handler 'byte-compile-form-make-variable-buffer-local) |
diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el index 70fa71a0da4..f688bff6f85 100644 --- a/lisp/emacs-lisp/cconv.el +++ b/lisp/emacs-lisp/cconv.el | |||
| @@ -552,7 +552,8 @@ FORM is the parent form that binds this var." | |||
| 552 | (cond | 552 | (cond |
| 553 | ((byte-compile-not-lexical-var-p arg) | 553 | ((byte-compile-not-lexical-var-p arg) |
| 554 | (byte-compile-log-warning | 554 | (byte-compile-log-warning |
| 555 | (format "Argument %S is not a lexical variable" arg))) | 555 | (format "Lexical argument shadows the dynamic variable %S" |
| 556 | arg))) | ||
| 556 | ((eq ?& (aref (symbol-name arg) 0)) nil) ;Ignore &rest, &optional, ... | 557 | ((eq ?& (aref (symbol-name arg) 0)) nil) ;Ignore &rest, &optional, ... |
| 557 | (t (let ((varstruct (list arg nil nil nil nil))) | 558 | (t (let ((varstruct (list arg nil nil nil nil))) |
| 558 | (cl-pushnew arg byte-compile-lexical-variables) | 559 | (cl-pushnew arg byte-compile-lexical-variables) |
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 6540a8e9f14..9c5b408637f 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el | |||
| @@ -186,7 +186,6 @@ | |||
| 186 | (defcustom checkdoc-minor-mode-string " CDoc" | 186 | (defcustom checkdoc-minor-mode-string " CDoc" |
| 187 | "String to display in mode line when Checkdoc mode is enabled; nil for none." | 187 | "String to display in mode line when Checkdoc mode is enabled; nil for none." |
| 188 | :type '(choice string (const :tag "None" nil)) | 188 | :type '(choice string (const :tag "None" nil)) |
| 189 | :group 'checkdoc | ||
| 190 | :version "23.1") | 189 | :version "23.1") |
| 191 | 190 | ||
| 192 | (defcustom checkdoc-autofix-flag 'semiautomatic | 191 | (defcustom checkdoc-autofix-flag 'semiautomatic |
| @@ -197,7 +196,6 @@ made without asking unless the change is very-complex. If the value | |||
| 197 | is `semiautomatic' or any other value, then simple fixes are made | 196 | is `semiautomatic' or any other value, then simple fixes are made |
| 198 | without asking, and complex changes are made by asking the user first. | 197 | without asking, and complex changes are made by asking the user first. |
| 199 | The value `never' is the same as nil, never ask or change anything." | 198 | The value `never' is the same as nil, never ask or change anything." |
| 200 | :group 'checkdoc | ||
| 201 | :type '(choice (const automatic) | 199 | :type '(choice (const automatic) |
| 202 | (const query) | 200 | (const query) |
| 203 | (const never) | 201 | (const never) |
| @@ -207,7 +205,6 @@ The value `never' is the same as nil, never ask or change anything." | |||
| 207 | "Non-nil means to \"bounce\" to auto-fix locations. | 205 | "Non-nil means to \"bounce\" to auto-fix locations. |
| 208 | Setting this to nil will silently make fixes that require no user | 206 | Setting this to nil will silently make fixes that require no user |
| 209 | interaction. See `checkdoc-autofix-flag' for auto-fixing details." | 207 | interaction. See `checkdoc-autofix-flag' for auto-fixing details." |
| 210 | :group 'checkdoc | ||
| 211 | :type 'boolean) | 208 | :type 'boolean) |
| 212 | 209 | ||
| 213 | (defcustom checkdoc-force-docstrings-flag t | 210 | (defcustom checkdoc-force-docstrings-flag t |
| @@ -215,16 +212,14 @@ interaction. See `checkdoc-autofix-flag' for auto-fixing details." | |||
| 215 | Style guide dictates that interactive functions MUST have documentation, | 212 | Style guide dictates that interactive functions MUST have documentation, |
| 216 | and that it's good but not required practice to make non user visible items | 213 | and that it's good but not required practice to make non user visible items |
| 217 | have doc strings." | 214 | have doc strings." |
| 218 | :group 'checkdoc | ||
| 219 | :type 'boolean) | 215 | :type 'boolean) |
| 220 | ;;;###autoload(put 'checkdoc-force-docstrings-flag 'safe-local-variable 'booleanp) | 216 | ;;;###autoload(put 'checkdoc-force-docstrings-flag 'safe-local-variable #'booleanp) |
| 221 | 217 | ||
| 222 | (defcustom checkdoc-force-history-flag nil | 218 | (defcustom checkdoc-force-history-flag nil |
| 223 | "Non-nil means that files should have a History section or ChangeLog file. | 219 | "Non-nil means that files should have a History section or ChangeLog file. |
| 224 | This helps document the evolution of, and recent changes to, the package." | 220 | This helps document the evolution of, and recent changes to, the package." |
| 225 | :group 'checkdoc | ||
| 226 | :type 'boolean) | 221 | :type 'boolean) |
| 227 | ;;;###autoload(put 'checkdoc-force-history-flag 'safe-local-variable 'booleanp) | 222 | ;;;###autoload(put 'checkdoc-force-history-flag 'safe-local-variable #'booleanp) |
| 228 | 223 | ||
| 229 | (defcustom checkdoc-permit-comma-termination-flag nil | 224 | (defcustom checkdoc-permit-comma-termination-flag nil |
| 230 | "Non-nil means the first line of a docstring may end with a comma. | 225 | "Non-nil means the first line of a docstring may end with a comma. |
| @@ -232,9 +227,8 @@ Ordinarily, a full sentence is required. This may be misleading when | |||
| 232 | there is a substantial caveat to the one-line description -- the comma | 227 | there is a substantial caveat to the one-line description -- the comma |
| 233 | should be used when the first part could stand alone as a sentence, but | 228 | should be used when the first part could stand alone as a sentence, but |
| 234 | it indicates that a modifying clause follows." | 229 | it indicates that a modifying clause follows." |
| 235 | :group 'checkdoc | ||
| 236 | :type 'boolean) | 230 | :type 'boolean) |
| 237 | ;;;###autoload(put 'checkdoc-permit-comma-termination-flag 'safe-local-variable 'booleanp) | 231 | ;;;###autoload(put 'checkdoc-permit-comma-termination-flag 'safe-local-variable #'booleanp) |
| 238 | 232 | ||
| 239 | (defcustom checkdoc-spellcheck-documentation-flag nil | 233 | (defcustom checkdoc-spellcheck-documentation-flag nil |
| 240 | "Non-nil means run Ispell on text based on value. | 234 | "Non-nil means run Ispell on text based on value. |
| @@ -246,22 +240,22 @@ system. Possible values are: | |||
| 246 | buffer - Spell-check when style checking the whole buffer | 240 | buffer - Spell-check when style checking the whole buffer |
| 247 | interactive - Spell-check during any interactive check. | 241 | interactive - Spell-check during any interactive check. |
| 248 | t - Always spell-check" | 242 | t - Always spell-check" |
| 249 | :group 'checkdoc | ||
| 250 | :type '(choice (const nil) | 243 | :type '(choice (const nil) |
| 251 | (const defun) | 244 | (const defun) |
| 252 | (const buffer) | 245 | (const buffer) |
| 253 | (const interactive) | 246 | (const interactive) |
| 254 | (const t))) | 247 | (const t))) |
| 248 | ;;;###autoload(put 'checkdoc-spellcheck-documentation-flag 'safe-local-variable #'booleanp) | ||
| 255 | 249 | ||
| 256 | (defvar checkdoc-ispell-lisp-words | 250 | (defvar checkdoc-ispell-lisp-words |
| 257 | '("alist" "emacs" "etags" "keymap" "paren" "regexp" "sexp" "xemacs") | 251 | '("alist" "emacs" "etags" "keymap" "paren" "regexp" "sexp" "xemacs") |
| 258 | "List of words that are correct when spell-checking Lisp documentation.") | 252 | "List of words that are correct when spell-checking Lisp documentation.") |
| 253 | ;;;###autoload(put 'checkdoc-ispell-list-words 'safe-local-variable #'checkdoc-list-of-strings-p) | ||
| 259 | 254 | ||
| 260 | (defcustom checkdoc-max-keyref-before-warn 10 | 255 | (defcustom checkdoc-max-keyref-before-warn 10 |
| 261 | "The number of \\ [command-to-keystroke] tokens allowed in a doc string. | 256 | "The number of \\ [command-to-keystroke] tokens allowed in a doc string. |
| 262 | Any more than this and a warning is generated suggesting that the construct | 257 | Any more than this and a warning is generated suggesting that the construct |
| 263 | \\ {keymap} be used instead." | 258 | \\ {keymap} be used instead." |
| 264 | :group 'checkdoc | ||
| 265 | :type 'integer) | 259 | :type 'integer) |
| 266 | 260 | ||
| 267 | (defcustom checkdoc-arguments-in-order-flag t | 261 | (defcustom checkdoc-arguments-in-order-flag t |
| @@ -270,9 +264,8 @@ Setting this to nil will mean only checking that all the arguments | |||
| 270 | appear in the proper form in the documentation, not that they are in | 264 | appear in the proper form in the documentation, not that they are in |
| 271 | the same order as they appear in the argument list. No mention is | 265 | the same order as they appear in the argument list. No mention is |
| 272 | made in the style guide relating to order." | 266 | made in the style guide relating to order." |
| 273 | :group 'checkdoc | ||
| 274 | :type 'boolean) | 267 | :type 'boolean) |
| 275 | ;;;###autoload(put 'checkdoc-arguments-in-order-flag 'safe-local-variable 'booleanp) | 268 | ;;;###autoload(put 'checkdoc-arguments-in-order-flag 'safe-local-variable #'booleanp) |
| 276 | 269 | ||
| 277 | (define-obsolete-variable-alias 'checkdoc-style-hooks | 270 | (define-obsolete-variable-alias 'checkdoc-style-hooks |
| 278 | 'checkdoc-style-functions "24.3") | 271 | 'checkdoc-style-functions "24.3") |
| @@ -305,8 +298,8 @@ A search leaves the cursor in front of the parameter list.") | |||
| 305 | "Non-nil means to attempt to check the voice of the doc string. | 298 | "Non-nil means to attempt to check the voice of the doc string. |
| 306 | This check keys off some words which are commonly misused. See the | 299 | This check keys off some words which are commonly misused. See the |
| 307 | variable `checkdoc-common-verbs-wrong-voice' if you wish to add your own." | 300 | variable `checkdoc-common-verbs-wrong-voice' if you wish to add your own." |
| 308 | :group 'checkdoc | ||
| 309 | :type 'boolean) | 301 | :type 'boolean) |
| 302 | ;;;###autoload(put 'checkdoc-verb-check-experimental-flag 'safe-local-variable #'booleanp) | ||
| 310 | 303 | ||
| 311 | (defvar checkdoc-generate-compile-warnings-flag nil | 304 | (defvar checkdoc-generate-compile-warnings-flag nil |
| 312 | "Non-nil means generate warnings in a buffer for browsing. | 305 | "Non-nil means generate warnings in a buffer for browsing. |
| @@ -317,16 +310,15 @@ with a universal argument.") | |||
| 317 | "A list of symbol names (strings) which also happen to make good words. | 310 | "A list of symbol names (strings) which also happen to make good words. |
| 318 | These words are ignored when unquoted symbols are searched for. | 311 | These words are ignored when unquoted symbols are searched for. |
| 319 | This should be set in an Emacs Lisp file's local variables." | 312 | This should be set in an Emacs Lisp file's local variables." |
| 320 | :group 'checkdoc | ||
| 321 | :type '(repeat (symbol :tag "Word"))) | 313 | :type '(repeat (symbol :tag "Word"))) |
| 322 | ;;;###autoload(put 'checkdoc-symbol-words 'safe-local-variable 'checkdoc-list-of-strings-p) | 314 | ;;;###autoload(put 'checkdoc-symbol-words 'safe-local-variable #'checkdoc-list-of-strings-p) |
| 323 | 315 | ||
| 324 | ;;;###autoload | 316 | ;;;###autoload |
| 325 | (defun checkdoc-list-of-strings-p (obj) | 317 | (defun checkdoc-list-of-strings-p (obj) |
| 326 | ;; this is a function so it might be shared by checkdoc-proper-noun-list | 318 | ;; this is a function so it might be shared by checkdoc-proper-noun-list |
| 327 | ;; and/or checkdoc-ispell-lisp-words in the future | 319 | ;; and/or checkdoc-ispell-lisp-words in the future |
| 328 | (and (listp obj) | 320 | (and (listp obj) |
| 329 | (not (memq nil (mapcar 'stringp obj))))) | 321 | (not (memq nil (mapcar #'stringp obj))))) |
| 330 | 322 | ||
| 331 | (defvar checkdoc-proper-noun-list | 323 | (defvar checkdoc-proper-noun-list |
| 332 | '("ispell" "xemacs" "emacs" "lisp") | 324 | '("ispell" "xemacs" "emacs" "lisp") |
| @@ -340,9 +332,11 @@ This should be set in an Emacs Lisp file's local variables." | |||
| 340 | (regexp-opt checkdoc-proper-noun-list t) | 332 | (regexp-opt checkdoc-proper-noun-list t) |
| 341 | "\\(\\_>\\|[.!?][ \t\n\"]\\)") | 333 | "\\(\\_>\\|[.!?][ \t\n\"]\\)") |
| 342 | "Regular expression derived from `checkdoc-proper-noun-regexp'.") | 334 | "Regular expression derived from `checkdoc-proper-noun-regexp'.") |
| 335 | ;;;###autoload(put 'checkdoc-proper-noun-regexp 'safe-local-variable 'stringp) | ||
| 343 | 336 | ||
| 344 | (defvar checkdoc-common-verbs-regexp nil | 337 | (defvar checkdoc-common-verbs-regexp nil |
| 345 | "Regular expression derived from `checkdoc-common-verbs-regexp'.") | 338 | "Regular expression derived from `checkdoc-common-verbs-regexp'.") |
| 339 | ;;;###autoload(put 'checkdoc-common-verbs-regexp 'safe-local-variable 'stringp) | ||
| 346 | 340 | ||
| 347 | (defvar checkdoc-common-verbs-wrong-voice | 341 | (defvar checkdoc-common-verbs-wrong-voice |
| 348 | '(("adds" . "add") | 342 | '(("adds" . "add") |
| @@ -443,19 +437,19 @@ be re-created.") | |||
| 443 | ;;; Compatibility | 437 | ;;; Compatibility |
| 444 | ;; | 438 | ;; |
| 445 | (defalias 'checkdoc-make-overlay | 439 | (defalias 'checkdoc-make-overlay |
| 446 | (if (featurep 'xemacs) 'make-extent 'make-overlay)) | 440 | (if (featurep 'xemacs) #'make-extent #'make-overlay)) |
| 447 | (defalias 'checkdoc-overlay-put | 441 | (defalias 'checkdoc-overlay-put |
| 448 | (if (featurep 'xemacs) 'set-extent-property 'overlay-put)) | 442 | (if (featurep 'xemacs) #'set-extent-property #'overlay-put)) |
| 449 | (defalias 'checkdoc-delete-overlay | 443 | (defalias 'checkdoc-delete-overlay |
| 450 | (if (featurep 'xemacs) 'delete-extent 'delete-overlay)) | 444 | (if (featurep 'xemacs) #'delete-extent #'delete-overlay)) |
| 451 | (defalias 'checkdoc-overlay-start | 445 | (defalias 'checkdoc-overlay-start |
| 452 | (if (featurep 'xemacs) 'extent-start 'overlay-start)) | 446 | (if (featurep 'xemacs) #'extent-start #'overlay-start)) |
| 453 | (defalias 'checkdoc-overlay-end | 447 | (defalias 'checkdoc-overlay-end |
| 454 | (if (featurep 'xemacs) 'extent-end 'overlay-end)) | 448 | (if (featurep 'xemacs) #'extent-end #'overlay-end)) |
| 455 | (defalias 'checkdoc-mode-line-update | 449 | (defalias 'checkdoc-mode-line-update |
| 456 | (if (featurep 'xemacs) 'redraw-modeline 'force-mode-line-update)) | 450 | (if (featurep 'xemacs) #'redraw-modeline #'force-mode-line-update)) |
| 457 | (defalias 'checkdoc-char= | 451 | (defalias 'checkdoc-char= |
| 458 | (if (featurep 'xemacs) 'char= '=)) | 452 | (if (featurep 'xemacs) #'char= #'=)) |
| 459 | 453 | ||
| 460 | ;;; User level commands | 454 | ;;; User level commands |
| 461 | ;; | 455 | ;; |
| @@ -540,7 +534,7 @@ checkdoc status window instead of the usual behavior." | |||
| 540 | ;; Due to a design flaw, this will never spell check | 534 | ;; Due to a design flaw, this will never spell check |
| 541 | ;; docstrings. | 535 | ;; docstrings. |
| 542 | (checkdoc-interactive-loop start-here showstatus | 536 | (checkdoc-interactive-loop start-here showstatus |
| 543 | 'checkdoc-next-error) | 537 | #'checkdoc-next-error) |
| 544 | ;; This is a workaround to perform spell checking. | 538 | ;; This is a workaround to perform spell checking. |
| 545 | (checkdoc-interactive-ispell-loop start-here)))) | 539 | (checkdoc-interactive-ispell-loop start-here)))) |
| 546 | 540 | ||
| @@ -560,7 +554,7 @@ checkdoc status window instead of the usual behavior." | |||
| 560 | (prog1 | 554 | (prog1 |
| 561 | ;; Due to a design flaw, this will never spell check messages. | 555 | ;; Due to a design flaw, this will never spell check messages. |
| 562 | (checkdoc-interactive-loop start-here showstatus | 556 | (checkdoc-interactive-loop start-here showstatus |
| 563 | 'checkdoc-next-message-error) | 557 | #'checkdoc-next-message-error) |
| 564 | ;; This is a workaround to perform spell checking. | 558 | ;; This is a workaround to perform spell checking. |
| 565 | (checkdoc-message-interactive-ispell-loop start-here)))) | 559 | (checkdoc-message-interactive-ispell-loop start-here)))) |
| 566 | 560 | ||
| @@ -639,7 +633,7 @@ style." | |||
| 639 | (goto-char (cdr (car err-list))) | 633 | (goto-char (cdr (car err-list))) |
| 640 | ;; `automatic-then-never' tells the autofix function | 634 | ;; `automatic-then-never' tells the autofix function |
| 641 | ;; to only allow one fix to be automatic. The autofix | 635 | ;; to only allow one fix to be automatic. The autofix |
| 642 | ;; function will then set the flag to 'never, allowing | 636 | ;; function will then set the flag to `never', allowing |
| 643 | ;; the checker to return a different error. | 637 | ;; the checker to return a different error. |
| 644 | (let ((checkdoc-autofix-flag 'automatic-then-never) | 638 | (let ((checkdoc-autofix-flag 'automatic-then-never) |
| 645 | (fixed nil)) | 639 | (fixed nil)) |
| @@ -1004,7 +998,7 @@ Evaluation is done first so the form will be read before the | |||
| 1004 | documentation is checked. If there is a documentation error, then the display | 998 | documentation is checked. If there is a documentation error, then the display |
| 1005 | of what was evaluated will be overwritten by the diagnostic message." | 999 | of what was evaluated will be overwritten by the diagnostic message." |
| 1006 | (interactive) | 1000 | (interactive) |
| 1007 | (call-interactively 'eval-defun) | 1001 | (call-interactively #'eval-defun) |
| 1008 | (checkdoc-defun)) | 1002 | (checkdoc-defun)) |
| 1009 | 1003 | ||
| 1010 | ;;;###autoload | 1004 | ;;;###autoload |
| @@ -1046,85 +1040,86 @@ space at the end of each line." | |||
| 1046 | ;; | 1040 | ;; |
| 1047 | 1041 | ||
| 1048 | ;;;###autoload | 1042 | ;;;###autoload |
| 1049 | (defun checkdoc-ispell (&optional take-notes) | 1043 | (defun checkdoc-ispell () |
| 1050 | "Check the style and spelling of everything interactively. | 1044 | "Check the style and spelling of everything interactively. |
| 1051 | Calls `checkdoc' with spell-checking turned on. | 1045 | Calls `checkdoc' with spell-checking turned on. |
| 1052 | Prefix argument TAKE-NOTES is the same as for `checkdoc'" | 1046 | Prefix argument is the same as for `checkdoc'" |
| 1053 | (interactive) | 1047 | (interactive) |
| 1054 | (let ((checkdoc-spellcheck-documentation-flag t)) | 1048 | (let ((checkdoc-spellcheck-documentation-flag t)) |
| 1055 | (call-interactively 'checkdoc nil current-prefix-arg))) | 1049 | (call-interactively #'checkdoc nil current-prefix-arg))) |
| 1056 | 1050 | ||
| 1057 | ;;;###autoload | 1051 | ;;;###autoload |
| 1058 | (defun checkdoc-ispell-current-buffer (&optional take-notes) | 1052 | (defun checkdoc-ispell-current-buffer () |
| 1059 | "Check the style and spelling of the current buffer. | 1053 | "Check the style and spelling of the current buffer. |
| 1060 | Calls `checkdoc-current-buffer' with spell-checking turned on. | 1054 | Calls `checkdoc-current-buffer' with spell-checking turned on. |
| 1061 | Prefix argument TAKE-NOTES is the same as for `checkdoc-current-buffer'" | 1055 | Prefix argument is the same as for `checkdoc-current-buffer'" |
| 1062 | (interactive) | 1056 | (interactive) |
| 1063 | (let ((checkdoc-spellcheck-documentation-flag t)) | 1057 | (let ((checkdoc-spellcheck-documentation-flag t)) |
| 1064 | (call-interactively 'checkdoc-current-buffer nil current-prefix-arg))) | 1058 | (call-interactively #'checkdoc-current-buffer nil current-prefix-arg))) |
| 1065 | 1059 | ||
| 1066 | ;;;###autoload | 1060 | ;;;###autoload |
| 1067 | (defun checkdoc-ispell-interactive (&optional take-notes) | 1061 | (defun checkdoc-ispell-interactive () |
| 1068 | "Check the style and spelling of the current buffer interactively. | 1062 | "Check the style and spelling of the current buffer interactively. |
| 1069 | Calls `checkdoc-interactive' with spell-checking turned on. | 1063 | Calls `checkdoc-interactive' with spell-checking turned on. |
| 1070 | Prefix argument TAKE-NOTES is the same as for `checkdoc-interactive'" | 1064 | Prefix argument is the same as for `checkdoc-interactive'" |
| 1071 | (interactive) | 1065 | (interactive) |
| 1072 | (let ((checkdoc-spellcheck-documentation-flag t)) | 1066 | (let ((checkdoc-spellcheck-documentation-flag t)) |
| 1073 | (call-interactively 'checkdoc-interactive nil current-prefix-arg))) | 1067 | (call-interactively #'checkdoc-interactive nil current-prefix-arg))) |
| 1074 | 1068 | ||
| 1075 | ;;;###autoload | 1069 | ;;;###autoload |
| 1076 | (defun checkdoc-ispell-message-interactive (&optional take-notes) | 1070 | (defun checkdoc-ispell-message-interactive () |
| 1077 | "Check the style and spelling of message text interactively. | 1071 | "Check the style and spelling of message text interactively. |
| 1078 | Calls `checkdoc-message-interactive' with spell-checking turned on. | 1072 | Calls `checkdoc-message-interactive' with spell-checking turned on. |
| 1079 | Prefix argument TAKE-NOTES is the same as for `checkdoc-message-interactive'" | 1073 | Prefix argument is the same as for `checkdoc-message-interactive'" |
| 1080 | (interactive) | 1074 | (interactive) |
| 1081 | (let ((checkdoc-spellcheck-documentation-flag t)) | 1075 | (let ((checkdoc-spellcheck-documentation-flag t)) |
| 1082 | (call-interactively 'checkdoc-message-interactive nil current-prefix-arg))) | 1076 | (call-interactively #'checkdoc-message-interactive |
| 1077 | nil current-prefix-arg))) | ||
| 1083 | 1078 | ||
| 1084 | ;;;###autoload | 1079 | ;;;###autoload |
| 1085 | (defun checkdoc-ispell-message-text (&optional take-notes) | 1080 | (defun checkdoc-ispell-message-text () |
| 1086 | "Check the style and spelling of message text interactively. | 1081 | "Check the style and spelling of message text interactively. |
| 1087 | Calls `checkdoc-message-text' with spell-checking turned on. | 1082 | Calls `checkdoc-message-text' with spell-checking turned on. |
| 1088 | Prefix argument TAKE-NOTES is the same as for `checkdoc-message-text'" | 1083 | Prefix argument is the same as for `checkdoc-message-text'" |
| 1089 | (interactive) | 1084 | (interactive) |
| 1090 | (let ((checkdoc-spellcheck-documentation-flag t)) | 1085 | (let ((checkdoc-spellcheck-documentation-flag t)) |
| 1091 | (call-interactively 'checkdoc-message-text nil current-prefix-arg))) | 1086 | (call-interactively #'checkdoc-message-text nil current-prefix-arg))) |
| 1092 | 1087 | ||
| 1093 | ;;;###autoload | 1088 | ;;;###autoload |
| 1094 | (defun checkdoc-ispell-start (&optional take-notes) | 1089 | (defun checkdoc-ispell-start () |
| 1095 | "Check the style and spelling of the current buffer. | 1090 | "Check the style and spelling of the current buffer. |
| 1096 | Calls `checkdoc-start' with spell-checking turned on. | 1091 | Calls `checkdoc-start' with spell-checking turned on. |
| 1097 | Prefix argument TAKE-NOTES is the same as for `checkdoc-start'" | 1092 | Prefix argument is the same as for `checkdoc-start'" |
| 1098 | (interactive) | 1093 | (interactive) |
| 1099 | (let ((checkdoc-spellcheck-documentation-flag t)) | 1094 | (let ((checkdoc-spellcheck-documentation-flag t)) |
| 1100 | (call-interactively 'checkdoc-start nil current-prefix-arg))) | 1095 | (call-interactively #'checkdoc-start nil current-prefix-arg))) |
| 1101 | 1096 | ||
| 1102 | ;;;###autoload | 1097 | ;;;###autoload |
| 1103 | (defun checkdoc-ispell-continue (&optional take-notes) | 1098 | (defun checkdoc-ispell-continue () |
| 1104 | "Check the style and spelling of the current buffer after point. | 1099 | "Check the style and spelling of the current buffer after point. |
| 1105 | Calls `checkdoc-continue' with spell-checking turned on. | 1100 | Calls `checkdoc-continue' with spell-checking turned on. |
| 1106 | Prefix argument TAKE-NOTES is the same as for `checkdoc-continue'" | 1101 | Prefix argument is the same as for `checkdoc-continue'" |
| 1107 | (interactive) | 1102 | (interactive) |
| 1108 | (let ((checkdoc-spellcheck-documentation-flag t)) | 1103 | (let ((checkdoc-spellcheck-documentation-flag t)) |
| 1109 | (call-interactively 'checkdoc-continue nil current-prefix-arg))) | 1104 | (call-interactively #'checkdoc-continue nil current-prefix-arg))) |
| 1110 | 1105 | ||
| 1111 | ;;;###autoload | 1106 | ;;;###autoload |
| 1112 | (defun checkdoc-ispell-comments (&optional take-notes) | 1107 | (defun checkdoc-ispell-comments () |
| 1113 | "Check the style and spelling of the current buffer's comments. | 1108 | "Check the style and spelling of the current buffer's comments. |
| 1114 | Calls `checkdoc-comments' with spell-checking turned on. | 1109 | Calls `checkdoc-comments' with spell-checking turned on. |
| 1115 | Prefix argument TAKE-NOTES is the same as for `checkdoc-comments'" | 1110 | Prefix argument is the same as for `checkdoc-comments'" |
| 1116 | (interactive) | 1111 | (interactive) |
| 1117 | (let ((checkdoc-spellcheck-documentation-flag t)) | 1112 | (let ((checkdoc-spellcheck-documentation-flag t)) |
| 1118 | (call-interactively 'checkdoc-comments nil current-prefix-arg))) | 1113 | (call-interactively #'checkdoc-comments nil current-prefix-arg))) |
| 1119 | 1114 | ||
| 1120 | ;;;###autoload | 1115 | ;;;###autoload |
| 1121 | (defun checkdoc-ispell-defun (&optional take-notes) | 1116 | (defun checkdoc-ispell-defun () |
| 1122 | "Check the style and spelling of the current defun with Ispell. | 1117 | "Check the style and spelling of the current defun with Ispell. |
| 1123 | Calls `checkdoc-defun' with spell-checking turned on. | 1118 | Calls `checkdoc-defun' with spell-checking turned on. |
| 1124 | Prefix argument TAKE-NOTES is the same as for `checkdoc-defun'" | 1119 | Prefix argument is the same as for `checkdoc-defun'" |
| 1125 | (interactive) | 1120 | (interactive) |
| 1126 | (let ((checkdoc-spellcheck-documentation-flag t)) | 1121 | (let ((checkdoc-spellcheck-documentation-flag t)) |
| 1127 | (call-interactively 'checkdoc-defun nil current-prefix-arg))) | 1122 | (call-interactively #'checkdoc-defun nil current-prefix-arg))) |
| 1128 | 1123 | ||
| 1129 | ;;; Error Management | 1124 | ;;; Error Management |
| 1130 | ;; | 1125 | ;; |
| @@ -1254,10 +1249,10 @@ checking of documentation strings. | |||
| 1254 | (defsubst checkdoc-run-hooks (hookvar &rest args) | 1249 | (defsubst checkdoc-run-hooks (hookvar &rest args) |
| 1255 | "Run hooks in HOOKVAR with ARGS." | 1250 | "Run hooks in HOOKVAR with ARGS." |
| 1256 | (if (fboundp 'run-hook-with-args-until-success) | 1251 | (if (fboundp 'run-hook-with-args-until-success) |
| 1257 | (apply 'run-hook-with-args-until-success hookvar args) | 1252 | (apply #'run-hook-with-args-until-success hookvar args) |
| 1258 | ;; This method was similar to above. We ignore the warning | 1253 | ;; This method was similar to above. We ignore the warning |
| 1259 | ;; since we will use the above for future Emacs versions | 1254 | ;; since we will use the above for future Emacs versions |
| 1260 | (apply 'run-hook-with-args hookvar args))) | 1255 | (apply #'run-hook-with-args hookvar args))) |
| 1261 | 1256 | ||
| 1262 | (defsubst checkdoc-create-common-verbs-regexp () | 1257 | (defsubst checkdoc-create-common-verbs-regexp () |
| 1263 | "Rebuild the contents of `checkdoc-common-verbs-regexp'." | 1258 | "Rebuild the contents of `checkdoc-common-verbs-regexp'." |
| @@ -2198,8 +2193,8 @@ Code:, and others referenced in the style guide." | |||
| 2198 | nil | 2193 | nil |
| 2199 | (require 'lisp-mnt) | 2194 | (require 'lisp-mnt) |
| 2200 | ;; Old XEmacs don't have `lm-commentary-mark' | 2195 | ;; Old XEmacs don't have `lm-commentary-mark' |
| 2201 | (if (and (not (fboundp 'lm-commentary-mark)) (boundp 'lm-commentary)) | 2196 | (if (and (not (fboundp 'lm-commentary-mark)) (fboundp 'lm-commentary)) |
| 2202 | (defalias 'lm-commentary-mark 'lm-commentary))) | 2197 | (defalias 'lm-commentary-mark #'lm-commentary))) |
| 2203 | (save-excursion | 2198 | (save-excursion |
| 2204 | (let* ((f1 (file-name-nondirectory (buffer-file-name))) | 2199 | (let* ((f1 (file-name-nondirectory (buffer-file-name))) |
| 2205 | (fn (file-name-sans-extension f1)) | 2200 | (fn (file-name-sans-extension f1)) |
| @@ -2260,8 +2255,7 @@ Code:, and others referenced in the style guide." | |||
| 2260 | (if (or (not checkdoc-force-history-flag) | 2255 | (if (or (not checkdoc-force-history-flag) |
| 2261 | (file-exists-p "ChangeLog") | 2256 | (file-exists-p "ChangeLog") |
| 2262 | (file-exists-p "../ChangeLog") | 2257 | (file-exists-p "../ChangeLog") |
| 2263 | (let ((fn 'lm-history-mark)) ;bestill byte-compiler | 2258 | (and (fboundp 'lm-history-mark) (funcall #'lm-history-mark))) |
| 2264 | (and (fboundp fn) (funcall fn)))) | ||
| 2265 | nil | 2259 | nil |
| 2266 | (progn | 2260 | (progn |
| 2267 | (goto-char (or (lm-commentary-mark) (point-min))) | 2261 | (goto-char (or (lm-commentary-mark) (point-min))) |
| @@ -2585,10 +2579,10 @@ This function will not modify `match-data'." | |||
| 2585 | 2579 | ||
| 2586 | (define-derived-mode checkdoc-output-mode compilation-mode "Checkdoc" | 2580 | (define-derived-mode checkdoc-output-mode compilation-mode "Checkdoc" |
| 2587 | "Set up the major mode for the buffer containing the list of errors." | 2581 | "Set up the major mode for the buffer containing the list of errors." |
| 2588 | (set (make-local-variable 'compilation-error-regexp-alist) | 2582 | (setq-local compilation-error-regexp-alist |
| 2589 | checkdoc-output-error-regex-alist) | 2583 | checkdoc-output-error-regex-alist) |
| 2590 | (set (make-local-variable 'compilation-mode-font-lock-keywords) | 2584 | (setq-local compilation-mode-font-lock-keywords |
| 2591 | checkdoc-output-font-lock-keywords)) | 2585 | checkdoc-output-font-lock-keywords)) |
| 2592 | 2586 | ||
| 2593 | (defun checkdoc-buffer-label () | 2587 | (defun checkdoc-buffer-label () |
| 2594 | "The name to use for a checkdoc buffer in the error list." | 2588 | "The name to use for a checkdoc buffer in the error list." |
| @@ -2620,7 +2614,7 @@ function called to create the messages." | |||
| 2620 | (with-current-buffer (get-buffer checkdoc-diagnostic-buffer) | 2614 | (with-current-buffer (get-buffer checkdoc-diagnostic-buffer) |
| 2621 | (goto-char (point-max)) | 2615 | (goto-char (point-max)) |
| 2622 | (let ((inhibit-read-only t)) | 2616 | (let ((inhibit-read-only t)) |
| 2623 | (apply 'insert text))))) | 2617 | (apply #'insert text))))) |
| 2624 | 2618 | ||
| 2625 | (defun checkdoc-show-diagnostics () | 2619 | (defun checkdoc-show-diagnostics () |
| 2626 | "Display the checkdoc diagnostic buffer in a temporary window." | 2620 | "Display the checkdoc diagnostic buffer in a temporary window." |
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el index 2ab6b7ad089..e826cf4375a 100644 --- a/lisp/emacs-lisp/cl-lib.el +++ b/lisp/emacs-lisp/cl-lib.el | |||
| @@ -714,6 +714,9 @@ If ALIST is non-nil, the new pairs are prepended to it." | |||
| 714 | 714 | ||
| 715 | ;;;###autoload | 715 | ;;;###autoload |
| 716 | (progn | 716 | (progn |
| 717 | ;; The `assert' macro from the cl package signals | ||
| 718 | ;; `cl-assertion-failed' at runtime so always define it. | ||
| 719 | (define-error 'cl-assertion-failed (purecopy "Assertion failed")) | ||
| 717 | ;; Make sure functions defined with cl-defsubst can be inlined even in | 720 | ;; Make sure functions defined with cl-defsubst can be inlined even in |
| 718 | ;; packages which do not require CL. We don't put an autoload cookie | 721 | ;; packages which do not require CL. We don't put an autoload cookie |
| 719 | ;; directly on that function, since those cookies only go to cl-loaddefs. | 722 | ;; directly on that function, since those cookies only go to cl-loaddefs. |
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index c47c9b61030..af7c41d5c4c 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -616,7 +616,7 @@ The result of the body appears to the compiler as a quoted constant." | |||
| 616 | (declare (debug (form &optional sexp))) | 616 | (declare (debug (form &optional sexp))) |
| 617 | (if (cl--compiling-file) | 617 | (if (cl--compiling-file) |
| 618 | (let* ((temp (cl-gentemp "--cl-load-time--")) | 618 | (let* ((temp (cl-gentemp "--cl-load-time--")) |
| 619 | (set `(set ',temp ,form))) | 619 | (set `(setq ,temp ,form))) |
| 620 | (if (and (fboundp 'byte-compile-file-form-defmumble) | 620 | (if (and (fboundp 'byte-compile-file-form-defmumble) |
| 621 | (boundp 'this-kind) (boundp 'that-one)) | 621 | (boundp 'this-kind) (boundp 'that-one)) |
| 622 | (fset 'byte-compile-file-form | 622 | (fset 'byte-compile-file-form |
| @@ -2693,15 +2693,16 @@ macro that returns its `&whole' argument." | |||
| 2693 | ;;;###autoload | 2693 | ;;;###autoload |
| 2694 | (defmacro cl-defsubst (name args &rest body) | 2694 | (defmacro cl-defsubst (name args &rest body) |
| 2695 | "Define NAME as a function. | 2695 | "Define NAME as a function. |
| 2696 | Like `defun', except the function is automatically declared `inline', | 2696 | Like `defun', except the function is automatically declared `inline' and |
| 2697 | the arguments are immutable. | ||
| 2697 | ARGLIST allows full Common Lisp conventions, and BODY is implicitly | 2698 | ARGLIST allows full Common Lisp conventions, and BODY is implicitly |
| 2698 | surrounded by (cl-block NAME ...). | 2699 | surrounded by (cl-block NAME ...). |
| 2700 | The function's arguments should be treated as immutable. | ||
| 2699 | 2701 | ||
| 2700 | \(fn NAME ARGLIST [DOCSTRING] BODY...)" | 2702 | \(fn NAME ARGLIST [DOCSTRING] BODY...)" |
| 2701 | (declare (debug cl-defun) (indent 2)) | 2703 | (declare (debug cl-defun) (indent 2)) |
| 2702 | (let* ((argns (cl--arglist-args args)) (p argns) | 2704 | (let* ((argns (cl--arglist-args args)) (p argns) |
| 2703 | (pbody (cons 'progn body)) | 2705 | (pbody (cons 'progn body))) |
| 2704 | (unsafe (not (cl--safe-expr-p pbody)))) | ||
| 2705 | (while (and p (eq (cl--expr-contains args (car p)) 1)) (pop p)) | 2706 | (while (and p (eq (cl--expr-contains args (car p)) 1)) (pop p)) |
| 2706 | `(progn | 2707 | `(progn |
| 2707 | ,(if p nil ; give up if defaults refer to earlier args | 2708 | ,(if p nil ; give up if defaults refer to earlier args |
| @@ -2717,10 +2718,10 @@ surrounded by (cl-block NAME ...). | |||
| 2717 | ;; does not pay attention to the argvs (and | 2718 | ;; does not pay attention to the argvs (and |
| 2718 | ;; cl-expr-access-order itself is also too naive). | 2719 | ;; cl-expr-access-order itself is also too naive). |
| 2719 | nil | 2720 | nil |
| 2720 | ,(and (memq '&key args) 'cl-whole) ,unsafe ,@argns))) | 2721 | ,(and (memq '&key args) 'cl-whole) nil ,@argns))) |
| 2721 | (cl-defun ,name ,args ,@body)))) | 2722 | (cl-defun ,name ,args ,@body)))) |
| 2722 | 2723 | ||
| 2723 | (defun cl--defsubst-expand (argns body simple whole unsafe &rest argvs) | 2724 | (defun cl--defsubst-expand (argns body simple whole _unsafe &rest argvs) |
| 2724 | (if (and whole (not (cl--safe-expr-p (cons 'progn argvs)))) whole | 2725 | (if (and whole (not (cl--safe-expr-p (cons 'progn argvs)))) whole |
| 2725 | (if (cl--simple-exprs-p argvs) (setq simple t)) | 2726 | (if (cl--simple-exprs-p argvs) (setq simple t)) |
| 2726 | (let* ((substs ()) | 2727 | (let* ((substs ()) |
| @@ -2728,7 +2729,7 @@ surrounded by (cl-block NAME ...). | |||
| 2728 | (cl-mapcar (lambda (argn argv) | 2729 | (cl-mapcar (lambda (argn argv) |
| 2729 | (if (or simple (macroexp-const-p argv)) | 2730 | (if (or simple (macroexp-const-p argv)) |
| 2730 | (progn (push (cons argn argv) substs) | 2731 | (progn (push (cons argn argv) substs) |
| 2731 | (and unsafe (list argn argv))) | 2732 | nil) |
| 2732 | (list argn argv))) | 2733 | (list argn argv))) |
| 2733 | argns argvs)))) | 2734 | argns argvs)))) |
| 2734 | ;; FIXME: `sublis/subst' will happily substitute the symbol | 2735 | ;; FIXME: `sublis/subst' will happily substitute the symbol |
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index aee48eef668..709a094e73b 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el | |||
| @@ -288,33 +288,41 @@ That buffer should be current already." | |||
| 288 | (insert "Debugger entered") | 288 | (insert "Debugger entered") |
| 289 | ;; lambda is for debug-on-call when a function call is next. | 289 | ;; lambda is for debug-on-call when a function call is next. |
| 290 | ;; debug is for debug-on-entry function called. | 290 | ;; debug is for debug-on-entry function called. |
| 291 | (pcase (car args) | 291 | (let ((pos (point))) |
| 292 | ((or `lambda `debug) | 292 | (pcase (car args) |
| 293 | (insert "--entering a function:\n")) | 293 | ((or `lambda `debug) |
| 294 | ;; Exiting a function. | 294 | (insert "--entering a function:\n") |
| 295 | (`exit | 295 | (setq pos (1- (point)))) |
| 296 | (insert "--returning value: ") | 296 | ;; Exiting a function. |
| 297 | (setq debugger-value (nth 1 args)) | 297 | (`exit |
| 298 | (prin1 debugger-value (current-buffer)) | 298 | (insert "--returning value: ") |
| 299 | (insert ?\n) | 299 | (setq pos (point)) |
| 300 | (delete-char 1) | 300 | (setq debugger-value (nth 1 args)) |
| 301 | (insert ? ) | 301 | (prin1 debugger-value (current-buffer)) |
| 302 | (beginning-of-line)) | 302 | (insert ?\n) |
| 303 | ;; Debugger entered for an error. | 303 | (delete-char 1) |
| 304 | (`error | 304 | (insert ? ) |
| 305 | (insert "--Lisp error: ") | 305 | (beginning-of-line)) |
| 306 | (prin1 (nth 1 args) (current-buffer)) | 306 | ;; Debugger entered for an error. |
| 307 | (insert ?\n)) | 307 | (`error |
| 308 | ;; debug-on-call, when the next thing is an eval. | 308 | (insert "--Lisp error: ") |
| 309 | (`t | 309 | (setq pos (point)) |
| 310 | (insert "--beginning evaluation of function call form:\n")) | 310 | (prin1 (nth 1 args) (current-buffer)) |
| 311 | ;; User calls debug directly. | 311 | (insert ?\n)) |
| 312 | (_ | 312 | ;; debug-on-call, when the next thing is an eval. |
| 313 | (insert ": ") | 313 | (`t |
| 314 | (prin1 (if (eq (car args) 'nil) | 314 | (insert "--beginning evaluation of function call form:\n") |
| 315 | (cdr args) args) | 315 | (setq pos (1- (point)))) |
| 316 | (current-buffer)) | 316 | ;; User calls debug directly. |
| 317 | (insert ?\n))) | 317 | (_ |
| 318 | (insert ": ") | ||
| 319 | (setq pos (point)) | ||
| 320 | (prin1 (if (eq (car args) 'nil) | ||
| 321 | (cdr args) args) | ||
| 322 | (current-buffer)) | ||
| 323 | (insert ?\n))) | ||
| 324 | ;; Place point on "stack frame 0" (bug#15101). | ||
| 325 | (goto-char pos)) | ||
| 318 | ;; After any frame that uses eval-buffer, | 326 | ;; After any frame that uses eval-buffer, |
| 319 | ;; insert a line that states the buffer position it's reading at. | 327 | ;; insert a line that states the buffer position it's reading at. |
| 320 | (save-excursion | 328 | (save-excursion |
| @@ -533,16 +541,15 @@ Applies to the frame whose line point is on in the backtrace." | |||
| 533 | (progn ,@body) | 541 | (progn ,@body) |
| 534 | (setq debugger-outer-match-data (match-data))))) | 542 | (setq debugger-outer-match-data (match-data))))) |
| 535 | 543 | ||
| 536 | (defun debugger-eval-expression (exp) | 544 | (defun debugger-eval-expression (exp &optional nframe) |
| 537 | "Eval an expression, in an environment like that outside the debugger. | 545 | "Eval an expression, in an environment like that outside the debugger. |
| 538 | The environment used is the one when entering the activation frame at point." | 546 | The environment used is the one when entering the activation frame at point." |
| 539 | (interactive | 547 | (interactive |
| 540 | (list (read-from-minibuffer "Eval: " | 548 | (list (read--expression "Eval in stack frame: "))) |
| 541 | nil read-expression-map t | 549 | (let ((nframe (or nframe |
| 542 | 'read-expression-history))) | 550 | (condition-case nil (1+ (debugger-frame-number 'skip-base)) |
| 543 | (let ((nframe (condition-case nil (1+ (debugger-frame-number 'skip-base)) | 551 | (error 0)))) ;; If on first line. |
| 544 | (error 0))) ;; If on first line. | 552 | (base (if (eq 'debug--implement-debug-on-entry |
| 545 | (base (if (eq 'debug--implement-debug-on-entry | ||
| 546 | (cadr (backtrace-frame 1 'debug))) | 553 | (cadr (backtrace-frame 1 'debug))) |
| 547 | 'debug--implement-debug-on-entry 'debug))) | 554 | 'debug--implement-debug-on-entry 'debug))) |
| 548 | (debugger-env-macro | 555 | (debugger-env-macro |
| @@ -651,11 +658,7 @@ Complete list of commands: | |||
| 651 | (defun debugger-record-expression (exp) | 658 | (defun debugger-record-expression (exp) |
| 652 | "Display a variable's value and record it in `*Backtrace-record*' buffer." | 659 | "Display a variable's value and record it in `*Backtrace-record*' buffer." |
| 653 | (interactive | 660 | (interactive |
| 654 | (list (read-from-minibuffer | 661 | (list (read--expression "Record Eval: "))) |
| 655 | "Record Eval: " | ||
| 656 | nil | ||
| 657 | read-expression-map t | ||
| 658 | 'read-expression-history))) | ||
| 659 | (let* ((buffer (get-buffer-create debugger-record-buffer)) | 662 | (let* ((buffer (get-buffer-create debugger-record-buffer)) |
| 660 | (standard-output buffer)) | 663 | (standard-output buffer)) |
| 661 | (princ (format "Debugger Eval (%s): " exp)) | 664 | (princ (format "Debugger Eval (%s): " exp)) |
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index f8fb65be4d3..1301b70bb85 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el | |||
| @@ -604,7 +604,7 @@ BODY is executed after moving to the destination location." | |||
| 604 | (goto-char (or ,(if endfun `(funcall #',endfun)) (point-max))) | 604 | (goto-char (or ,(if endfun `(funcall #',endfun)) (point-max))) |
| 605 | (user-error "No next %s" ,name)) | 605 | (user-error "No next %s" ,name)) |
| 606 | (goto-char (match-beginning 0)) | 606 | (goto-char (match-beginning 0)) |
| 607 | (when (and (eq (current-buffer) (window-buffer (selected-window))) | 607 | (when (and (eq (current-buffer) (window-buffer)) |
| 608 | (called-interactively-p 'interactive)) | 608 | (called-interactively-p 'interactive)) |
| 609 | (let ((endpt (or (save-excursion | 609 | (let ((endpt (or (save-excursion |
| 610 | ,(if endfun `(funcall #',endfun) | 610 | ,(if endfun `(funcall #',endfun) |
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index ae20e5270e1..ec343eab631 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el | |||
| @@ -293,20 +293,7 @@ A lambda list keyword is a symbol that starts with `&'." | |||
| 293 | "Return t if there are two windows." | 293 | "Return t if there are two windows." |
| 294 | (and (not (one-window-p)) | 294 | (and (not (one-window-p)) |
| 295 | (eq (selected-window) | 295 | (eq (selected-window) |
| 296 | (next-window (next-window (selected-window)))))) | 296 | (next-window (next-window))))) |
| 297 | |||
| 298 | (defsubst edebug-lookup-function (object) | ||
| 299 | (while (and (symbolp object) (fboundp object)) | ||
| 300 | (setq object (symbol-function object))) | ||
| 301 | object) | ||
| 302 | |||
| 303 | (defun edebug-macrop (object) | ||
| 304 | "Return the macro named by OBJECT, or nil if it is not a macro." | ||
| 305 | (setq object (edebug-lookup-function object)) | ||
| 306 | (if (and (listp object) | ||
| 307 | (eq 'macro (car object)) | ||
| 308 | (functionp (cdr object))) | ||
| 309 | object)) | ||
| 310 | 297 | ||
| 311 | (defun edebug-sort-alist (alist function) | 298 | (defun edebug-sort-alist (alist function) |
| 312 | ;; Return the ALIST sorted with comparison function FUNCTION. | 299 | ;; Return the ALIST sorted with comparison function FUNCTION. |
| @@ -347,7 +334,7 @@ Return the result of the last expression in BODY." | |||
| 347 | ((and (edebug-window-live-p window) | 334 | ((and (edebug-window-live-p window) |
| 348 | (eq (window-buffer window) buffer)) | 335 | (eq (window-buffer window) buffer)) |
| 349 | window) | 336 | window) |
| 350 | ((eq (window-buffer (selected-window)) buffer) | 337 | ((eq (window-buffer) buffer) |
| 351 | ;; Selected window already displays BUFFER. | 338 | ;; Selected window already displays BUFFER. |
| 352 | (selected-window)) | 339 | (selected-window)) |
| 353 | ((get-buffer-window buffer 0)) | 340 | ((get-buffer-window buffer 0)) |
| @@ -1416,7 +1403,7 @@ expressions; a `progn' form will be returned enclosing these forms." | |||
| 1416 | ; but leave it in for compatibility. | 1403 | ; but leave it in for compatibility. |
| 1417 | )) | 1404 | )) |
| 1418 | ;; No edebug-form-spec provided. | 1405 | ;; No edebug-form-spec provided. |
| 1419 | ((edebug-macrop head) | 1406 | ((macrop head) |
| 1420 | (if edebug-eval-macro-args | 1407 | (if edebug-eval-macro-args |
| 1421 | (edebug-forms cursor) | 1408 | (edebug-forms cursor) |
| 1422 | (edebug-sexps cursor))) | 1409 | (edebug-sexps cursor))) |
| @@ -2327,8 +2314,7 @@ MSG is printed after `::::} '." | |||
| 2327 | (if edebug-global-break-condition | 2314 | (if edebug-global-break-condition |
| 2328 | (condition-case nil | 2315 | (condition-case nil |
| 2329 | (setq edebug-global-break-result | 2316 | (setq edebug-global-break-result |
| 2330 | ;; FIXME: lexbind. | 2317 | (edebug-eval edebug-global-break-condition)) |
| 2331 | (eval edebug-global-break-condition)) | ||
| 2332 | (error nil)))) | 2318 | (error nil)))) |
| 2333 | (edebug-break)) | 2319 | (edebug-break)) |
| 2334 | 2320 | ||
| @@ -2339,8 +2325,7 @@ MSG is printed after `::::} '." | |||
| 2339 | (and edebug-break-data | 2325 | (and edebug-break-data |
| 2340 | (or (not edebug-break-condition) | 2326 | (or (not edebug-break-condition) |
| 2341 | (setq edebug-break-result | 2327 | (setq edebug-break-result |
| 2342 | ;; FIXME: lexbind. | 2328 | (edebug-eval edebug-break-condition)))))) |
| 2343 | (eval edebug-break-condition)))))) | ||
| 2344 | (if (and edebug-break | 2329 | (if (and edebug-break |
| 2345 | (nth 2 edebug-break-data)) ; is it temporary? | 2330 | (nth 2 edebug-break-data)) ; is it temporary? |
| 2346 | ;; Delete the breakpoint. | 2331 | ;; Delete the breakpoint. |
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 4efbdcb22cb..9b9fd325941 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el | |||
| @@ -185,6 +185,7 @@ expression point is on." | |||
| 185 | (add-hook 'post-self-insert-hook prn-info nil t) | 185 | (add-hook 'post-self-insert-hook prn-info nil t) |
| 186 | (remove-hook 'post-self-insert-hook prn-info t)))) | 186 | (remove-hook 'post-self-insert-hook prn-info t)))) |
| 187 | 187 | ||
| 188 | ;; FIXME: This changes Emacs's behavior when the file is loaded! | ||
| 188 | (add-hook 'eval-expression-minibuffer-setup-hook 'eldoc-post-insert-mode) | 189 | (add-hook 'eval-expression-minibuffer-setup-hook 'eldoc-post-insert-mode) |
| 189 | 190 | ||
| 190 | ;;;###autoload | 191 | ;;;###autoload |
| @@ -487,11 +488,11 @@ In the absence of INDEX, just call `eldoc-docstring-format-sym-doc'." | |||
| 487 | (defun eldoc-beginning-of-sexp () | 488 | (defun eldoc-beginning-of-sexp () |
| 488 | (let ((parse-sexp-ignore-comments t) | 489 | (let ((parse-sexp-ignore-comments t) |
| 489 | (num-skipped-sexps 0)) | 490 | (num-skipped-sexps 0)) |
| 490 | (condition-case err | 491 | (condition-case _ |
| 491 | (progn | 492 | (progn |
| 492 | ;; First account for the case the point is directly over a | 493 | ;; First account for the case the point is directly over a |
| 493 | ;; beginning of a nested sexp. | 494 | ;; beginning of a nested sexp. |
| 494 | (condition-case err | 495 | (condition-case _ |
| 495 | (let ((p (point))) | 496 | (let ((p (point))) |
| 496 | (forward-sexp -1) | 497 | (forward-sexp -1) |
| 497 | (forward-sexp 1) | 498 | (forward-sexp 1) |
| @@ -518,7 +519,7 @@ In the absence of INDEX, just call `eldoc-docstring-format-sym-doc'." | |||
| 518 | (let ((defn (and (fboundp fsym) | 519 | (let ((defn (and (fboundp fsym) |
| 519 | (symbol-function fsym)))) | 520 | (symbol-function fsym)))) |
| 520 | (and (symbolp defn) | 521 | (and (symbolp defn) |
| 521 | (condition-case err | 522 | (condition-case _ |
| 522 | (setq defn (indirect-function fsym)) | 523 | (setq defn (indirect-function fsym)) |
| 523 | (error (setq defn nil)))) | 524 | (error (setq defn nil)))) |
| 524 | defn)) | 525 | defn)) |
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 1f5edefea08..98576687f3d 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el | |||
| @@ -236,8 +236,7 @@ description of valid values for RESULT-TYPE. | |||
| 236 | "The regexp the `find-function' mechanisms use for finding test definitions.") | 236 | "The regexp the `find-function' mechanisms use for finding test definitions.") |
| 237 | 237 | ||
| 238 | 238 | ||
| 239 | (put 'ert-test-failed 'error-conditions '(error ert-test-failed)) | 239 | (define-error 'ert-test-failed "Test failed") |
| 240 | (put 'ert-test-failed 'error-message "Test failed") | ||
| 241 | 240 | ||
| 242 | (defun ert-pass () | 241 | (defun ert-pass () |
| 243 | "Terminate the current test and mark it passed. Does not return." | 242 | "Terminate the current test and mark it passed. Does not return." |
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el index cf090e5e758..279ae582a05 100644 --- a/lisp/emacs-lisp/gv.el +++ b/lisp/emacs-lisp/gv.el | |||
| @@ -217,13 +217,15 @@ instead the assignment is turned into something equivalent to | |||
| 217 | temp) | 217 | temp) |
| 218 | so as to preserve the semantics of `setf'." | 218 | so as to preserve the semantics of `setf'." |
| 219 | (declare (debug (sexp (&or symbolp lambda-expr) &optional sexp))) | 219 | (declare (debug (sexp (&or symbolp lambda-expr) &optional sexp))) |
| 220 | (when (eq 'lambda (car-safe setter)) | ||
| 221 | (message "Use `gv-define-setter' or name %s's setter function" name)) | ||
| 220 | `(gv-define-setter ,name (val &rest args) | 222 | `(gv-define-setter ,name (val &rest args) |
| 221 | ,(if fix-return | 223 | ,(if fix-return |
| 222 | `(macroexp-let2 nil v val | 224 | `(macroexp-let2 nil v val |
| 223 | `(progn | 225 | `(progn |
| 224 | (,',setter ,@(append args (list v))) | 226 | (,',setter ,@args ,v) |
| 225 | ,v)) | 227 | ,v)) |
| 226 | `(cons ',setter (append args (list val)))))) | 228 | ``(,',setter ,@args ,val)))) |
| 227 | 229 | ||
| 228 | ;;; Typical operations on generalized variables. | 230 | ;;; Typical operations on generalized variables. |
| 229 | 231 | ||
diff --git a/lisp/emacs-lisp/helper.el b/lisp/emacs-lisp/helper.el index f3b7de521cf..5bef0b06fd4 100644 --- a/lisp/emacs-lisp/helper.el +++ b/lisp/emacs-lisp/helper.el | |||
| @@ -59,7 +59,7 @@ | |||
| 59 | Helper-return-blurb) | 59 | Helper-return-blurb) |
| 60 | "return"))) | 60 | "return"))) |
| 61 | (save-window-excursion | 61 | (save-window-excursion |
| 62 | (goto-char (window-start (selected-window))) | 62 | (goto-char (window-start)) |
| 63 | (if (get-buffer-window "*Help*") | 63 | (if (get-buffer-window "*Help*") |
| 64 | (pop-to-buffer "*Help*") | 64 | (pop-to-buffer "*Help*") |
| 65 | (switch-to-buffer "*Help*")) | 65 | (switch-to-buffer "*Help*")) |
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 3cbd6d4a585..f7105b7d3b4 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el | |||
| @@ -575,7 +575,7 @@ if that value is non-nil." | |||
| 575 | (defalias 'common-lisp-mode 'lisp-mode) | 575 | (defalias 'common-lisp-mode 'lisp-mode) |
| 576 | 576 | ||
| 577 | ;; This will do unless inf-lisp.el is loaded. | 577 | ;; This will do unless inf-lisp.el is loaded. |
| 578 | (defun lisp-eval-defun (&optional and-go) | 578 | (defun lisp-eval-defun (&optional _and-go) |
| 579 | "Send the current defun to the Lisp process made by \\[run-lisp]." | 579 | "Send the current defun to the Lisp process made by \\[run-lisp]." |
| 580 | (interactive) | 580 | (interactive) |
| 581 | (error "Process lisp does not exist")) | 581 | (error "Process lisp does not exist")) |
| @@ -662,7 +662,7 @@ alternative printed representations that can be displayed." | |||
| 662 | printed-value))))) | 662 | printed-value))))) |
| 663 | 663 | ||
| 664 | 664 | ||
| 665 | (defun last-sexp-toggle-display (&optional arg) | 665 | (defun last-sexp-toggle-display (&optional _arg) |
| 666 | "Toggle between abbreviated and unabbreviated printed representations." | 666 | "Toggle between abbreviated and unabbreviated printed representations." |
| 667 | (interactive "P") | 667 | (interactive "P") |
| 668 | (save-restriction | 668 | (save-restriction |
| @@ -1002,12 +1002,12 @@ function is `common-lisp-indent-function'." | |||
| 1002 | :type 'function | 1002 | :type 'function |
| 1003 | :group 'lisp) | 1003 | :group 'lisp) |
| 1004 | 1004 | ||
| 1005 | (defun lisp-indent-line (&optional whole-exp) | 1005 | (defun lisp-indent-line (&optional _whole-exp) |
| 1006 | "Indent current line as Lisp code. | 1006 | "Indent current line as Lisp code. |
| 1007 | With argument, indent any additional lines of the same expression | 1007 | With argument, indent any additional lines of the same expression |
| 1008 | rigidly along with this one." | 1008 | rigidly along with this one." |
| 1009 | (interactive "P") | 1009 | (interactive "P") |
| 1010 | (let ((indent (calculate-lisp-indent)) shift-amt end | 1010 | (let ((indent (calculate-lisp-indent)) shift-amt |
| 1011 | (pos (- (point-max) (point))) | 1011 | (pos (- (point-max) (point))) |
| 1012 | (beg (progn (beginning-of-line) (point)))) | 1012 | (beg (progn (beginning-of-line) (point)))) |
| 1013 | (skip-chars-forward " \t") | 1013 | (skip-chars-forward " \t") |
| @@ -1047,7 +1047,7 @@ is the buffer position of the start of the containing expression." | |||
| 1047 | (save-excursion | 1047 | (save-excursion |
| 1048 | (beginning-of-line) | 1048 | (beginning-of-line) |
| 1049 | (let ((indent-point (point)) | 1049 | (let ((indent-point (point)) |
| 1050 | state paren-depth | 1050 | state |
| 1051 | ;; setting this to a number inhibits calling hook | 1051 | ;; setting this to a number inhibits calling hook |
| 1052 | (desired-indent nil) | 1052 | (desired-indent nil) |
| 1053 | (retry t) | 1053 | (retry t) |
| @@ -1061,7 +1061,7 @@ is the buffer position of the start of the containing expression." | |||
| 1061 | ;; Find innermost containing sexp | 1061 | ;; Find innermost containing sexp |
| 1062 | (while (and retry | 1062 | (while (and retry |
| 1063 | state | 1063 | state |
| 1064 | (> (setq paren-depth (elt state 0)) 0)) | 1064 | (> (elt state 0) 0)) |
| 1065 | (setq retry nil) | 1065 | (setq retry nil) |
| 1066 | (setq calculate-lisp-indent-last-sexp (elt state 2)) | 1066 | (setq calculate-lisp-indent-last-sexp (elt state 2)) |
| 1067 | (setq containing-sexp (elt state 1)) | 1067 | (setq containing-sexp (elt state 1)) |
| @@ -1290,7 +1290,7 @@ Lisp function does not specify a special indentation." | |||
| 1290 | body-indent | 1290 | body-indent |
| 1291 | normal-indent)))) | 1291 | normal-indent)))) |
| 1292 | 1292 | ||
| 1293 | (defun lisp-indent-defform (state indent-point) | 1293 | (defun lisp-indent-defform (state _indent-point) |
| 1294 | (goto-char (car (cdr state))) | 1294 | (goto-char (car (cdr state))) |
| 1295 | (forward-line 1) | 1295 | (forward-line 1) |
| 1296 | (if (> (point) (car (cdr (cdr state)))) | 1296 | (if (> (point) (car (cdr (cdr state)))) |
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index b37a811b8d5..11891679202 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el | |||
| @@ -752,6 +752,57 @@ considered." | |||
| 752 | (mapcar #'symbol-name (lisp--local-variables)))))) | 752 | (mapcar #'symbol-name (lisp--local-variables)))))) |
| 753 | lastvars))))) | 753 | lastvars))))) |
| 754 | 754 | ||
| 755 | ;; FIXME: Support for Company brings in features which straddle eldoc. | ||
| 756 | ;; We should consolidate this, so that major modes can provide all that | ||
| 757 | ;; data all at once: | ||
| 758 | ;; - a function to extract "the reference at point" (may be more complex | ||
| 759 | ;; than a mere string, to distinguish various namespaces). | ||
| 760 | ;; - a function to jump to such a reference. | ||
| 761 | ;; - a function to show the signature/interface of such a reference. | ||
| 762 | ;; - a function to build a help-buffer about that reference. | ||
| 763 | ;; FIXME: Those functions should also be used by the normal completion code in | ||
| 764 | ;; the *Completions* buffer. | ||
| 765 | |||
| 766 | (defun lisp--company-doc-buffer (str) | ||
| 767 | (let ((symbol (intern-soft str))) | ||
| 768 | ;; FIXME: we really don't want to "display-buffer and then undo it". | ||
| 769 | (save-window-excursion | ||
| 770 | ;; Make sure we don't display it in another frame, otherwise | ||
| 771 | ;; save-window-excursion won't be able to undo it. | ||
| 772 | (let ((display-buffer-overriding-action | ||
| 773 | '(nil . ((inhibit-switch-frame . t))))) | ||
| 774 | (ignore-errors | ||
| 775 | (cond | ||
| 776 | ((fboundp symbol) (describe-function symbol)) | ||
| 777 | ((boundp symbol) (describe-variable symbol)) | ||
| 778 | ((featurep symbol) (describe-package symbol)) | ||
| 779 | ((facep symbol) (describe-face symbol)) | ||
| 780 | (t (signal 'user-error nil))) | ||
| 781 | (help-buffer)))))) | ||
| 782 | |||
| 783 | (defun lisp--company-doc-string (str) | ||
| 784 | (let* ((symbol (intern-soft str)) | ||
| 785 | (doc (if (fboundp symbol) | ||
| 786 | (documentation symbol t) | ||
| 787 | (documentation-property symbol 'variable-documentation t)))) | ||
| 788 | (and (stringp doc) | ||
| 789 | (string-match ".*$" doc) | ||
| 790 | (match-string 0 doc)))) | ||
| 791 | |||
| 792 | (declare-function find-library-name "find-func" (library)) | ||
| 793 | |||
| 794 | (defun lisp--company-location (str) | ||
| 795 | (let ((sym (intern-soft str))) | ||
| 796 | (cond | ||
| 797 | ((fboundp sym) (find-definition-noselect sym nil)) | ||
| 798 | ((boundp sym) (find-definition-noselect sym 'defvar)) | ||
| 799 | ((featurep sym) | ||
| 800 | (require 'find-func) | ||
| 801 | (cons (find-file-noselect (find-library-name | ||
| 802 | (symbol-name sym))) | ||
| 803 | 0)) | ||
| 804 | ((facep sym) (find-definition-noselect sym 'defface))))) | ||
| 805 | |||
| 755 | (defun lisp-completion-at-point (&optional _predicate) | 806 | (defun lisp-completion-at-point (&optional _predicate) |
| 756 | "Function used for `completion-at-point-functions' in `emacs-lisp-mode'." | 807 | "Function used for `completion-at-point-functions' in `emacs-lisp-mode'." |
| 757 | (with-syntax-table emacs-lisp-mode-syntax-table | 808 | (with-syntax-table emacs-lisp-mode-syntax-table |
| @@ -783,7 +834,10 @@ considered." | |||
| 783 | lisp--local-variables-completion-table | 834 | lisp--local-variables-completion-table |
| 784 | obarray) ;Could be anything. | 835 | obarray) ;Could be anything. |
| 785 | :annotation-function | 836 | :annotation-function |
| 786 | (lambda (str) (if (fboundp (intern-soft str)) " <f>"))) | 837 | (lambda (str) (if (fboundp (intern-soft str)) " <f>")) |
| 838 | :company-doc-buffer #'lisp--company-doc-buffer | ||
| 839 | :company-docsig #'lisp--company-doc-string | ||
| 840 | :company-location #'lisp--company-location) | ||
| 787 | ;; Looks like a funcall position. Let's double check. | 841 | ;; Looks like a funcall position. Let's double check. |
| 788 | (save-excursion | 842 | (save-excursion |
| 789 | (goto-char (1- beg)) | 843 | (goto-char (1- beg)) |
| @@ -800,10 +854,12 @@ considered." | |||
| 800 | ;; we should use something like a symbol-property. | 854 | ;; we should use something like a symbol-property. |
| 801 | (`declare | 855 | (`declare |
| 802 | (list t (mapcar (lambda (x) (symbol-name (car x))) | 856 | (list t (mapcar (lambda (x) (symbol-name (car x))) |
| 803 | (delete-dups | 857 | (delete-dups |
| 804 | (append | 858 | ;; FIXME: We should include some |
| 805 | macro-declarations-alist | 859 | ;; docstring with each entry. |
| 806 | defun-declarations-alist))))) | 860 | (append |
| 861 | macro-declarations-alist | ||
| 862 | defun-declarations-alist))))) | ||
| 807 | ((and (or `condition-case `condition-case-unless-debug) | 863 | ((and (or `condition-case `condition-case-unless-debug) |
| 808 | (guard (save-excursion | 864 | (guard (save-excursion |
| 809 | (ignore-errors | 865 | (ignore-errors |
| @@ -811,7 +867,12 @@ considered." | |||
| 811 | (< (point) beg))))) | 867 | (< (point) beg))))) |
| 812 | (list t obarray | 868 | (list t obarray |
| 813 | :predicate (lambda (sym) (get sym 'error-conditions)))) | 869 | :predicate (lambda (sym) (get sym 'error-conditions)))) |
| 814 | (_ (list nil obarray #'fboundp)))))))) | 870 | (_ (list nil obarray |
| 871 | :predicate #'fboundp | ||
| 872 | :company-doc-buffer #'lisp--company-doc-buffer | ||
| 873 | :company-docsig #'lisp--company-doc-string | ||
| 874 | :company-location #'lisp--company-location | ||
| 875 | )))))))) | ||
| 815 | (when end | 876 | (when end |
| 816 | (let ((tail (if (null (car table-etc)) | 877 | (let ((tail (if (null (car table-etc)) |
| 817 | (cdr table-etc) | 878 | (cdr table-etc) |
diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el index edcfc409085..576e72088e9 100644 --- a/lisp/emacs-lisp/nadvice.el +++ b/lisp/emacs-lisp/nadvice.el | |||
| @@ -193,7 +193,11 @@ WHERE is a symbol to select an entry in `advice--where-alist'." | |||
| 193 | (equal function (cdr (assq 'name props)))) | 193 | (equal function (cdr (assq 'name props)))) |
| 194 | (list rest)))))) | 194 | (list rest)))))) |
| 195 | 195 | ||
| 196 | (defvar advice--buffer-local-function-sample nil) | 196 | (defvar advice--buffer-local-function-sample nil |
| 197 | "keeps an example of the special \"run the default value\" functions. | ||
| 198 | These functions play the same role as t in buffer-local hooks, and to recognize | ||
| 199 | them, we keep a sample here against which to compare. Each instance is | ||
| 200 | different, but `function-equal' will hopefully ignore those differences.") | ||
| 197 | 201 | ||
| 198 | (defun advice--set-buffer-local (var val) | 202 | (defun advice--set-buffer-local (var val) |
| 199 | (if (function-equal val advice--buffer-local-function-sample) | 203 | (if (function-equal val advice--buffer-local-function-sample) |
| @@ -206,6 +210,7 @@ WHERE is a symbol to select an entry in `advice--where-alist'." | |||
| 206 | (declare (gv-setter advice--set-buffer-local)) | 210 | (declare (gv-setter advice--set-buffer-local)) |
| 207 | (if (local-variable-p var) (symbol-value var) | 211 | (if (local-variable-p var) (symbol-value var) |
| 208 | (setq advice--buffer-local-function-sample | 212 | (setq advice--buffer-local-function-sample |
| 213 | ;; This function acts like the t special value in buffer-local hooks. | ||
| 209 | (lambda (&rest args) (apply (default-value var) args))))) | 214 | (lambda (&rest args) (apply (default-value var) args))))) |
| 210 | 215 | ||
| 211 | ;;;###autoload | 216 | ;;;###autoload |
| @@ -284,6 +289,20 @@ of the piece of advice." | |||
| 284 | (macroexp-let2 nil new `(advice--remove-function ,getter ,function) | 289 | (macroexp-let2 nil new `(advice--remove-function ,getter ,function) |
| 285 | `(unless (eq ,new ,getter) ,(funcall setter new))))) | 290 | `(unless (eq ,new ,getter) ,(funcall setter new))))) |
| 286 | 291 | ||
| 292 | (defun advice-function-mapc (f function-def) | ||
| 293 | "Apply F to every advice function in FUNCTION-DEF. | ||
| 294 | F is called with two arguments: the function that was added, and the | ||
| 295 | properties alist that was specified when it was added." | ||
| 296 | (while (advice--p function-def) | ||
| 297 | (funcall f (advice--car function-def) (advice--props function-def)) | ||
| 298 | (setq function-def (advice--cdr function-def)))) | ||
| 299 | |||
| 300 | (defun advice-function-member-p (advice function-def) | ||
| 301 | "Return non-nil if ADVICE is already in FUNCTION-DEF. | ||
| 302 | Instead of ADVICE being the actual function, it can also be the `name' | ||
| 303 | of the piece of advice." | ||
| 304 | (advice--member-p advice advice function-def)) | ||
| 305 | |||
| 287 | ;;;; Specific application of add-function to `symbol-function' for advice. | 306 | ;;;; Specific application of add-function to `symbol-function' for advice. |
| 288 | 307 | ||
| 289 | (defun advice--subst-main (old new) | 308 | (defun advice--subst-main (old new) |
| @@ -294,11 +313,10 @@ of the piece of advice." | |||
| 294 | (cond | 313 | (cond |
| 295 | ((special-form-p def) | 314 | ((special-form-p def) |
| 296 | ;; Not worth the trouble trying to handle this, I think. | 315 | ;; Not worth the trouble trying to handle this, I think. |
| 297 | (error "advice-add failure: %S is a special form" symbol)) | 316 | (error "Advice impossible: %S is a special form" symbol)) |
| 298 | ((and (symbolp def) | 317 | ((and (symbolp def) (macrop def)) |
| 299 | (eq 'macro (car-safe (ignore-errors (indirect-function def))))) | 318 | (let ((newval `(macro . ,(lambda (&rest r) (macroexpand `(,def . ,r)))))) |
| 300 | (let ((newval (cons 'macro (cdr (indirect-function def))))) | 319 | (put symbol 'advice--saved-rewrite (cons def (cdr newval))) |
| 301 | (put symbol 'advice--saved-rewrite (cons def newval)) | ||
| 302 | newval)) | 320 | newval)) |
| 303 | ;; `f' might be a pure (hence read-only) cons! | 321 | ;; `f' might be a pure (hence read-only) cons! |
| 304 | ((and (eq 'macro (car-safe def)) | 322 | ((and (eq 'macro (car-safe def)) |
| @@ -309,32 +327,39 @@ of the piece of advice." | |||
| 309 | (defsubst advice--strip-macro (x) | 327 | (defsubst advice--strip-macro (x) |
| 310 | (if (eq 'macro (car-safe x)) (cdr x) x)) | 328 | (if (eq 'macro (car-safe x)) (cdr x) x)) |
| 311 | 329 | ||
| 330 | (defun advice--symbol-function (symbol) | ||
| 331 | ;; The value conceptually stored in `symbol-function' is split into two | ||
| 332 | ;; parts: | ||
| 333 | ;; - the normal function definition. | ||
| 334 | ;; - the list of advice applied to it. | ||
| 335 | ;; `advice--symbol-function' is intended to return the second part (i.e. the | ||
| 336 | ;; list of advice, which includes a hole at the end which typically holds the | ||
| 337 | ;; first part, but this function doesn't care much which value is found | ||
| 338 | ;; there). | ||
| 339 | ;; In the "normal" state both parts are combined into a single value stored | ||
| 340 | ;; in the "function slot" of the symbol. But the way they are combined is | ||
| 341 | ;; different depending on whether the definition is a function or a macro. | ||
| 342 | ;; Also if the function definition is nil (i.e. unbound) or is an autoload, | ||
| 343 | ;; the second part is stashed away temporarily in the `advice--pending' | ||
| 344 | ;; symbol property. | ||
| 345 | (or (get symbol 'advice--pending) | ||
| 346 | (advice--strip-macro (symbol-function symbol)))) | ||
| 347 | |||
| 312 | (defun advice--defalias-fset (fsetfun symbol newdef) | 348 | (defun advice--defalias-fset (fsetfun symbol newdef) |
| 349 | (unless fsetfun (setq fsetfun #'fset)) | ||
| 313 | (when (get symbol 'advice--saved-rewrite) | 350 | (when (get symbol 'advice--saved-rewrite) |
| 314 | (put symbol 'advice--saved-rewrite nil)) | 351 | (put symbol 'advice--saved-rewrite nil)) |
| 315 | (setq newdef (advice--normalize symbol newdef)) | 352 | (setq newdef (advice--normalize symbol newdef)) |
| 316 | (let* ((olddef (advice--strip-macro (symbol-function symbol))) | 353 | (let ((oldadv (advice--symbol-function symbol))) |
| 317 | (oldadv | ||
| 318 | (cond | ||
| 319 | ((null (get symbol 'advice--pending)) | ||
| 320 | (or olddef | ||
| 321 | (progn | ||
| 322 | (message "Delayed advice activation failed for %s: no data" | ||
| 323 | symbol) | ||
| 324 | nil))) | ||
| 325 | ((or (not olddef) (autoloadp olddef)) | ||
| 326 | (get symbol 'advice--pending)) | ||
| 327 | (t (message "Dropping left-over advice--pending for %s" symbol) | ||
| 328 | olddef)))) | ||
| 329 | (if (and newdef (not (autoloadp newdef))) | 354 | (if (and newdef (not (autoloadp newdef))) |
| 330 | (let* ((snewdef (advice--strip-macro newdef)) | 355 | (let* ((snewdef (advice--strip-macro newdef)) |
| 331 | (snewadv (advice--subst-main oldadv snewdef))) | 356 | (snewadv (advice--subst-main oldadv snewdef))) |
| 332 | (put symbol 'advice--pending nil) | 357 | (put symbol 'advice--pending nil) |
| 333 | (funcall (or fsetfun #'fset) symbol | 358 | (funcall fsetfun symbol |
| 334 | (if (eq snewdef newdef) snewadv (cons 'macro snewadv)))) | 359 | (if (eq snewdef newdef) snewadv (cons 'macro snewadv)))) |
| 335 | (unless (eq oldadv (get symbol 'advice--pending)) | 360 | (unless (eq oldadv (get symbol 'advice--pending)) |
| 336 | (put symbol 'advice--pending (advice--subst-main oldadv nil))) | 361 | (put symbol 'advice--pending (advice--subst-main oldadv nil))) |
| 337 | (funcall (or fsetfun #'fset) symbol newdef)))) | 362 | (funcall fsetfun symbol newdef)))) |
| 338 | 363 | ||
| 339 | 364 | ||
| 340 | ;;;###autoload | 365 | ;;;###autoload |
| @@ -345,12 +370,10 @@ is defined as a macro, alias, command, ..." | |||
| 345 | ;; TODO: | 370 | ;; TODO: |
| 346 | ;; - record the advice location, to display in describe-function. | 371 | ;; - record the advice location, to display in describe-function. |
| 347 | ;; - change all defadvice in lisp/**/*.el. | 372 | ;; - change all defadvice in lisp/**/*.el. |
| 348 | ;; - rewrite advice.el on top of this. | ||
| 349 | ;; - obsolete advice.el. | 373 | ;; - obsolete advice.el. |
| 350 | (let* ((f (symbol-function symbol)) | 374 | (let* ((f (symbol-function symbol)) |
| 351 | (nf (advice--normalize symbol f))) | 375 | (nf (advice--normalize symbol f))) |
| 352 | (unless (eq f nf) ;; Most importantly, if nf == nil! | 376 | (unless (eq f nf) (fset symbol nf)) |
| 353 | (fset symbol nf)) | ||
| 354 | (add-function where (cond | 377 | (add-function where (cond |
| 355 | ((eq (car-safe nf) 'macro) (cdr nf)) | 378 | ((eq (car-safe nf) 'macro) (cdr nf)) |
| 356 | ;; Reasons to delay installation of the advice: | 379 | ;; Reasons to delay installation of the advice: |
| @@ -377,39 +400,34 @@ or an autoload and it preserves `fboundp'. | |||
| 377 | Instead of the actual function to remove, FUNCTION can also be the `name' | 400 | Instead of the actual function to remove, FUNCTION can also be the `name' |
| 378 | of the piece of advice." | 401 | of the piece of advice." |
| 379 | (let ((f (symbol-function symbol))) | 402 | (let ((f (symbol-function symbol))) |
| 380 | ;; Can't use the `if' place here, because the body is too large, | 403 | (remove-function (cond ;This is `advice--symbol-function' but as a "place". |
| 381 | ;; resulting in use of code that only works with lexical-scoping. | 404 | ((get symbol 'advice--pending) |
| 382 | (remove-function (if (eq (car-safe f) 'macro) | 405 | (get symbol 'advice--pending)) |
| 383 | (cdr f) | 406 | ((eq (car-safe f) 'macro) (cdr f)) |
| 384 | (symbol-function symbol)) | 407 | (t (symbol-function symbol))) |
| 385 | function) | 408 | function) |
| 386 | (unless (advice--p | 409 | (unless (advice--p (advice--symbol-function symbol)) |
| 387 | (if (eq (car-safe f) 'macro) (cdr f) (symbol-function symbol))) | ||
| 388 | ;; Not advised any more. | 410 | ;; Not advised any more. |
| 389 | (remove-function (get symbol 'defalias-fset-function) | 411 | (remove-function (get symbol 'defalias-fset-function) |
| 390 | #'advice--defalias-fset) | 412 | #'advice--defalias-fset) |
| 391 | (if (eq (symbol-function symbol) | 413 | (let ((asr (get symbol 'advice--saved-rewrite))) |
| 392 | (cdr (get symbol 'advice--saved-rewrite))) | 414 | (and asr (eq (cdr-safe (symbol-function symbol)) |
| 393 | (fset symbol (car (get symbol 'advice--saved-rewrite)))))) | 415 | (cdr asr)) |
| 416 | (fset symbol (car (get symbol 'advice--saved-rewrite))))))) | ||
| 394 | nil) | 417 | nil) |
| 395 | 418 | ||
| 396 | (defun advice-mapc (fun def) | 419 | (defun advice-mapc (fun symbol) |
| 397 | "Apply FUN to every advice function in DEF. | 420 | "Apply FUN to every advice function in SYMBOL. |
| 398 | FUN is called with a two arguments: the function that was added, and the | 421 | FUN is called with a two arguments: the function that was added, and the |
| 399 | properties alist that was specified when it was added." | 422 | properties alist that was specified when it was added." |
| 400 | (while (advice--p def) | 423 | (advice-function-mapc fun (advice--symbol-function symbol))) |
| 401 | (funcall fun (advice--car def) (advice--props def)) | ||
| 402 | (setq def (advice--cdr def)))) | ||
| 403 | 424 | ||
| 404 | ;;;###autoload | 425 | ;;;###autoload |
| 405 | (defun advice-member-p (advice function-name) | 426 | (defun advice-member-p (advice symbol) |
| 406 | "Return non-nil if ADVICE has been added to FUNCTION-NAME. | 427 | "Return non-nil if ADVICE has been added to SYMBOL. |
| 407 | Instead of ADVICE being the actual function, it can also be the `name' | 428 | Instead of ADVICE being the actual function, it can also be the `name' |
| 408 | of the piece of advice." | 429 | of the piece of advice." |
| 409 | (advice--member-p advice advice | 430 | (advice-function-member-p advice (advice--symbol-function symbol))) |
| 410 | (or (get function-name 'advice--pending) | ||
| 411 | (advice--strip-macro | ||
| 412 | (symbol-function function-name))))) | ||
| 413 | 431 | ||
| 414 | ;; When code is advised, called-interactively-p needs to be taught to skip | 432 | ;; When code is advised, called-interactively-p needs to be taught to skip |
| 415 | ;; the advising frames. | 433 | ;; the advising frames. |
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index add73fd4bde..7799ee23d62 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -457,19 +457,27 @@ Return the max version (as a string) if the package is held at a lower version." | |||
| 457 | 457 | ||
| 458 | (defun package-activate-1 (pkg-desc) | 458 | (defun package-activate-1 (pkg-desc) |
| 459 | (let* ((name (package-desc-name pkg-desc)) | 459 | (let* ((name (package-desc-name pkg-desc)) |
| 460 | (pkg-dir (package-desc-dir pkg-desc))) | 460 | (pkg-dir (package-desc-dir pkg-desc)) |
| 461 | (pkg-dir-dir (file-name-as-directory pkg-dir))) | ||
| 461 | (unless pkg-dir | 462 | (unless pkg-dir |
| 462 | (error "Internal error: unable to find directory for `%s'" | 463 | (error "Internal error: unable to find directory for `%s'" |
| 463 | (package-desc-full-name pkg-desc))) | 464 | (package-desc-full-name pkg-desc))) |
| 465 | ;; Add to load path, add autoloads, and activate the package. | ||
| 466 | (let ((old-lp load-path)) | ||
| 467 | (with-demoted-errors | ||
| 468 | (load (expand-file-name (format "%s-autoloads" name) pkg-dir) nil t)) | ||
| 469 | (when (and (eq old-lp load-path) | ||
| 470 | (not (or (member pkg-dir load-path) | ||
| 471 | (member pkg-dir-dir load-path)))) | ||
| 472 | ;; Old packages don't add themselves to the `load-path', so we have to | ||
| 473 | ;; do it ourselves. | ||
| 474 | (push pkg-dir load-path))) | ||
| 464 | ;; Add info node. | 475 | ;; Add info node. |
| 465 | (when (file-exists-p (expand-file-name "dir" pkg-dir)) | 476 | (when (file-exists-p (expand-file-name "dir" pkg-dir)) |
| 466 | ;; FIXME: not the friendliest, but simple. | 477 | ;; FIXME: not the friendliest, but simple. |
| 467 | (require 'info) | 478 | (require 'info) |
| 468 | (info-initialize) | 479 | (info-initialize) |
| 469 | (push pkg-dir Info-directory-list)) | 480 | (push pkg-dir Info-directory-list)) |
| 470 | ;; Add to load path, add autoloads, and activate the package. | ||
| 471 | (push pkg-dir load-path) | ||
| 472 | (load (expand-file-name (format "%s-autoloads" name) pkg-dir) nil t) | ||
| 473 | (push name package-activated-list) | 481 | (push name package-activated-list) |
| 474 | ;; Don't return nil. | 482 | ;; Don't return nil. |
| 475 | t)) | 483 | t)) |
| @@ -981,7 +989,7 @@ error. If there is a package, narrow the buffer to the file's | |||
| 981 | boundaries." | 989 | boundaries." |
| 982 | (goto-char (point-min)) | 990 | (goto-char (point-min)) |
| 983 | (unless (re-search-forward "^;;; \\([^ ]*\\)\\.el ---[ \t]*\\(.*?\\)[ \t]*\\(-\\*-.*-\\*-[ \t]*\\)?$" nil t) | 991 | (unless (re-search-forward "^;;; \\([^ ]*\\)\\.el ---[ \t]*\\(.*?\\)[ \t]*\\(-\\*-.*-\\*-[ \t]*\\)?$" nil t) |
| 984 | (error "Packages lacks a file header")) | 992 | (error "Package lacks a file header")) |
| 985 | (let ((file-name (match-string-no-properties 1)) | 993 | (let ((file-name (match-string-no-properties 1)) |
| 986 | (desc (match-string-no-properties 2)) | 994 | (desc (match-string-no-properties 2)) |
| 987 | (start (line-beginning-position))) | 995 | (start (line-beginning-position))) |
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index 50c92518b02..eb2c7f002e8 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el | |||
| @@ -353,23 +353,34 @@ MATCH is the pattern that needs to be matched, of the form: | |||
| 353 | (symbolp . numberp) | 353 | (symbolp . numberp) |
| 354 | (symbolp . consp) | 354 | (symbolp . consp) |
| 355 | (symbolp . arrayp) | 355 | (symbolp . arrayp) |
| 356 | (symbolp . vectorp) | ||
| 356 | (symbolp . stringp) | 357 | (symbolp . stringp) |
| 357 | (symbolp . byte-code-function-p) | 358 | (symbolp . byte-code-function-p) |
| 358 | (integerp . consp) | 359 | (integerp . consp) |
| 359 | (integerp . arrayp) | 360 | (integerp . arrayp) |
| 361 | (integerp . vectorp) | ||
| 360 | (integerp . stringp) | 362 | (integerp . stringp) |
| 361 | (integerp . byte-code-function-p) | 363 | (integerp . byte-code-function-p) |
| 362 | (numberp . consp) | 364 | (numberp . consp) |
| 363 | (numberp . arrayp) | 365 | (numberp . arrayp) |
| 366 | (numberp . vectorp) | ||
| 364 | (numberp . stringp) | 367 | (numberp . stringp) |
| 365 | (numberp . byte-code-function-p) | 368 | (numberp . byte-code-function-p) |
| 366 | (consp . arrayp) | 369 | (consp . arrayp) |
| 370 | (consp . vectorp) | ||
| 367 | (consp . stringp) | 371 | (consp . stringp) |
| 368 | (consp . byte-code-function-p) | 372 | (consp . byte-code-function-p) |
| 369 | (arrayp . stringp) | ||
| 370 | (arrayp . byte-code-function-p) | 373 | (arrayp . byte-code-function-p) |
| 374 | (vectorp . byte-code-function-p) | ||
| 375 | (stringp . vectorp) | ||
| 371 | (stringp . byte-code-function-p))) | 376 | (stringp . byte-code-function-p))) |
| 372 | 377 | ||
| 378 | (defun pcase--mutually-exclusive-p (pred1 pred2) | ||
| 379 | (or (member (cons pred1 pred2) | ||
| 380 | pcase-mutually-exclusive-predicates) | ||
| 381 | (member (cons pred2 pred1) | ||
| 382 | pcase-mutually-exclusive-predicates))) | ||
| 383 | |||
| 373 | (defun pcase--split-match (sym splitter match) | 384 | (defun pcase--split-match (sym splitter match) |
| 374 | (cond | 385 | (cond |
| 375 | ((eq (car match) 'match) | 386 | ((eq (car match) 'match) |
| @@ -433,10 +444,7 @@ MATCH is the pattern that needs to be matched, of the form: | |||
| 433 | ;; A QPattern but not for a cons, can only go to the `else' side. | 444 | ;; A QPattern but not for a cons, can only go to the `else' side. |
| 434 | ((eq (car-safe pat) '\`) '(:pcase--fail . nil)) | 445 | ((eq (car-safe pat) '\`) '(:pcase--fail . nil)) |
| 435 | ((and (eq (car-safe pat) 'pred) | 446 | ((and (eq (car-safe pat) 'pred) |
| 436 | (or (member (cons 'consp (cadr pat)) | 447 | (pcase--mutually-exclusive-p #'consp (cadr pat))) |
| 437 | pcase-mutually-exclusive-predicates) | ||
| 438 | (member (cons (cadr pat) 'consp) | ||
| 439 | pcase-mutually-exclusive-predicates))) | ||
| 440 | '(:pcase--fail . nil)))) | 448 | '(:pcase--fail . nil)))) |
| 441 | 449 | ||
| 442 | (defun pcase--split-equal (elem pat) | 450 | (defun pcase--split-equal (elem pat) |
| @@ -496,11 +504,14 @@ MATCH is the pattern that needs to be matched, of the form: | |||
| 496 | (not (pcase--fgrep (mapcar #'car vars) (cadr upat))))) | 504 | (not (pcase--fgrep (mapcar #'car vars) (cadr upat))))) |
| 497 | '(:pcase--succeed . :pcase--fail)) | 505 | '(:pcase--succeed . :pcase--fail)) |
| 498 | ((and (eq 'pred (car upat)) | 506 | ((and (eq 'pred (car upat)) |
| 499 | (eq 'pred (car-safe pat)) | 507 | (let ((otherpred |
| 500 | (or (member (cons (cadr upat) (cadr pat)) | 508 | (cond ((eq 'pred (car-safe pat)) (cadr pat)) |
| 501 | pcase-mutually-exclusive-predicates) | 509 | ((not (eq '\` (car-safe pat))) nil) |
| 502 | (member (cons (cadr pat) (cadr upat)) | 510 | ((consp (cadr pat)) #'consp) |
| 503 | pcase-mutually-exclusive-predicates))) | 511 | ((vectorp (cadr pat)) #'vectorp) |
| 512 | ((byte-code-function-p (cadr pat)) | ||
| 513 | #'byte-code-function-p)))) | ||
| 514 | (pcase--mutually-exclusive-p (cadr upat) otherpred))) | ||
| 504 | '(:pcase--fail . nil)) | 515 | '(:pcase--fail . nil)) |
| 505 | ((and (eq 'pred (car upat)) | 516 | ((and (eq 'pred (car upat)) |
| 506 | (eq '\` (car-safe pat)) | 517 | (eq '\` (car-safe pat)) |
diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index b7e553272f2..4cb089aca97 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el | |||
| @@ -127,8 +127,7 @@ after OUT-BUFFER-NAME." | |||
| 127 | "Evaluate EXPRESSION and pretty-print its value. | 127 | "Evaluate EXPRESSION and pretty-print its value. |
| 128 | Also add the value to the front of the list in the variable `values'." | 128 | Also add the value to the front of the list in the variable `values'." |
| 129 | (interactive | 129 | (interactive |
| 130 | (list (read-from-minibuffer "Eval: " nil read-expression-map t | 130 | (list (read--expression "Eval: "))) |
| 131 | 'read-expression-history))) | ||
| 132 | (message "Evaluating...") | 131 | (message "Evaluating...") |
| 133 | (setq values (cons (eval expression) values)) | 132 | (setq values (cons (eval expression) values)) |
| 134 | (pp-display-expression (car values) "*Pp Eval Output*")) | 133 | (pp-display-expression (car values) "*Pp Eval Output*")) |
| @@ -137,8 +136,7 @@ Also add the value to the front of the list in the variable `values'." | |||
| 137 | (defun pp-macroexpand-expression (expression) | 136 | (defun pp-macroexpand-expression (expression) |
| 138 | "Macroexpand EXPRESSION and pretty-print its value." | 137 | "Macroexpand EXPRESSION and pretty-print its value." |
| 139 | (interactive | 138 | (interactive |
| 140 | (list (read-from-minibuffer "Macroexpand: " nil read-expression-map t | 139 | (list (read--expression "Macroexpand: "))) |
| 141 | 'read-expression-history))) | ||
| 142 | (pp-display-expression (macroexpand expression) "*Pp Macroexpand Output*")) | 140 | (pp-display-expression (macroexpand expression) "*Pp Macroexpand Output*")) |
| 143 | 141 | ||
| 144 | (defun pp-last-sexp () | 142 | (defun pp-last-sexp () |
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index 0aa31f717ed..1ee3cec15a6 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el | |||
| @@ -55,31 +55,29 @@ | |||
| 55 | (defsubst timer--check (timer) | 55 | (defsubst timer--check (timer) |
| 56 | (or (timerp timer) (signal 'wrong-type-argument (list #'timerp timer)))) | 56 | (or (timerp timer) (signal 'wrong-type-argument (list #'timerp timer)))) |
| 57 | 57 | ||
| 58 | (defun timer--time-setter (timer time) | ||
| 59 | (timer--check timer) | ||
| 60 | (setf (timer--high-seconds timer) (pop time)) | ||
| 61 | (let ((low time) (usecs 0) (psecs 0)) | ||
| 62 | (when (consp time) | ||
| 63 | (setq low (pop time)) | ||
| 64 | (when time | ||
| 65 | (setq usecs (pop time)) | ||
| 66 | (when time | ||
| 67 | (setq psecs (car time))))) | ||
| 68 | (setf (timer--low-seconds timer) low) | ||
| 69 | (setf (timer--usecs timer) usecs) | ||
| 70 | (setf (timer--psecs timer) psecs) | ||
| 71 | time)) | ||
| 72 | |||
| 58 | ;; Pseudo field `time'. | 73 | ;; Pseudo field `time'. |
| 59 | (defun timer--time (timer) | 74 | (defun timer--time (timer) |
| 75 | (declare (gv-setter timer--time-setter)) | ||
| 60 | (list (timer--high-seconds timer) | 76 | (list (timer--high-seconds timer) |
| 61 | (timer--low-seconds timer) | 77 | (timer--low-seconds timer) |
| 62 | (timer--usecs timer) | 78 | (timer--usecs timer) |
| 63 | (timer--psecs timer))) | 79 | (timer--psecs timer))) |
| 64 | 80 | ||
| 65 | (gv-define-simple-setter timer--time | ||
| 66 | (lambda (timer time) | ||
| 67 | (timer--check timer) | ||
| 68 | (setf (timer--high-seconds timer) (pop time)) | ||
| 69 | (let ((low time) (usecs 0) (psecs 0)) | ||
| 70 | (if (consp time) | ||
| 71 | (progn | ||
| 72 | (setq low (pop time)) | ||
| 73 | (if time | ||
| 74 | (progn | ||
| 75 | (setq usecs (pop time)) | ||
| 76 | (if time | ||
| 77 | (setq psecs (car time))))))) | ||
| 78 | (setf (timer--low-seconds timer) low) | ||
| 79 | (setf (timer--usecs timer) usecs) | ||
| 80 | (setf (timer--psecs timer) psecs)))) | ||
| 81 | |||
| 82 | |||
| 83 | (defun timer-set-time (timer time &optional delta) | 81 | (defun timer-set-time (timer time &optional delta) |
| 84 | "Set the trigger time of TIMER to TIME. | 82 | "Set the trigger time of TIMER to TIME. |
| 85 | TIME must be in the internal format returned by, e.g., `current-time'. | 83 | TIME must be in the internal format returned by, e.g., `current-time'. |
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index 973768b50ef..292fd401a56 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el | |||
| @@ -1298,7 +1298,7 @@ If ARG is the atom `-', scroll upward by nearly full screen." | |||
| 1298 | (mark t) (point) cua--explicit-region-start)))) | 1298 | (mark t) (point) cua--explicit-region-start)))) |
| 1299 | 1299 | ||
| 1300 | ;; Disable transient-mark-mode if rectangle active in current buffer. | 1300 | ;; Disable transient-mark-mode if rectangle active in current buffer. |
| 1301 | (if (not (window-minibuffer-p (selected-window))) | 1301 | (if (not (window-minibuffer-p)) |
| 1302 | (setq transient-mark-mode (and (not cua--rectangle) | 1302 | (setq transient-mark-mode (and (not cua--rectangle) |
| 1303 | (if cua-highlight-region-shift-only | 1303 | (if cua-highlight-region-shift-only |
| 1304 | (not cua--explicit-region-start) | 1304 | (not cua--explicit-region-start) |
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index 76d4632f8c0..aa90344d195 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el | |||
| @@ -690,7 +690,7 @@ to a new place after repeating previous Vi command." | |||
| 690 | the window will be scrolled up or down appropriately, to reveal context. | 690 | the window will be scrolled up or down appropriately, to reveal context. |
| 691 | If you want Viper search to behave as usual in Vi, set this variable to a | 691 | If you want Viper search to behave as usual in Vi, set this variable to a |
| 692 | negative number." | 692 | negative number." |
| 693 | :type 'boolean | 693 | :type 'integer |
| 694 | :group 'viper-search) | 694 | :group 'viper-search) |
| 695 | 695 | ||
| 696 | (defcustom viper-re-query-replace t | 696 | (defcustom viper-re-query-replace t |
diff --git a/lisp/epa-hook.el b/lisp/epa-hook.el index fc0aa3677bf..f320823a5ab 100644 --- a/lisp/epa-hook.el +++ b/lisp/epa-hook.el | |||
| @@ -53,15 +53,15 @@ does that automatically." | |||
| 53 | May either be a string or a list of strings.") | 53 | May either be a string or a list of strings.") |
| 54 | 54 | ||
| 55 | (put 'epa-file-encrypt-to 'safe-local-variable | 55 | (put 'epa-file-encrypt-to 'safe-local-variable |
| 56 | (lambda (val) | 56 | #'(lambda (val) |
| 57 | (or (stringp val) | 57 | (or (stringp val) |
| 58 | (and (listp val) | 58 | (and (listp val) |
| 59 | (catch 'safe | 59 | (catch 'safe |
| 60 | (mapc (lambda (elt) | 60 | (mapc (lambda (elt) |
| 61 | (unless (stringp elt) | 61 | (unless (stringp elt) |
| 62 | (throw 'safe nil))) | 62 | (throw 'safe nil))) |
| 63 | val) | 63 | val) |
| 64 | t))))) | 64 | t))))) |
| 65 | 65 | ||
| 66 | (put 'epa-file-encrypt-to 'permanent-local t) | 66 | (put 'epa-file-encrypt-to 'permanent-local t) |
| 67 | 67 | ||
diff --git a/lisp/epg.el b/lisp/epg.el index 06d972d6ffa..bcd91d8abba 100644 --- a/lisp/epg.el +++ b/lisp/epg.el | |||
| @@ -162,8 +162,7 @@ | |||
| 162 | 162 | ||
| 163 | (defvar epg-prompt-alist nil) | 163 | (defvar epg-prompt-alist nil) |
| 164 | 164 | ||
| 165 | (put 'epg-error 'error-conditions '(epg-error error)) | 165 | (define-error 'epg-error "GPG error") |
| 166 | (put 'epg-error 'error-message "GPG error") | ||
| 167 | 166 | ||
| 168 | (defun epg-make-data-from-file (file) | 167 | (defun epg-make-data-from-file (file) |
| 169 | "Make a data object from FILE." | 168 | "Make a data object from FILE." |
| @@ -1279,37 +1278,34 @@ This function is for internal use only." | |||
| 1279 | 1278 | ||
| 1280 | (defun epg--process-filter (process input) | 1279 | (defun epg--process-filter (process input) |
| 1281 | (if epg-debug | 1280 | (if epg-debug |
| 1282 | (save-excursion | 1281 | (with-current-buffer |
| 1283 | (unless epg-debug-buffer | 1282 | (or epg-debug-buffer |
| 1284 | (setq epg-debug-buffer (generate-new-buffer " *epg-debug*"))) | 1283 | (setq epg-debug-buffer (generate-new-buffer " *epg-debug*"))) |
| 1285 | (set-buffer epg-debug-buffer) | ||
| 1286 | (goto-char (point-max)) | 1284 | (goto-char (point-max)) |
| 1287 | (insert input))) | 1285 | (insert input))) |
| 1288 | (if (buffer-live-p (process-buffer process)) | 1286 | (if (buffer-live-p (process-buffer process)) |
| 1289 | (with-current-buffer (process-buffer process) | 1287 | (with-current-buffer (process-buffer process) |
| 1290 | (goto-char (point-max)) | 1288 | (save-excursion |
| 1291 | (insert input) | 1289 | (goto-char (point-max)) |
| 1292 | (unless epg-process-filter-running | 1290 | (insert input) |
| 1293 | (unwind-protect | 1291 | (unless epg-process-filter-running |
| 1294 | (progn | 1292 | (let ((epg-process-filter-running t)) |
| 1295 | (setq epg-process-filter-running t) | 1293 | (goto-char epg-read-point) |
| 1296 | (goto-char epg-read-point) | 1294 | (beginning-of-line) |
| 1297 | (beginning-of-line) | 1295 | (while (looking-at ".*\n") ;the input line finished |
| 1298 | (while (looking-at ".*\n") ;the input line finished | 1296 | (if (looking-at "\\[GNUPG:] \\([A-Z_]+\\) ?\\(.*\\)") |
| 1299 | (if (looking-at "\\[GNUPG:] \\([A-Z_]+\\) ?\\(.*\\)") | 1297 | (let* ((status (match-string 1)) |
| 1300 | (let* ((status (match-string 1)) | 1298 | (string (match-string 2)) |
| 1301 | (string (match-string 2)) | 1299 | (symbol (intern-soft (concat "epg--status-" |
| 1302 | (symbol (intern-soft (concat "epg--status-" | 1300 | status)))) |
| 1303 | status)))) | 1301 | (if (member status epg-pending-status-list) |
| 1304 | (if (member status epg-pending-status-list) | 1302 | (setq epg-pending-status-list nil)) |
| 1305 | (setq epg-pending-status-list nil)) | 1303 | (if (and symbol |
| 1306 | (if (and symbol | 1304 | (fboundp symbol)) |
| 1307 | (fboundp symbol)) | 1305 | (funcall symbol epg-context string)) |
| 1308 | (funcall symbol epg-context string)) | 1306 | (setq epg-last-status (cons status string)))) |
| 1309 | (setq epg-last-status (cons status string)))) | 1307 | (forward-line) |
| 1310 | (forward-line) | 1308 | (setq epg-read-point (point))))))))) |
| 1311 | (setq epg-read-point (point)))) | ||
| 1312 | (setq epg-process-filter-running nil)))))) | ||
| 1313 | 1309 | ||
| 1314 | (defun epg-read-output (context) | 1310 | (defun epg-read-output (context) |
| 1315 | "Read the output file CONTEXT and return the content as a string." | 1311 | "Read the output file CONTEXT and return the content as a string." |
| @@ -1346,7 +1342,7 @@ This function is for internal use only." | |||
| 1346 | (> (float-time (or (nth 5 (file-attributes epg-agent-file)) | 1342 | (> (float-time (or (nth 5 (file-attributes epg-agent-file)) |
| 1347 | '(0 0 0 0))) | 1343 | '(0 0 0 0))) |
| 1348 | (float-time epg-agent-mtime)))) | 1344 | (float-time epg-agent-mtime)))) |
| 1349 | (redraw-frame (selected-frame))) | 1345 | (redraw-frame)) |
| 1350 | (epg-context-set-result-for | 1346 | (epg-context-set-result-for |
| 1351 | context 'error | 1347 | context 'error |
| 1352 | (nreverse (epg-context-result-for context 'error)))) | 1348 | (nreverse (epg-context-result-for context 'error)))) |
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index a23fa508c46..e0628dbb80a 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog | |||
| @@ -1,3 +1,34 @@ | |||
| 1 | 2013-08-22 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * erc.el: Use lexical-binding. | ||
| 4 | (erc-user-full-name): Minor CSE simplification. | ||
| 5 | (erc-mode-map): Assume command-remapping is available. | ||
| 6 | (erc-once-with-server-event): Replace `forms' arg with a function arg. | ||
| 7 | (erc-once-with-server-event-global): Remove. | ||
| 8 | (erc-ison-p): Adjust to change in erc-once-with-server-event. | ||
| 9 | (erc-get-buffer-create): Remove arg `proc'. | ||
| 10 | (iswitchb-make-buflist-hook): Declare. | ||
| 11 | (erc-setup-buffer): Use pcase; avoid ((lambda ..) ..). | ||
| 12 | (read-passwd): Assume it exists. | ||
| 13 | (erc-display-line, erc-cmd-IDLE): Avoid add-to-list, adjust to change | ||
| 14 | in erc-once-with-server-event. | ||
| 15 | (erc-cmd-JOIN, erc-set-channel-limit, erc-set-channel-key) | ||
| 16 | (erc-add-query): Minor CSE simplification. | ||
| 17 | (erc-cmd-BANLIST, erc-cmd-MASSUNBAN): Adjust to change | ||
| 18 | in erc-once-with-server-event. | ||
| 19 | (erc-echo-notice-in-user-and-target-buffers): Avoid add-to-list. | ||
| 20 | * erc-track.el: Use lexical-binding. | ||
| 21 | (erc-make-mode-line-buffer-name): Use closures instead of `(lambda...). | ||
| 22 | (erc-faces-in): Avoid add-to-list. | ||
| 23 | * erc-notify.el: Use lexical-binding. | ||
| 24 | (erc-notify-timer): Adjust to change in erc-once-with-server-event. | ||
| 25 | (erc-notify-QUIT): Use a closure instead of `(lambda...). | ||
| 26 | * erc-list.el: Use lexical-binding. | ||
| 27 | (erc-list-install-322-handler, erc-cmd-LIST): Adjust to change in | ||
| 28 | erc-once-with-server-event. | ||
| 29 | * erc-button.el: Use lexical-binding. | ||
| 30 | (erc-button-next-function): Use a closure instead of `(lambda...). | ||
| 31 | |||
| 1 | 2013-05-30 Glenn Morris <rgm@gnu.org> | 32 | 2013-05-30 Glenn Morris <rgm@gnu.org> |
| 2 | 33 | ||
| 3 | * erc-backend.el: Require erc at run-time too. | 34 | * erc-backend.el: Require erc at run-time too. |
diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el index 24150138e12..ac8600c57fd 100644 --- a/lisp/erc/erc-button.el +++ b/lisp/erc/erc-button.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;; erc-button.el --- A way of buttonizing certain things in ERC buffers | 1 | ;; erc-button.el --- A way of buttonizing certain things in ERC buffers -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1996-2004, 2006-2013 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1996-2004, 2006-2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -432,19 +432,22 @@ call it with the value of the `erc-data' text property." | |||
| 432 | (defun erc-button-next-function () | 432 | (defun erc-button-next-function () |
| 433 | "Pseudo completion function that actually jumps to the next button. | 433 | "Pseudo completion function that actually jumps to the next button. |
| 434 | For use on `completion-at-point-functions'." | 434 | For use on `completion-at-point-functions'." |
| 435 | (when (< (point) (erc-beg-of-input-line)) | 435 | ;; FIXME: This is an abuse of completion-at-point-functions. |
| 436 | `(lambda () | 436 | (when (< (point) (erc-beg-of-input-line)) |
| 437 | (let ((here ,(point))) | 437 | (let ((start (point))) |
| 438 | (while (and (get-text-property here 'erc-callback) | 438 | (lambda () |
| 439 | (not (= here (point-max)))) | 439 | (let ((here start)) |
| 440 | (setq here (1+ here))) | 440 | ;; FIXME: Use next-single-property-change. |
| 441 | (while (and (not (get-text-property here 'erc-callback)) | 441 | (while (and (get-text-property here 'erc-callback) |
| 442 | (not (= here (point-max)))) | 442 | (not (= here (point-max)))) |
| 443 | (setq here (1+ here))) | 443 | (setq here (1+ here))) |
| 444 | (if (< here (point-max)) | 444 | (while (not (or (get-text-property here 'erc-callback) |
| 445 | (goto-char here) | 445 | (= here (point-max)))) |
| 446 | (error "No next button")) | 446 | (setq here (1+ here))) |
| 447 | t)))) | 447 | (if (< here (point-max)) |
| 448 | (goto-char here) | ||
| 449 | (error "No next button")) | ||
| 450 | t))))) | ||
| 448 | 451 | ||
| 449 | (defun erc-button-next () | 452 | (defun erc-button-next () |
| 450 | "Go to the next button in this buffer." | 453 | "Go to the next button in this buffer." |
diff --git a/lisp/erc/erc-list.el b/lisp/erc/erc-list.el index f11dd98ca37..c243073790e 100644 --- a/lisp/erc/erc-list.el +++ b/lisp/erc/erc-list.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; erc-list.el --- /list support for ERC | 1 | ;;; erc-list.el --- /list support for ERC -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2008-2013 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2008-2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -183,7 +183,7 @@ | |||
| 183 | ;; Arrange for 323 (end of list) to end this. | 183 | ;; Arrange for 323 (end of list) to end this. |
| 184 | (erc-once-with-server-event | 184 | (erc-once-with-server-event |
| 185 | 323 | 185 | 323 |
| 186 | '(progn | 186 | (lambda (_proc _parsed) |
| 187 | (remove-hook 'erc-server-322-functions 'erc-list-handle-322 t))) | 187 | (remove-hook 'erc-server-322-functions 'erc-list-handle-322 t))) |
| 188 | ;; Find the list buffer, empty it, and display it. | 188 | ;; Find the list buffer, empty it, and display it. |
| 189 | (set (make-local-variable 'erc-list-buffer) | 189 | (set (make-local-variable 'erc-list-buffer) |
| @@ -209,11 +209,12 @@ should usually be one or more channels, separated by commas. | |||
| 209 | Please note that this function only works with IRC servers which conform | 209 | Please note that this function only works with IRC servers which conform |
| 210 | to RFC and send the LIST header (#321) at start of list transmission." | 210 | to RFC and send the LIST header (#321) at start of list transmission." |
| 211 | (erc-with-server-buffer | 211 | (erc-with-server-buffer |
| 212 | (set (make-local-variable 'erc-list-last-argument) line) | 212 | (set (make-local-variable 'erc-list-last-argument) line) |
| 213 | (erc-once-with-server-event | 213 | (erc-once-with-server-event |
| 214 | 321 | 214 | 321 |
| 215 | (list 'progn | 215 | (let ((buf (current-buffer))) |
| 216 | (list 'erc-list-install-322-handler (current-buffer))))) | 216 | (lambda (_proc _parsed) |
| 217 | (erc-list-install-322-handler buf))))) | ||
| 217 | (erc-server-send (concat "LIST :" (or (and line (substring line 1)) | 218 | (erc-server-send (concat "LIST :" (or (and line (substring line 1)) |
| 218 | "")))) | 219 | "")))) |
| 219 | (put 'erc-cmd-LIST 'do-not-parse-args t) | 220 | (put 'erc-cmd-LIST 'do-not-parse-args t) |
diff --git a/lisp/erc/erc-notify.el b/lisp/erc/erc-notify.el index db7067eec08..064bb53f215 100644 --- a/lisp/erc/erc-notify.el +++ b/lisp/erc/erc-notify.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; erc-notify.el --- Online status change notification | 1 | ;;; erc-notify.el --- Online status change notification -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002-2004, 2006-2013 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002-2004, 2006-2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -115,27 +115,28 @@ changes." | |||
| 115 | erc-notify-interval)) | 115 | erc-notify-interval)) |
| 116 | (erc-once-with-server-event | 116 | (erc-once-with-server-event |
| 117 | 303 | 117 | 303 |
| 118 | '(let* ((server (erc-response.sender parsed)) | 118 | (lambda (proc parsed) |
| 119 | (ison-list (delete "" (split-string | 119 | (let* ((server (erc-response.sender parsed)) |
| 120 | (erc-response.contents parsed)))) | 120 | (ison-list (delete "" (split-string |
| 121 | (new-list ison-list) | 121 | (erc-response.contents parsed)))) |
| 122 | (old-list (erc-with-server-buffer erc-last-ison))) | 122 | (new-list ison-list) |
| 123 | (while new-list | 123 | (old-list (erc-with-server-buffer erc-last-ison))) |
| 124 | (when (not (erc-member-ignore-case (car new-list) old-list)) | 124 | (while new-list |
| 125 | (run-hook-with-args 'erc-notify-signon-hook server (car new-list)) | 125 | (when (not (erc-member-ignore-case (car new-list) old-list)) |
| 126 | (erc-display-message | 126 | (run-hook-with-args 'erc-notify-signon-hook server (car new-list)) |
| 127 | parsed 'notice proc | 127 | (erc-display-message |
| 128 | 'notify_on ?n (car new-list) ?m (erc-network-name))) | 128 | parsed 'notice proc |
| 129 | (setq new-list (cdr new-list))) | 129 | 'notify_on ?n (car new-list) ?m (erc-network-name))) |
| 130 | (while old-list | 130 | (setq new-list (cdr new-list))) |
| 131 | (when (not (erc-member-ignore-case (car old-list) ison-list)) | 131 | (while old-list |
| 132 | (run-hook-with-args 'erc-notify-signoff-hook server (car old-list)) | 132 | (when (not (erc-member-ignore-case (car old-list) ison-list)) |
| 133 | (erc-display-message | 133 | (run-hook-with-args 'erc-notify-signoff-hook server (car old-list)) |
| 134 | parsed 'notice proc | 134 | (erc-display-message |
| 135 | 'notify_off ?n (car old-list) ?m (erc-network-name))) | 135 | parsed 'notice proc |
| 136 | (setq old-list (cdr old-list))) | 136 | 'notify_off ?n (car old-list) ?m (erc-network-name))) |
| 137 | (setq erc-last-ison ison-list) | 137 | (setq old-list (cdr old-list))) |
| 138 | t)) | 138 | (setq erc-last-ison ison-list) |
| 139 | t))) | ||
| 139 | (erc-server-send | 140 | (erc-server-send |
| 140 | (concat "ISON " (mapconcat 'identity erc-notify-list " "))) | 141 | (concat "ISON " (mapconcat 'identity erc-notify-list " "))) |
| 141 | (setq erc-last-ison-time now))) | 142 | (setq erc-last-ison-time now))) |
| @@ -179,10 +180,11 @@ nick from `erc-last-ison' to prevent any further notifications." | |||
| 179 | (let ((nick (erc-extract-nick (erc-response.sender parsed)))) | 180 | (let ((nick (erc-extract-nick (erc-response.sender parsed)))) |
| 180 | (when (and (erc-member-ignore-case nick erc-notify-list) | 181 | (when (and (erc-member-ignore-case nick erc-notify-list) |
| 181 | (erc-member-ignore-case nick erc-last-ison)) | 182 | (erc-member-ignore-case nick erc-last-ison)) |
| 182 | (setq erc-last-ison (erc-delete-if `(lambda (el) | 183 | (setq erc-last-ison (erc-delete-if |
| 183 | (string= ,(erc-downcase nick) | 184 | (let ((nick-down (erc-downcase nick))) |
| 184 | (erc-downcase el))) | 185 | (lambda (el) |
| 185 | erc-last-ison)) | 186 | (string= nick-down (erc-downcase el)))) |
| 187 | erc-last-ison)) | ||
| 186 | (run-hook-with-args 'erc-notify-signoff-hook | 188 | (run-hook-with-args 'erc-notify-signoff-hook |
| 187 | (or erc-server-announced-name erc-session-server) | 189 | (or erc-server-announced-name erc-session-server) |
| 188 | nick) | 190 | nick) |
diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el index 054c135fa67..e6d5b3119a2 100644 --- a/lisp/erc/erc-track.el +++ b/lisp/erc/erc-track.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; erc-track.el --- Track modified channel buffers | 1 | ;;; erc-track.el --- Track modified channel buffers -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2002-2013 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2002-2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -710,7 +710,7 @@ inactive." | |||
| 710 | to consider when `erc-track-visibility' is set to | 710 | to consider when `erc-track-visibility' is set to |
| 711 | only consider active buffers visible.") | 711 | only consider active buffers visible.") |
| 712 | 712 | ||
| 713 | (defun erc-user-is-active (&rest ignore) | 713 | (defun erc-user-is-active (&rest _ignore) |
| 714 | "Set `erc-buffer-activity'." | 714 | "Set `erc-buffer-activity'." |
| 715 | (when erc-server-connected | 715 | (when erc-server-connected |
| 716 | (setq erc-buffer-activity (erc-current-time)) | 716 | (setq erc-buffer-activity (erc-current-time)) |
| @@ -745,7 +745,7 @@ only consider active buffers visible.") | |||
| 745 | times. Without it, you cannot debug `erc-modified-channels-display', | 745 | times. Without it, you cannot debug `erc-modified-channels-display', |
| 746 | because the debugger also cases changes to the window-configuration.") | 746 | because the debugger also cases changes to the window-configuration.") |
| 747 | 747 | ||
| 748 | (defun erc-modified-channels-update (&rest args) | 748 | (defun erc-modified-channels-update (&rest _args) |
| 749 | "This function updates the information in `erc-modified-channels-alist' | 749 | "This function updates the information in `erc-modified-channels-alist' |
| 750 | according to buffer visibility. It calls | 750 | according to buffer visibility. It calls |
| 751 | `erc-modified-channels-display' at the end. This should usually be | 751 | `erc-modified-channels-display' at the end. This should usually be |
| @@ -791,19 +791,19 @@ If FACES are provided, color STRING with them." | |||
| 791 | (int-to-string count)) | 791 | (int-to-string count)) |
| 792 | (copy-sequence string)))) | 792 | (copy-sequence string)))) |
| 793 | (define-key map (vector 'mode-line 'mouse-2) | 793 | (define-key map (vector 'mode-line 'mouse-2) |
| 794 | `(lambda (e) | 794 | (lambda (e) |
| 795 | (interactive "e") | 795 | (interactive "e") |
| 796 | (save-selected-window | 796 | (save-selected-window |
| 797 | (select-window | 797 | (select-window |
| 798 | (posn-window (event-start e))) | 798 | (posn-window (event-start e))) |
| 799 | (switch-to-buffer ,buffer)))) | 799 | (switch-to-buffer buffer)))) |
| 800 | (define-key map (vector 'mode-line 'mouse-3) | 800 | (define-key map (vector 'mode-line 'mouse-3) |
| 801 | `(lambda (e) | 801 | (lambda (e) |
| 802 | (interactive "e") | 802 | (interactive "e") |
| 803 | (save-selected-window | 803 | (save-selected-window |
| 804 | (select-window | 804 | (select-window |
| 805 | (posn-window (event-start e))) | 805 | (posn-window (event-start e))) |
| 806 | (switch-to-buffer-other-window ,buffer)))) | 806 | (switch-to-buffer-other-window buffer)))) |
| 807 | (put-text-property 0 (length name) 'local-map map name) | 807 | (put-text-property 0 (length name) 'local-map map name) |
| 808 | (put-text-property | 808 | (put-text-property |
| 809 | 0 (length name) | 809 | 0 (length name) |
| @@ -976,8 +976,9 @@ is in `erc-mode'." | |||
| 976 | cur) | 976 | cur) |
| 977 | (while (and (setq i (next-single-property-change i 'face str m)) | 977 | (while (and (setq i (next-single-property-change i 'face str m)) |
| 978 | (not (= i m))) | 978 | (not (= i m))) |
| 979 | (when (setq cur (get-text-property i 'face str)) | 979 | (and (setq cur (get-text-property i 'face str)) |
| 980 | (add-to-list 'faces cur))) | 980 | (not (member cur faces)) |
| 981 | (push cur faces))) | ||
| 981 | faces)) | 982 | faces)) |
| 982 | 983 | ||
| 983 | (cl-assert | 984 | (cl-assert |
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index b2724b9737f..0bfd21d6c3a 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;; erc.el --- An Emacs Internet Relay Chat client | 1 | ;; erc.el --- An Emacs Internet Relay Chat client -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997-2013 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997-2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -125,20 +125,11 @@ | |||
| 125 | 125 | ||
| 126 | ;; compatibility with older ERC releases | 126 | ;; compatibility with older ERC releases |
| 127 | 127 | ||
| 128 | (if (fboundp 'defvaralias) | 128 | (define-obsolete-variable-alias 'erc-announced-server-name |
| 129 | (progn | 129 | 'erc-server-announced-name "ERC 5.1") |
| 130 | (defvaralias 'erc-announced-server-name 'erc-server-announced-name) | 130 | (define-obsolete-variable-alias 'erc-process 'erc-server-process "ERC 5.1") |
| 131 | (erc-make-obsolete-variable 'erc-announced-server-name | 131 | (define-obsolete-variable-alias 'erc-default-coding-system |
| 132 | 'erc-server-announced-name | 132 | 'erc-server-coding-system "ERC 5.1") |
| 133 | "ERC 5.1") | ||
| 134 | (defvaralias 'erc-process 'erc-server-process) | ||
| 135 | (erc-make-obsolete-variable 'erc-process 'erc-server-process "ERC 5.1") | ||
| 136 | (defvaralias 'erc-default-coding-system 'erc-server-coding-system) | ||
| 137 | (erc-make-obsolete-variable 'erc-default-coding-system | ||
| 138 | 'erc-server-coding-system | ||
| 139 | "ERC 5.1")) | ||
| 140 | (message (concat "ERC: The function `defvaralias' is not bound. See the " | ||
| 141 | "NEWS file for variable name changes since ERC 5.0.4."))) | ||
| 142 | 133 | ||
| 143 | (define-obsolete-function-alias 'erc-send-command | 134 | (define-obsolete-function-alias 'erc-send-command |
| 144 | 'erc-server-send "ERC 5.1") | 135 | 'erc-server-send "ERC 5.1") |
| @@ -201,9 +192,7 @@ parameters and authentication." | |||
| 201 | (string :tag "Name") | 192 | (string :tag "Name") |
| 202 | (function :tag "Get from function")) | 193 | (function :tag "Get from function")) |
| 203 | :set (lambda (sym val) | 194 | :set (lambda (sym val) |
| 204 | (if (functionp val) | 195 | (set sym (if (functionp val) (funcall val) val)))) |
| 205 | (set sym (funcall val)) | ||
| 206 | (set sym val)))) | ||
| 207 | 196 | ||
| 208 | (defvar erc-password nil | 197 | (defvar erc-password nil |
| 209 | "Password to use when authenticating to an IRC server. | 198 | "Password to use when authenticating to an IRC server. |
| @@ -388,12 +377,12 @@ If no server buffer exists, return nil." | |||
| 388 | (last-message-time nil)) | 377 | (last-message-time nil)) |
| 389 | 378 | ||
| 390 | (defsubst erc-get-channel-user (nick) | 379 | (defsubst erc-get-channel-user (nick) |
| 391 | "Finds the (USER . CHANNEL-DATA) element corresponding to NICK | 380 | "Find the (USER . CHANNEL-DATA) element corresponding to NICK |
| 392 | in the current buffer's `erc-channel-users' hash table." | 381 | in the current buffer's `erc-channel-users' hash table." |
| 393 | (gethash (erc-downcase nick) erc-channel-users)) | 382 | (gethash (erc-downcase nick) erc-channel-users)) |
| 394 | 383 | ||
| 395 | (defsubst erc-get-server-user (nick) | 384 | (defsubst erc-get-server-user (nick) |
| 396 | "Finds the USER corresponding to NICK in the current server's | 385 | "Find the USER corresponding to NICK in the current server's |
| 397 | `erc-server-users' hash table." | 386 | `erc-server-users' hash table." |
| 398 | (erc-with-server-buffer | 387 | (erc-with-server-buffer |
| 399 | (gethash (erc-downcase nick) erc-server-users))) | 388 | (gethash (erc-downcase nick) erc-server-users))) |
| @@ -480,7 +469,7 @@ Removes all users in the current channel. This is called by | |||
| 480 | (when (and erc-server-connected | 469 | (when (and erc-server-connected |
| 481 | (erc-server-process-alive) | 470 | (erc-server-process-alive) |
| 482 | (hash-table-p erc-channel-users)) | 471 | (hash-table-p erc-channel-users)) |
| 483 | (maphash (lambda (nick cdata) | 472 | (maphash (lambda (nick _cdata) |
| 484 | (erc-remove-channel-user nick)) | 473 | (erc-remove-channel-user nick)) |
| 485 | erc-channel-users) | 474 | erc-channel-users) |
| 486 | (clrhash erc-channel-users))) | 475 | (clrhash erc-channel-users))) |
| @@ -502,25 +491,25 @@ Removes all users in the current channel. This is called by | |||
| 502 | (erc-channel-user-voice (cdr cdata)))))) | 491 | (erc-channel-user-voice (cdr cdata)))))) |
| 503 | 492 | ||
| 504 | (defun erc-get-channel-user-list () | 493 | (defun erc-get-channel-user-list () |
| 505 | "Returns a list of users in the current channel. Each element | 494 | "Return a list of users in the current channel. Each element |
| 506 | of the list is of the form (USER . CHANNEL-DATA), where USER is | 495 | of the list is of the form (USER . CHANNEL-DATA), where USER is |
| 507 | an erc-server-user struct, and CHANNEL-DATA is either `nil' or an | 496 | an erc-server-user struct, and CHANNEL-DATA is either nil or an |
| 508 | erc-channel-user struct. | 497 | erc-channel-user struct. |
| 509 | 498 | ||
| 510 | See also: `erc-sort-channel-users-by-activity'" | 499 | See also: `erc-sort-channel-users-by-activity'" |
| 511 | (let (users) | 500 | (let (users) |
| 512 | (if (hash-table-p erc-channel-users) | 501 | (if (hash-table-p erc-channel-users) |
| 513 | (maphash (lambda (nick cdata) | 502 | (maphash (lambda (_nick cdata) |
| 514 | (setq users (cons cdata users))) | 503 | (setq users (cons cdata users))) |
| 515 | erc-channel-users)) | 504 | erc-channel-users)) |
| 516 | users)) | 505 | users)) |
| 517 | 506 | ||
| 518 | (defun erc-get-server-nickname-list () | 507 | (defun erc-get-server-nickname-list () |
| 519 | "Returns a list of known nicknames on the current server." | 508 | "Return a list of known nicknames on the current server." |
| 520 | (erc-with-server-buffer | 509 | (erc-with-server-buffer |
| 521 | (let (nicks) | 510 | (let (nicks) |
| 522 | (when (hash-table-p erc-server-users) | 511 | (when (hash-table-p erc-server-users) |
| 523 | (maphash (lambda (n user) | 512 | (maphash (lambda (_n user) |
| 524 | (setq nicks | 513 | (setq nicks |
| 525 | (cons (erc-server-user-nickname user) | 514 | (cons (erc-server-user-nickname user) |
| 526 | nicks))) | 515 | nicks))) |
| @@ -528,10 +517,10 @@ See also: `erc-sort-channel-users-by-activity'" | |||
| 528 | nicks)))) | 517 | nicks)))) |
| 529 | 518 | ||
| 530 | (defun erc-get-channel-nickname-list () | 519 | (defun erc-get-channel-nickname-list () |
| 531 | "Returns a list of known nicknames on the current channel." | 520 | "Return a list of known nicknames on the current channel." |
| 532 | (let (nicks) | 521 | (let (nicks) |
| 533 | (when (hash-table-p erc-channel-users) | 522 | (when (hash-table-p erc-channel-users) |
| 534 | (maphash (lambda (n cdata) | 523 | (maphash (lambda (_n cdata) |
| 535 | (setq nicks | 524 | (setq nicks |
| 536 | (cons (erc-server-user-nickname (car cdata)) | 525 | (cons (erc-server-user-nickname (car cdata)) |
| 537 | nicks))) | 526 | nicks))) |
| @@ -539,11 +528,11 @@ See also: `erc-sort-channel-users-by-activity'" | |||
| 539 | nicks))) | 528 | nicks))) |
| 540 | 529 | ||
| 541 | (defun erc-get-server-nickname-alist () | 530 | (defun erc-get-server-nickname-alist () |
| 542 | "Returns an alist of known nicknames on the current server." | 531 | "Return an alist of known nicknames on the current server." |
| 543 | (erc-with-server-buffer | 532 | (erc-with-server-buffer |
| 544 | (let (nicks) | 533 | (let (nicks) |
| 545 | (when (hash-table-p erc-server-users) | 534 | (when (hash-table-p erc-server-users) |
| 546 | (maphash (lambda (n user) | 535 | (maphash (lambda (_n user) |
| 547 | (setq nicks | 536 | (setq nicks |
| 548 | (cons (cons (erc-server-user-nickname user) nil) | 537 | (cons (cons (erc-server-user-nickname user) nil) |
| 549 | nicks))) | 538 | nicks))) |
| @@ -551,10 +540,10 @@ See also: `erc-sort-channel-users-by-activity'" | |||
| 551 | nicks)))) | 540 | nicks)))) |
| 552 | 541 | ||
| 553 | (defun erc-get-channel-nickname-alist () | 542 | (defun erc-get-channel-nickname-alist () |
| 554 | "Returns an alist of known nicknames on the current channel." | 543 | "Return an alist of known nicknames on the current channel." |
| 555 | (let (nicks) | 544 | (let (nicks) |
| 556 | (when (hash-table-p erc-channel-users) | 545 | (when (hash-table-p erc-channel-users) |
| 557 | (maphash (lambda (n cdata) | 546 | (maphash (lambda (_n cdata) |
| 558 | (setq nicks | 547 | (setq nicks |
| 559 | (cons (cons (erc-server-user-nickname (car cdata)) nil) | 548 | (cons (cons (erc-server-user-nickname (car cdata)) nil) |
| 560 | nicks))) | 549 | nicks))) |
| @@ -562,21 +551,18 @@ See also: `erc-sort-channel-users-by-activity'" | |||
| 562 | nicks))) | 551 | nicks))) |
| 563 | 552 | ||
| 564 | (defun erc-sort-channel-users-by-activity (list) | 553 | (defun erc-sort-channel-users-by-activity (list) |
| 565 | "Sorts LIST such that users which have spoken most recently are | 554 | "Sort LIST such that users which have spoken most recently are listed first. |
| 566 | listed first. LIST must be of the form (USER . CHANNEL-DATA). | 555 | LIST must be of the form (USER . CHANNEL-DATA). |
| 567 | 556 | ||
| 568 | See also: `erc-get-channel-user-list'." | 557 | See also: `erc-get-channel-user-list'." |
| 569 | (sort list | 558 | (sort list |
| 570 | (lambda (x y) | 559 | (lambda (x y) |
| 571 | (when (and | 560 | (when (and (cdr x) (cdr y)) |
| 572 | (cdr x) (cdr y)) | ||
| 573 | (let ((tx (erc-channel-user-last-message-time (cdr x))) | 561 | (let ((tx (erc-channel-user-last-message-time (cdr x))) |
| 574 | (ty (erc-channel-user-last-message-time (cdr y)))) | 562 | (ty (erc-channel-user-last-message-time (cdr y)))) |
| 575 | (if tx | 563 | (and tx |
| 576 | (if ty | 564 | (or (not ty) |
| 577 | (time-less-p ty tx) | 565 | (time-less-p ty tx)))))))) |
| 578 | t) | ||
| 579 | nil)))))) | ||
| 580 | 566 | ||
| 581 | (defun erc-sort-channel-users-alphabetically (list) | 567 | (defun erc-sort-channel-users-alphabetically (list) |
| 582 | "Sort LIST so that users' nicknames are in alphabetical order. | 568 | "Sort LIST so that users' nicknames are in alphabetical order. |
| @@ -585,15 +571,12 @@ LIST must be of the form (USER . CHANNEL-DATA). | |||
| 585 | See also: `erc-get-channel-user-list'." | 571 | See also: `erc-get-channel-user-list'." |
| 586 | (sort list | 572 | (sort list |
| 587 | (lambda (x y) | 573 | (lambda (x y) |
| 588 | (when (and | 574 | (when (and (cdr x) (cdr y)) |
| 589 | (cdr x) (cdr y)) | ||
| 590 | (let ((nickx (downcase (erc-server-user-nickname (car x)))) | 575 | (let ((nickx (downcase (erc-server-user-nickname (car x)))) |
| 591 | (nicky (downcase (erc-server-user-nickname (car y))))) | 576 | (nicky (downcase (erc-server-user-nickname (car y))))) |
| 592 | (if nickx | 577 | (and nickx |
| 593 | (if nicky | 578 | (or (not nicky) |
| 594 | (string-lessp nickx nicky) | 579 | (string-lessp nickx nicky)))))))) |
| 595 | t) | ||
| 596 | nil)))))) | ||
| 597 | 580 | ||
| 598 | (defvar erc-channel-topic nil | 581 | (defvar erc-channel-topic nil |
| 599 | "A topic string for the channel. Should only be used in channel-buffers.") | 582 | "A topic string for the channel. Should only be used in channel-buffers.") |
| @@ -678,8 +661,8 @@ Any other value disables notice's highlighting altogether." | |||
| 678 | (const :tag "don't highlight notices at all" nil))) | 661 | (const :tag "don't highlight notices at all" nil))) |
| 679 | 662 | ||
| 680 | (defcustom erc-echo-notice-hook nil | 663 | (defcustom erc-echo-notice-hook nil |
| 681 | "Specifies a list of functions to call to echo a private | 664 | "List of functions to call to echo a private notice. |
| 682 | notice. Each function is called with four arguments, the string | 665 | Each function is called with four arguments, the string |
| 683 | to display, the parsed server message, the target buffer (or | 666 | to display, the parsed server message, the target buffer (or |
| 684 | nil), and the sender. The functions are called in order, until a | 667 | nil), and the sender. The functions are called in order, until a |
| 685 | function evaluates to non-nil. These hooks are called after | 668 | function evaluates to non-nil. These hooks are called after |
| @@ -709,8 +692,8 @@ See also: `erc-echo-notice-always-hook', | |||
| 709 | 692 | ||
| 710 | (defcustom erc-echo-notice-always-hook | 693 | (defcustom erc-echo-notice-always-hook |
| 711 | '(erc-echo-notice-in-default-buffer) | 694 | '(erc-echo-notice-in-default-buffer) |
| 712 | "Specifies a list of functions to call to echo a private | 695 | "List of functions to call to echo a private notice. |
| 713 | notice. Each function is called with four arguments, the string | 696 | Each function is called with four arguments, the string |
| 714 | to display, the parsed server message, the target buffer (or | 697 | to display, the parsed server message, the target buffer (or |
| 715 | nil), and the sender. The functions are called in order, and all | 698 | nil), and the sender. The functions are called in order, and all |
| 716 | functions are called. These hooks are called before those | 699 | functions are called. These hooks are called before those |
| @@ -1062,9 +1045,9 @@ This function is called with narrowing, ala `erc-send-modify-hook'." | |||
| 1062 | :options '(erc-make-read-only)) | 1045 | :options '(erc-make-read-only)) |
| 1063 | 1046 | ||
| 1064 | (defcustom erc-send-completed-hook | 1047 | (defcustom erc-send-completed-hook |
| 1065 | (when (featurep 'emacspeak) | 1048 | (when (fboundp 'emacspeak-auditory-icon) |
| 1066 | (list (byte-compile | 1049 | (list (byte-compile |
| 1067 | (lambda (str) | 1050 | (lambda (_str) |
| 1068 | (emacspeak-auditory-icon 'select-object))))) | 1051 | (emacspeak-auditory-icon 'select-object))))) |
| 1069 | "Hook called after a message has been parsed by ERC. | 1052 | "Hook called after a message has been parsed by ERC. |
| 1070 | 1053 | ||
| @@ -1115,10 +1098,7 @@ which the local user typed." | |||
| 1115 | 1098 | ||
| 1116 | ;; Suppress `font-lock-fontify-block' key binding since it | 1099 | ;; Suppress `font-lock-fontify-block' key binding since it |
| 1117 | ;; destroys face properties. | 1100 | ;; destroys face properties. |
| 1118 | (if (fboundp 'command-remapping) | 1101 | (define-key map [remap font-lock-fontify-block] 'undefined) |
| 1119 | (define-key map [remap font-lock-fontify-block] 'undefined) | ||
| 1120 | (substitute-key-definition | ||
| 1121 | 'font-lock-fontify-block 'undefined map global-map)) | ||
| 1122 | 1102 | ||
| 1123 | map) | 1103 | map) |
| 1124 | "ERC keymap.") | 1104 | "ERC keymap.") |
| @@ -1277,14 +1257,14 @@ if ARG is omitted or nil. | |||
| 1277 | (put ',enable 'definition-name ',name) | 1257 | (put ',enable 'definition-name ',name) |
| 1278 | (put ',disable 'definition-name ',name)))) | 1258 | (put ',disable 'definition-name ',name)))) |
| 1279 | 1259 | ||
| 1280 | (defun erc-once-with-server-event (event &rest forms) | 1260 | (defun erc-once-with-server-event (event f) |
| 1281 | "Execute FORMS the next time EVENT occurs in the `current-buffer'. | 1261 | "Run function F the next time EVENT occurs in the `current-buffer'. |
| 1282 | 1262 | ||
| 1283 | You should make sure that `current-buffer' is a server buffer. | 1263 | You should make sure that `current-buffer' is a server buffer. |
| 1284 | 1264 | ||
| 1285 | This function temporarily adds a function to EVENT's hook to | 1265 | This function temporarily adds a function to EVENT's hook to call F with |
| 1286 | execute FORMS. After FORMS are run, the function is removed from | 1266 | two arguments (`proc' and `parsed'). After F is called, the function is |
| 1287 | EVENT's hook. The last expression of FORMS should be either nil | 1267 | removed from EVENT's hook. F should return either nil |
| 1288 | or t, where nil indicates that the other functions on EVENT's hook | 1268 | or t, where nil indicates that the other functions on EVENT's hook |
| 1289 | should be run too, and t indicates that other functions should | 1269 | should be run too, and t indicates that other functions should |
| 1290 | not be run. | 1270 | not be run. |
| @@ -1298,35 +1278,14 @@ capabilities." | |||
| 1298 | "You should only run `erc-once-with-server-event' in a server buffer")) | 1278 | "You should only run `erc-once-with-server-event' in a server buffer")) |
| 1299 | (let ((fun (make-symbol "fun")) | 1279 | (let ((fun (make-symbol "fun")) |
| 1300 | (hook (erc-get-hook event))) | 1280 | (hook (erc-get-hook event))) |
| 1301 | (put fun 'erc-original-buffer (current-buffer)) | 1281 | (put fun 'erc-original-buffer (current-buffer)) |
| 1302 | (fset fun `(lambda (proc parsed) | 1282 | (fset fun (lambda (proc parsed) |
| 1303 | (with-current-buffer (get ',fun 'erc-original-buffer) | 1283 | (with-current-buffer (get fun 'erc-original-buffer) |
| 1304 | (remove-hook ',hook ',fun t)) | 1284 | (remove-hook hook fun t)) |
| 1305 | (fmakunbound ',fun) | 1285 | (fmakunbound fun) |
| 1306 | ,@forms)) | 1286 | (funcall f proc parsed))) |
| 1307 | (add-hook hook fun nil t) | 1287 | (add-hook hook fun nil t) |
| 1308 | fun)) | 1288 | fun)) |
| 1309 | |||
| 1310 | (defun erc-once-with-server-event-global (event &rest forms) | ||
| 1311 | "Execute FORMS the next time EVENT occurs in any server buffer. | ||
| 1312 | |||
| 1313 | This function temporarily prepends a function to EVENT's hook to | ||
| 1314 | execute FORMS. After FORMS are run, the function is removed from | ||
| 1315 | EVENT's hook. The last expression of FORMS should be either nil | ||
| 1316 | or t, where nil indicates that the other functions on EVENT's hook | ||
| 1317 | should be run too, and t indicates that other functions should | ||
| 1318 | not be run. | ||
| 1319 | |||
| 1320 | When FORMS execute, the current buffer is the server buffer associated with the | ||
| 1321 | connection over which the data was received that triggered EVENT." | ||
| 1322 | (let ((fun (make-symbol "fun")) | ||
| 1323 | (hook (erc-get-hook event))) | ||
| 1324 | (fset fun `(lambda (proc parsed) | ||
| 1325 | (remove-hook ',hook ',fun) | ||
| 1326 | (fmakunbound ',fun) | ||
| 1327 | ,@forms)) | ||
| 1328 | (add-hook hook fun nil nil) | ||
| 1329 | fun)) | ||
| 1330 | 1289 | ||
| 1331 | (defsubst erc-log (string) | 1290 | (defsubst erc-log (string) |
| 1332 | "Logs STRING if logging is on (see `erc-log-p')." | 1291 | "Logs STRING if logging is on (see `erc-log-p')." |
| @@ -1353,7 +1312,7 @@ If BUFFER is nil, the current buffer is used." | |||
| 1353 | (and (eq major-mode 'erc-mode) | 1312 | (and (eq major-mode 'erc-mode) |
| 1354 | (null (erc-default-target))))) | 1313 | (null (erc-default-target))))) |
| 1355 | 1314 | ||
| 1356 | (defun erc-open-server-buffer-p (&optional buffer) | 1315 | (defun erc-open-server-buffer-p (&optional buffer) ;FIXME: `buffer' is ignored! |
| 1357 | "Return non-nil if argument BUFFER is an ERC server buffer that | 1316 | "Return non-nil if argument BUFFER is an ERC server buffer that |
| 1358 | has an open IRC process. | 1317 | has an open IRC process. |
| 1359 | 1318 | ||
| @@ -1377,9 +1336,10 @@ If BUFFER is nil, the current buffer is used." | |||
| 1377 | (let ((erc-online-p 'unknown)) | 1336 | (let ((erc-online-p 'unknown)) |
| 1378 | (erc-once-with-server-event | 1337 | (erc-once-with-server-event |
| 1379 | 303 | 1338 | 303 |
| 1380 | `(let ((ison (split-string (aref parsed 3)))) | 1339 | (lambda (_proc parsed) |
| 1381 | (setq erc-online-p (car (erc-member-ignore-case ,nick ison))) | 1340 | (let ((ison (split-string (aref parsed 3)))) |
| 1382 | t)) | 1341 | (setq erc-online-p (car (erc-member-ignore-case nick ison))) |
| 1342 | t))) | ||
| 1383 | (erc-server-send (format "ISON %s" nick)) | 1343 | (erc-server-send (format "ISON %s" nick)) |
| 1384 | (while (eq erc-online-p 'unknown) (accept-process-output)) | 1344 | (while (eq erc-online-p 'unknown) (accept-process-output)) |
| 1385 | (if (called-interactively-p 'interactive) | 1345 | (if (called-interactively-p 'interactive) |
| @@ -1551,7 +1511,7 @@ symbol, it may have these values: | |||
| 1551 | "Check whether ports A and B are equal." | 1511 | "Check whether ports A and B are equal." |
| 1552 | (= (erc-normalize-port a) (erc-normalize-port b))) | 1512 | (= (erc-normalize-port a) (erc-normalize-port b))) |
| 1553 | 1513 | ||
| 1554 | (defun erc-generate-new-buffer-name (server port target &optional proc) | 1514 | (defun erc-generate-new-buffer-name (server port target) |
| 1555 | "Create a new buffer name based on the arguments." | 1515 | "Create a new buffer name based on the arguments." |
| 1556 | (when (numberp port) (setq port (number-to-string port))) | 1516 | (when (numberp port) (setq port (number-to-string port))) |
| 1557 | (let ((buf-name (or target | 1517 | (let ((buf-name (or target |
| @@ -1582,9 +1542,9 @@ symbol, it may have these values: | |||
| 1582 | ;; fallback to the old <N> uniquification method: | 1542 | ;; fallback to the old <N> uniquification method: |
| 1583 | (or buffer-name (generate-new-buffer-name buf-name)) )) | 1543 | (or buffer-name (generate-new-buffer-name buf-name)) )) |
| 1584 | 1544 | ||
| 1585 | (defun erc-get-buffer-create (server port target &optional proc) | 1545 | (defun erc-get-buffer-create (server port target) |
| 1586 | "Create a new buffer based on the arguments." | 1546 | "Create a new buffer based on the arguments." |
| 1587 | (get-buffer-create (erc-generate-new-buffer-name server port target proc))) | 1547 | (get-buffer-create (erc-generate-new-buffer-name server port target))) |
| 1588 | 1548 | ||
| 1589 | 1549 | ||
| 1590 | (defun erc-member-ignore-case (string list) | 1550 | (defun erc-member-ignore-case (string list) |
| @@ -1700,6 +1660,7 @@ nil." | |||
| 1700 | (defvar iswitchb-temp-buflist) | 1660 | (defvar iswitchb-temp-buflist) |
| 1701 | (declare-function iswitchb-read-buffer "iswitchb" | 1661 | (declare-function iswitchb-read-buffer "iswitchb" |
| 1702 | (prompt &optional default require-match start matches-set)) | 1662 | (prompt &optional default require-match start matches-set)) |
| 1663 | (defvar iswitchb-make-buflist-hook) | ||
| 1703 | 1664 | ||
| 1704 | (defun erc-iswitchb (&optional arg) | 1665 | (defun erc-iswitchb (&optional arg) |
| 1705 | "Use `iswitchb-read-buffer' to prompt for a ERC buffer to switch to. | 1666 | "Use `iswitchb-read-buffer' to prompt for a ERC buffer to switch to. |
| @@ -1906,29 +1867,29 @@ removed from the list will be disabled." | |||
| 1906 | 1867 | ||
| 1907 | (defun erc-setup-buffer (buffer) | 1868 | (defun erc-setup-buffer (buffer) |
| 1908 | "Consults `erc-join-buffer' to find out how to display `BUFFER'." | 1869 | "Consults `erc-join-buffer' to find out how to display `BUFFER'." |
| 1909 | (cond ((eq erc-join-buffer 'window) | 1870 | (pcase erc-join-buffer |
| 1910 | (if (active-minibuffer-window) | 1871 | (`window |
| 1911 | (display-buffer buffer) | 1872 | (if (active-minibuffer-window) |
| 1912 | (switch-to-buffer-other-window buffer))) | 1873 | (display-buffer buffer) |
| 1913 | ((eq erc-join-buffer 'window-noselect) | 1874 | (switch-to-buffer-other-window buffer))) |
| 1914 | (display-buffer buffer)) | 1875 | (`window-noselect |
| 1915 | ((eq erc-join-buffer 'bury) | 1876 | (display-buffer buffer)) |
| 1916 | nil) | 1877 | (`bury |
| 1917 | ((eq erc-join-buffer 'frame) | 1878 | nil) |
| 1918 | (when (or (not erc-reuse-frames) | 1879 | (`frame |
| 1919 | (not (get-buffer-window buffer t))) | 1880 | (when (or (not erc-reuse-frames) |
| 1920 | ((lambda (frame) | 1881 | (not (get-buffer-window buffer t))) |
| 1921 | (raise-frame frame) | 1882 | (let ((frame (make-frame (or erc-frame-alist |
| 1922 | (select-frame frame)) | 1883 | default-frame-alist)))) |
| 1923 | (make-frame (or erc-frame-alist | 1884 | (raise-frame frame) |
| 1924 | default-frame-alist))) | 1885 | (select-frame frame)) |
| 1925 | (switch-to-buffer buffer) | 1886 | (switch-to-buffer buffer) |
| 1926 | (when erc-frame-dedicated-flag | 1887 | (when erc-frame-dedicated-flag |
| 1927 | (set-window-dedicated-p (selected-window) t)))) | 1888 | (set-window-dedicated-p (selected-window) t)))) |
| 1928 | (t | 1889 | (_ |
| 1929 | (if (active-minibuffer-window) | 1890 | (if (active-minibuffer-window) |
| 1930 | (display-buffer buffer) | 1891 | (display-buffer buffer) |
| 1931 | (switch-to-buffer buffer))))) | 1892 | (switch-to-buffer buffer))))) |
| 1932 | 1893 | ||
| 1933 | (defun erc-open (&optional server port nick full-name | 1894 | (defun erc-open (&optional server port nick full-name |
| 1934 | connect passwd tgt-list channel process) | 1895 | connect passwd tgt-list channel process) |
| @@ -2006,19 +1967,20 @@ Returns the buffer for the given server or channel." | |||
| 2006 | ;; The local copy of `erc-nick' - the list of nicks to choose | 1967 | ;; The local copy of `erc-nick' - the list of nicks to choose |
| 2007 | (setq erc-default-nicks (if (consp erc-nick) erc-nick (list erc-nick))) | 1968 | (setq erc-default-nicks (if (consp erc-nick) erc-nick (list erc-nick))) |
| 2008 | ;; password stuff | 1969 | ;; password stuff |
| 2009 | (setq erc-session-password (or passwd | 1970 | (setq erc-session-password |
| 2010 | (let ((secret | 1971 | (or passwd |
| 2011 | (plist-get | 1972 | (let ((secret |
| 2012 | (nth 0 | 1973 | (plist-get |
| 2013 | (auth-source-search :host server | 1974 | (nth 0 |
| 2014 | :max 1 | 1975 | (auth-source-search :host server |
| 2015 | :user nick | 1976 | :max 1 |
| 2016 | :port port | 1977 | :user nick |
| 2017 | :require '(:secret))) | 1978 | :port port |
| 2018 | :secret))) | 1979 | :require '(:secret))) |
| 2019 | (if (functionp secret) | 1980 | :secret))) |
| 2020 | (funcall secret) | 1981 | (if (functionp secret) |
| 2021 | secret)))) | 1982 | (funcall secret) |
| 1983 | secret)))) | ||
| 2022 | ;; debug output buffer | 1984 | ;; debug output buffer |
| 2023 | (setq erc-dbuf | 1985 | (setq erc-dbuf |
| 2024 | (when erc-log-p | 1986 | (when erc-log-p |
| @@ -2080,11 +2042,6 @@ If no buffer matches, return nil." | |||
| 2080 | (erc-port-equal erc-session-port port) | 2042 | (erc-port-equal erc-session-port port) |
| 2081 | (erc-current-nick-p nick))))) | 2043 | (erc-current-nick-p nick))))) |
| 2082 | 2044 | ||
| 2083 | (if (not (fboundp 'read-passwd)) | ||
| 2084 | (defun read-passwd (prompt) | ||
| 2085 | "Substitute for `read-passwd' in early emacsen." | ||
| 2086 | (read-from-minibuffer prompt))) | ||
| 2087 | |||
| 2088 | (defcustom erc-before-connect nil | 2045 | (defcustom erc-before-connect nil |
| 2089 | "Hook called before connecting to a server. | 2046 | "Hook called before connecting to a server. |
| 2090 | This hook gets executed before `erc' actually invokes `erc-mode' | 2047 | This hook gets executed before `erc' actually invokes `erc-mode' |
| @@ -2433,11 +2390,11 @@ If STRING is nil, the function does nothing." | |||
| 2433 | (t (list (current-buffer))))) | 2390 | (t (list (current-buffer))))) |
| 2434 | (when (buffer-live-p buf) | 2391 | (when (buffer-live-p buf) |
| 2435 | (erc-display-line-1 string buf) | 2392 | (erc-display-line-1 string buf) |
| 2436 | (add-to-list 'new-bufs buf))) | 2393 | (push buf new-bufs))) |
| 2437 | (when (null new-bufs) | 2394 | (when (null new-bufs) |
| 2438 | (if (erc-server-buffer-live-p) | 2395 | (erc-display-line-1 string (if (erc-server-buffer-live-p) |
| 2439 | (erc-display-line-1 string (process-buffer erc-server-process)) | 2396 | (process-buffer erc-server-process) |
| 2440 | (erc-display-line-1 string (current-buffer)))))) | 2397 | (current-buffer)))))) |
| 2441 | 2398 | ||
| 2442 | (defun erc-display-message-highlight (type string) | 2399 | (defun erc-display-message-highlight (type string) |
| 2443 | "Highlight STRING according to TYPE, where erc-TYPE-face is an ERC face. | 2400 | "Highlight STRING according to TYPE, where erc-TYPE-face is an ERC face. |
| @@ -2544,7 +2501,7 @@ consumption for long-lived IRC or Emacs sessions." | |||
| 2544 | "Internal counter variable for use with `erc-lurker-cleanup-interval'.") | 2501 | "Internal counter variable for use with `erc-lurker-cleanup-interval'.") |
| 2545 | 2502 | ||
| 2546 | (defvar erc-lurker-cleanup-interval 100 | 2503 | (defvar erc-lurker-cleanup-interval 100 |
| 2547 | "Specifies frequency of cleaning up stale erc-lurker state. | 2504 | "Frequency of cleaning up stale erc-lurker state. |
| 2548 | 2505 | ||
| 2549 | `erc-lurker-update-status' calls `erc-lurker-cleanup' once for | 2506 | `erc-lurker-update-status' calls `erc-lurker-cleanup' once for |
| 2550 | every `erc-lurker-cleanup-interval' updates to | 2507 | every `erc-lurker-cleanup-interval' updates to |
| @@ -2552,7 +2509,7 @@ every `erc-lurker-cleanup-interval' updates to | |||
| 2552 | consumption of lurker state during long Emacs sessions and/or ERC | 2509 | consumption of lurker state during long Emacs sessions and/or ERC |
| 2553 | sessions with large numbers of incoming PRIVMSGs.") | 2510 | sessions with large numbers of incoming PRIVMSGs.") |
| 2554 | 2511 | ||
| 2555 | (defun erc-lurker-update-status (message) | 2512 | (defun erc-lurker-update-status (_message) |
| 2556 | "Update `erc-lurker-state' if necessary. | 2513 | "Update `erc-lurker-state' if necessary. |
| 2557 | 2514 | ||
| 2558 | This function is called from `erc-insert-pre-hook'. If the | 2515 | This function is called from `erc-insert-pre-hook'. If the |
| @@ -2614,7 +2571,7 @@ displayed hostnames." | |||
| 2614 | :type 'alist) | 2571 | :type 'alist) |
| 2615 | 2572 | ||
| 2616 | (defun erc-canonicalize-server-name (server) | 2573 | (defun erc-canonicalize-server-name (server) |
| 2617 | "Returns the canonical network name for SERVER if any, | 2574 | "Return the canonical network name for SERVER if any, |
| 2618 | otherwise `erc-server-announced-name'. SERVER is matched against | 2575 | otherwise `erc-server-announced-name'. SERVER is matched against |
| 2619 | `erc-common-server-suffixes'." | 2576 | `erc-common-server-suffixes'." |
| 2620 | (when server | 2577 | (when server |
| @@ -2877,7 +2834,7 @@ If no USER argument is specified, list the contents of `erc-ignore-list'." | |||
| 2877 | (interactive) | 2834 | (interactive) |
| 2878 | (let ((ops nil)) | 2835 | (let ((ops nil)) |
| 2879 | (if erc-channel-users | 2836 | (if erc-channel-users |
| 2880 | (maphash (lambda (nick user-data) | 2837 | (maphash (lambda (_nick user-data) |
| 2881 | (let ((cuser (cdr user-data))) | 2838 | (let ((cuser (cdr user-data))) |
| 2882 | (if (and cuser | 2839 | (if (and cuser |
| 2883 | (erc-channel-user-op cuser)) | 2840 | (erc-channel-user-op cuser)) |
| @@ -3007,9 +2964,9 @@ were most recently invited. See also `invitation'." | |||
| 3007 | (switch-to-buffer (car (erc-member-ignore-case chnl | 2964 | (switch-to-buffer (car (erc-member-ignore-case chnl |
| 3008 | joined-channels))) | 2965 | joined-channels))) |
| 3009 | (erc-log (format "cmd: JOIN: %s" chnl)) | 2966 | (erc-log (format "cmd: JOIN: %s" chnl)) |
| 3010 | (if (and chnl key) | 2967 | (erc-server-send (if (and chnl key) |
| 3011 | (erc-server-send (format "JOIN %s %s" chnl key)) | 2968 | (format "JOIN %s %s" chnl key) |
| 3012 | (erc-server-send (format "JOIN %s" chnl))))))) | 2969 | (format "JOIN %s" chnl))))))) |
| 3013 | t) | 2970 | t) |
| 3014 | 2971 | ||
| 3015 | (defalias 'erc-cmd-CHANNEL 'erc-cmd-JOIN) | 2972 | (defalias 'erc-cmd-CHANNEL 'erc-cmd-JOIN) |
| @@ -3120,68 +3077,76 @@ If SERVER is non-nil, use that, rather than the current server." | |||
| 3120 | (let ((origbuf (current-buffer)) | 3077 | (let ((origbuf (current-buffer)) |
| 3121 | symlist) | 3078 | symlist) |
| 3122 | (erc-with-server-buffer | 3079 | (erc-with-server-buffer |
| 3123 | (add-to-list 'symlist | 3080 | (push (cons (erc-once-with-server-event |
| 3124 | (cons (erc-once-with-server-event | 3081 | 311 (lambda (_proc parsed) |
| 3125 | 311 `(string= ,nick | 3082 | (string= nick |
| 3126 | (nth 1 | 3083 | (nth 1 (erc-response.command-args |
| 3127 | (erc-response.command-args parsed)))) | 3084 | parsed))))) |
| 3128 | 'erc-server-311-functions)) | 3085 | 'erc-server-311-functions) |
| 3129 | (add-to-list 'symlist | 3086 | symlist) |
| 3130 | (cons (erc-once-with-server-event | 3087 | (push (cons (erc-once-with-server-event |
| 3131 | 312 `(string= ,nick | 3088 | 312 (lambda (_proc parsed) |
| 3132 | (nth 1 | 3089 | (string= nick |
| 3133 | (erc-response.command-args parsed)))) | 3090 | (nth 1 (erc-response.command-args |
| 3134 | 'erc-server-312-functions)) | 3091 | parsed))))) |
| 3135 | (add-to-list 'symlist | 3092 | 'erc-server-312-functions) |
| 3136 | (cons (erc-once-with-server-event | 3093 | symlist) |
| 3137 | 318 `(string= ,nick | 3094 | (push (cons (erc-once-with-server-event |
| 3138 | (nth 1 | 3095 | 318 (lambda (_proc parsed) |
| 3139 | (erc-response.command-args parsed)))) | 3096 | (string= nick |
| 3140 | 'erc-server-318-functions)) | 3097 | (nth 1 (erc-response.command-args |
| 3141 | (add-to-list 'symlist | 3098 | parsed))))) |
| 3142 | (cons (erc-once-with-server-event | 3099 | 'erc-server-318-functions) |
| 3143 | 319 `(string= ,nick | 3100 | symlist) |
| 3144 | (nth 1 | 3101 | (push (cons (erc-once-with-server-event |
| 3145 | (erc-response.command-args parsed)))) | 3102 | 319 (lambda (_proc parsed) |
| 3146 | 'erc-server-319-functions)) | 3103 | (string= nick |
| 3147 | (add-to-list 'symlist | 3104 | (nth 1 (erc-response.command-args |
| 3148 | (cons (erc-once-with-server-event | 3105 | parsed))))) |
| 3149 | 320 `(string= ,nick | 3106 | 'erc-server-319-functions) |
| 3150 | (nth 1 | 3107 | symlist) |
| 3151 | (erc-response.command-args parsed)))) | 3108 | (push (cons (erc-once-with-server-event |
| 3152 | 'erc-server-320-functions)) | 3109 | 320 (lambda (_proc parsed) |
| 3153 | (add-to-list 'symlist | 3110 | (string= nick |
| 3154 | (cons (erc-once-with-server-event | 3111 | (nth 1 (erc-response.command-args |
| 3155 | 330 `(string= ,nick | 3112 | parsed))))) |
| 3156 | (nth 1 | 3113 | 'erc-server-320-functions) |
| 3157 | (erc-response.command-args parsed)))) | 3114 | symlist) |
| 3158 | 'erc-server-330-functions)) | 3115 | (push (cons (erc-once-with-server-event |
| 3159 | (add-to-list 'symlist | 3116 | 330 (lambda (_proc parsed) |
| 3160 | (cons (erc-once-with-server-event | 3117 | (string= nick |
| 3161 | 317 | 3118 | (nth 1 (erc-response.command-args |
| 3162 | `(let ((idleseconds | 3119 | parsed))))) |
| 3163 | (string-to-number | 3120 | 'erc-server-330-functions) |
| 3164 | (third | 3121 | symlist) |
| 3165 | (erc-response.command-args parsed))))) | 3122 | (push (cons (erc-once-with-server-event |
| 3166 | (erc-display-line | 3123 | 317 |
| 3167 | (erc-make-notice | 3124 | (lambda (_proc parsed) |
| 3168 | (format "%s has been idle for %s." | 3125 | (let ((idleseconds |
| 3169 | (erc-string-no-properties ,nick) | 3126 | (string-to-number |
| 3170 | (erc-seconds-to-string idleseconds))) | 3127 | (cl-third |
| 3171 | ,origbuf)) | 3128 | (erc-response.command-args parsed))))) |
| 3172 | t) | 3129 | (erc-display-line |
| 3173 | 'erc-server-317-functions)) | 3130 | (erc-make-notice |
| 3174 | 3131 | (format "%s has been idle for %s." | |
| 3175 | ;; Send the WHOIS command. | 3132 | (erc-string-no-properties nick) |
| 3176 | (erc-cmd-WHOIS nick) | 3133 | (erc-seconds-to-string idleseconds))) |
| 3177 | 3134 | origbuf) | |
| 3178 | ;; Remove the uninterned symbols from the server hooks that did not run. | 3135 | t))) |
| 3179 | (run-at-time 20 nil `(lambda () | 3136 | 'erc-server-317-functions) |
| 3180 | (with-current-buffer ,(current-buffer) | 3137 | symlist) |
| 3181 | (dolist (sym ',symlist) | 3138 | |
| 3182 | (let ((hooksym (cdr sym)) | 3139 | ;; Send the WHOIS command. |
| 3183 | (funcsym (car sym))) | 3140 | (erc-cmd-WHOIS nick) |
| 3184 | (remove-hook hooksym funcsym t)))))))) | 3141 | |
| 3142 | ;; Remove the uninterned symbols from the server hooks that did not run. | ||
| 3143 | (run-at-time 20 nil (lambda (buf symlist) | ||
| 3144 | (with-current-buffer buf | ||
| 3145 | (dolist (sym symlist) | ||
| 3146 | (let ((hooksym (cdr sym)) | ||
| 3147 | (funcsym (car sym))) | ||
| 3148 | (remove-hook hooksym funcsym t))))) | ||
| 3149 | (current-buffer) symlist))) | ||
| 3185 | t) | 3150 | t) |
| 3186 | 3151 | ||
| 3187 | (defun erc-cmd-DESCRIBE (line) | 3152 | (defun erc-cmd-DESCRIBE (line) |
| @@ -3690,11 +3655,12 @@ The ban list is fetched from the server if necessary." | |||
| 3690 | (erc-with-server-buffer | 3655 | (erc-with-server-buffer |
| 3691 | (erc-once-with-server-event | 3656 | (erc-once-with-server-event |
| 3692 | 368 | 3657 | 368 |
| 3693 | `(with-current-buffer ,chnl-name | 3658 | (lambda (_proc _parsed) |
| 3659 | (with-current-buffer chnl-name | ||
| 3694 | (put 'erc-channel-banlist 'received-from-server t) | 3660 | (put 'erc-channel-banlist 'received-from-server t) |
| 3695 | (setq erc-server-367-functions ',old-367-hook) | 3661 | (setq erc-server-367-functions old-367-hook) |
| 3696 | (erc-cmd-BANLIST) | 3662 | (erc-cmd-BANLIST) |
| 3697 | t)) | 3663 | t))) |
| 3698 | (erc-server-send (format "MODE %s b" chnl))))) | 3664 | (erc-server-send (format "MODE %s b" chnl))))) |
| 3699 | 3665 | ||
| 3700 | ((null erc-channel-banlist) | 3666 | ((null erc-channel-banlist) |
| @@ -3756,28 +3722,29 @@ Unban all currently banned users in the current channel." | |||
| 3756 | ((not (get 'erc-channel-banlist 'received-from-server)) | 3722 | ((not (get 'erc-channel-banlist 'received-from-server)) |
| 3757 | (let ((old-367-hook erc-server-367-functions)) | 3723 | (let ((old-367-hook erc-server-367-functions)) |
| 3758 | (setq erc-server-367-functions 'erc-banlist-store) | 3724 | (setq erc-server-367-functions 'erc-banlist-store) |
| 3759 | ;; fetch the ban list then callback | 3725 | ;; fetch the ban list then callback |
| 3760 | (erc-with-server-buffer | 3726 | (erc-with-server-buffer |
| 3761 | (erc-once-with-server-event | 3727 | (erc-once-with-server-event |
| 3762 | 368 | 3728 | 368 |
| 3763 | `(with-current-buffer ,chnl | 3729 | (lambda (_proc _parsed) |
| 3764 | (put 'erc-channel-banlist 'received-from-server t) | 3730 | (with-current-buffer chnl |
| 3765 | (setq erc-server-367-functions ,old-367-hook) | 3731 | (put 'erc-channel-banlist 'received-from-server t) |
| 3766 | (erc-cmd-MASSUNBAN) | 3732 | (setq erc-server-367-functions old-367-hook) |
| 3767 | t)) | 3733 | (erc-cmd-MASSUNBAN) |
| 3768 | (erc-server-send (format "MODE %s b" chnl))))) | 3734 | t))) |
| 3735 | (erc-server-send (format "MODE %s b" chnl))))) | ||
| 3769 | 3736 | ||
| 3770 | (t (let ((bans (mapcar 'cdr erc-channel-banlist))) | 3737 | (t (let ((bans (mapcar 'cdr erc-channel-banlist))) |
| 3771 | (when bans | 3738 | (when bans |
| 3772 | ;; Glob the bans into groups of three, and carry out the unban. | 3739 | ;; Glob the bans into groups of three, and carry out the unban. |
| 3773 | ;; eg. /mode #foo -bbb a*!*@* b*!*@* c*!*@* | 3740 | ;; eg. /mode #foo -bbb a*!*@* b*!*@* c*!*@* |
| 3774 | (mapc | 3741 | (mapc |
| 3775 | (lambda (x) | 3742 | (lambda (x) |
| 3776 | (erc-server-send | 3743 | (erc-server-send |
| 3777 | (format "MODE %s -%s %s" (erc-default-target) | 3744 | (format "MODE %s -%s %s" (erc-default-target) |
| 3778 | (make-string (length x) ?b) | 3745 | (make-string (length x) ?b) |
| 3779 | (mapconcat 'identity x " ")))) | 3746 | (mapconcat 'identity x " ")))) |
| 3780 | (erc-group-list bans 3)))) | 3747 | (erc-group-list bans 3)))) |
| 3781 | t)))) | 3748 | t)))) |
| 3782 | 3749 | ||
| 3783 | (defalias 'erc-cmd-MUB 'erc-cmd-MASSUNBAN) | 3750 | (defalias 'erc-cmd-MUB 'erc-cmd-MASSUNBAN) |
| @@ -3933,9 +3900,9 @@ Prompt for one if called interactively." | |||
| 3933 | (format "Limit for %s (RET to remove limit): " | 3900 | (format "Limit for %s (RET to remove limit): " |
| 3934 | (erc-default-target))))) | 3901 | (erc-default-target))))) |
| 3935 | (let ((tgt (erc-default-target))) | 3902 | (let ((tgt (erc-default-target))) |
| 3936 | (if (and limit (>= (length limit) 1)) | 3903 | (erc-server-send (if (and limit (>= (length limit) 1)) |
| 3937 | (erc-server-send (format "MODE %s +l %s" tgt limit)) | 3904 | (format "MODE %s +l %s" tgt limit) |
| 3938 | (erc-server-send (format "MODE %s -l" tgt))))) | 3905 | (format "MODE %s -l" tgt))))) |
| 3939 | 3906 | ||
| 3940 | (defun erc-set-channel-key (&optional key) | 3907 | (defun erc-set-channel-key (&optional key) |
| 3941 | "Set a KEY for the current channel. Remove key if nil. | 3908 | "Set a KEY for the current channel. Remove key if nil. |
| @@ -3944,9 +3911,9 @@ Prompt for one if called interactively." | |||
| 3944 | (format "Key for %s (RET to remove key): " | 3911 | (format "Key for %s (RET to remove key): " |
| 3945 | (erc-default-target))))) | 3912 | (erc-default-target))))) |
| 3946 | (let ((tgt (erc-default-target))) | 3913 | (let ((tgt (erc-default-target))) |
| 3947 | (if (and key (>= (length key) 1)) | 3914 | (erc-server-send (if (and key (>= (length key) 1)) |
| 3948 | (erc-server-send (format "MODE %s +k %s" tgt key)) | 3915 | (format "MODE %s +k %s" tgt key) |
| 3949 | (erc-server-send (format "MODE %s -k" tgt))))) | 3916 | (format "MODE %s -k" tgt))))) |
| 3950 | 3917 | ||
| 3951 | (defun erc-quit-server (reason) | 3918 | (defun erc-quit-server (reason) |
| 3952 | "Disconnect from current server after prompting for REASON. | 3919 | "Disconnect from current server after prompting for REASON. |
| @@ -4023,7 +3990,7 @@ Displays PROC and PARSED appropriately using `erc-display-message'." | |||
| 4023 | See `erc-debug-missing-hooks'.") | 3990 | See `erc-debug-missing-hooks'.") |
| 4024 | ;(make-variable-buffer-local 'erc-server-vectors) | 3991 | ;(make-variable-buffer-local 'erc-server-vectors) |
| 4025 | 3992 | ||
| 4026 | (defun erc-debug-missing-hooks (proc parsed) | 3993 | (defun erc-debug-missing-hooks (_proc parsed) |
| 4027 | "Add PARSED server message ERC does not yet handle to `erc-server-vectors'. | 3994 | "Add PARSED server message ERC does not yet handle to `erc-server-vectors'. |
| 4028 | These vectors can be helpful when adding new server message handlers to ERC. | 3995 | These vectors can be helpful when adding new server message handlers to ERC. |
| 4029 | See `erc-default-server-hook'." | 3996 | See `erc-default-server-hook'." |
| @@ -4163,7 +4130,7 @@ originated from, | |||
| 4163 | and as second argument the event parsed as a vector." | 4130 | and as second argument the event parsed as a vector." |
| 4164 | :group 'erc-hooks) | 4131 | :group 'erc-hooks) |
| 4165 | 4132 | ||
| 4166 | (defun erc-display-server-message (proc parsed) | 4133 | (defun erc-display-server-message (_proc parsed) |
| 4167 | "Display the message sent by the server as a notice." | 4134 | "Display the message sent by the server as a notice." |
| 4168 | (erc-display-message | 4135 | (erc-display-message |
| 4169 | parsed 'notice 'active (erc-response.contents parsed))) | 4136 | parsed 'notice 'active (erc-response.contents parsed))) |
| @@ -4219,7 +4186,7 @@ and as second argument the event parsed as a vector." | |||
| 4219 | :group 'erc-display | 4186 | :group 'erc-display |
| 4220 | :type 'function) | 4187 | :type 'function) |
| 4221 | 4188 | ||
| 4222 | (defun erc-format-nick (&optional user channel-data) | 4189 | (defun erc-format-nick (&optional user _channel-data) |
| 4223 | "Return the nickname of USER. | 4190 | "Return the nickname of USER. |
| 4224 | See also `erc-format-nick-function'." | 4191 | See also `erc-format-nick-function'." |
| 4225 | (when user (erc-server-user-nickname user))) | 4192 | (when user (erc-server-user-nickname user))) |
| @@ -4247,7 +4214,7 @@ See also `erc-format-nick-function'." | |||
| 4247 | (let ((prefix "> ")) | 4214 | (let ((prefix "> ")) |
| 4248 | (erc-propertize prefix 'face 'erc-default-face)))) | 4215 | (erc-propertize prefix 'face 'erc-default-face)))) |
| 4249 | 4216 | ||
| 4250 | (defun erc-echo-notice-in-default-buffer (s parsed buffer sender) | 4217 | (defun erc-echo-notice-in-default-buffer (s parsed buffer _sender) |
| 4251 | "Echos a private notice in the default buffer, namely the | 4218 | "Echos a private notice in the default buffer, namely the |
| 4252 | target buffer specified by BUFFER, or there is no target buffer, | 4219 | target buffer specified by BUFFER, or there is no target buffer, |
| 4253 | the server buffer. This function is designed to be added to | 4220 | the server buffer. This function is designed to be added to |
| @@ -4256,7 +4223,7 @@ and always returns t." | |||
| 4256 | (erc-display-message parsed nil buffer s) | 4223 | (erc-display-message parsed nil buffer s) |
| 4257 | t) | 4224 | t) |
| 4258 | 4225 | ||
| 4259 | (defun erc-echo-notice-in-target-buffer (s parsed buffer sender) | 4226 | (defun erc-echo-notice-in-target-buffer (s parsed buffer _sender) |
| 4260 | "Echos a private notice in BUFFER, if BUFFER is non-nil. This | 4227 | "Echos a private notice in BUFFER, if BUFFER is non-nil. This |
| 4261 | function is designed to be added to either `erc-echo-notice-hook' | 4228 | function is designed to be added to either `erc-echo-notice-hook' |
| 4262 | or `erc-echo-notice-always-hook', and returns non-nil if BUFFER | 4229 | or `erc-echo-notice-always-hook', and returns non-nil if BUFFER |
| @@ -4265,21 +4232,21 @@ is non-nil." | |||
| 4265 | (progn (erc-display-message parsed nil buffer s) t) | 4232 | (progn (erc-display-message parsed nil buffer s) t) |
| 4266 | nil)) | 4233 | nil)) |
| 4267 | 4234 | ||
| 4268 | (defun erc-echo-notice-in-minibuffer (s parsed buffer sender) | 4235 | (defun erc-echo-notice-in-minibuffer (s _parsed _buffer _sender) |
| 4269 | "Echos a private notice in the minibuffer. This function is | 4236 | "Echos a private notice in the minibuffer. This function is |
| 4270 | designed to be added to either `erc-echo-notice-hook' or | 4237 | designed to be added to either `erc-echo-notice-hook' or |
| 4271 | `erc-echo-notice-always-hook', and always returns t." | 4238 | `erc-echo-notice-always-hook', and always returns t." |
| 4272 | (message "%s" (concat "NOTICE: " s)) | 4239 | (message "%s" (concat "NOTICE: " s)) |
| 4273 | t) | 4240 | t) |
| 4274 | 4241 | ||
| 4275 | (defun erc-echo-notice-in-server-buffer (s parsed buffer sender) | 4242 | (defun erc-echo-notice-in-server-buffer (s parsed _buffer _sender) |
| 4276 | "Echos a private notice in the server buffer. This function is | 4243 | "Echos a private notice in the server buffer. This function is |
| 4277 | designed to be added to either `erc-echo-notice-hook' or | 4244 | designed to be added to either `erc-echo-notice-hook' or |
| 4278 | `erc-echo-notice-always-hook', and always returns t." | 4245 | `erc-echo-notice-always-hook', and always returns t." |
| 4279 | (erc-display-message parsed nil nil s) | 4246 | (erc-display-message parsed nil nil s) |
| 4280 | t) | 4247 | t) |
| 4281 | 4248 | ||
| 4282 | (defun erc-echo-notice-in-active-non-server-buffer (s parsed buffer sender) | 4249 | (defun erc-echo-notice-in-active-non-server-buffer (s parsed _buffer _sender) |
| 4283 | "Echos a private notice in the active buffer if the active | 4250 | "Echos a private notice in the active buffer if the active |
| 4284 | buffer is not the server buffer. This function is designed to be | 4251 | buffer is not the server buffer. This function is designed to be |
| 4285 | added to either `erc-echo-notice-hook' or | 4252 | added to either `erc-echo-notice-hook' or |
| @@ -4289,14 +4256,14 @@ buffer is not the server buffer." | |||
| 4289 | (progn (erc-display-message parsed nil 'active s) t) | 4256 | (progn (erc-display-message parsed nil 'active s) t) |
| 4290 | nil)) | 4257 | nil)) |
| 4291 | 4258 | ||
| 4292 | (defun erc-echo-notice-in-active-buffer (s parsed buffer sender) | 4259 | (defun erc-echo-notice-in-active-buffer (s parsed _buffer _sender) |
| 4293 | "Echos a private notice in the active buffer. This function is | 4260 | "Echos a private notice in the active buffer. This function is |
| 4294 | designed to be added to either `erc-echo-notice-hook' or | 4261 | designed to be added to either `erc-echo-notice-hook' or |
| 4295 | `erc-echo-notice-always-hook', and always returns t." | 4262 | `erc-echo-notice-always-hook', and always returns t." |
| 4296 | (erc-display-message parsed nil 'active s) | 4263 | (erc-display-message parsed nil 'active s) |
| 4297 | t) | 4264 | t) |
| 4298 | 4265 | ||
| 4299 | (defun erc-echo-notice-in-user-buffers (s parsed buffer sender) | 4266 | (defun erc-echo-notice-in-user-buffers (s parsed _buffer sender) |
| 4300 | "Echos a private notice in all of the buffers for which SENDER | 4267 | "Echos a private notice in all of the buffers for which SENDER |
| 4301 | is a member. This function is designed to be added to either | 4268 | is a member. This function is designed to be added to either |
| 4302 | `erc-echo-notice-hook' or `erc-echo-notice-always-hook', and | 4269 | `erc-echo-notice-hook' or `erc-echo-notice-always-hook', and |
| @@ -4321,12 +4288,12 @@ default target. | |||
| 4321 | See also: `erc-echo-notice-in-user-buffers', | 4288 | See also: `erc-echo-notice-in-user-buffers', |
| 4322 | `erc-buffer-list-with-nick'." | 4289 | `erc-buffer-list-with-nick'." |
| 4323 | (let ((buffers (erc-buffer-list-with-nick sender erc-server-process))) | 4290 | (let ((buffers (erc-buffer-list-with-nick sender erc-server-process))) |
| 4324 | (add-to-list 'buffers buffer) | 4291 | (unless (memq buffer buffers) (push buffer buffers)) |
| 4325 | (if buffers | 4292 | (if buffers ;FIXME: How could it be nil? |
| 4326 | (progn (erc-display-message parsed nil buffers s) t) | 4293 | (progn (erc-display-message parsed nil buffers s) t) |
| 4327 | nil))) | 4294 | nil))) |
| 4328 | 4295 | ||
| 4329 | (defun erc-echo-notice-in-first-user-buffer (s parsed buffer sender) | 4296 | (defun erc-echo-notice-in-first-user-buffer (s parsed _buffer sender) |
| 4330 | "Echos a private notice in one of the buffers for which SENDER | 4297 | "Echos a private notice in one of the buffers for which SENDER |
| 4331 | is a member. This function is designed to be added to either | 4298 | is a member. This function is designed to be added to either |
| 4332 | `erc-echo-notice-hook' or `erc-echo-notice-always-hook', and | 4299 | `erc-echo-notice-hook' or `erc-echo-notice-always-hook', and |
| @@ -4504,7 +4471,7 @@ See also `erc-display-message'." | |||
| 4504 | 4471 | ||
| 4505 | (defvar erc-ctcp-query-CLIENTINFO-hook '(erc-ctcp-query-CLIENTINFO)) | 4472 | (defvar erc-ctcp-query-CLIENTINFO-hook '(erc-ctcp-query-CLIENTINFO)) |
| 4506 | 4473 | ||
| 4507 | (defun erc-ctcp-query-CLIENTINFO (proc nick login host to msg) | 4474 | (defun erc-ctcp-query-CLIENTINFO (_proc nick _login _host _to msg) |
| 4508 | "Respond to a CTCP CLIENTINFO query." | 4475 | "Respond to a CTCP CLIENTINFO query." |
| 4509 | (when (string-match "^CLIENTINFO\\(\\s-*\\|\\s-+.*\\)$" msg) | 4476 | (when (string-match "^CLIENTINFO\\(\\s-*\\|\\s-+.*\\)$" msg) |
| 4510 | (let ((s (erc-client-info (erc-trim-string (match-string 1 msg))))) | 4477 | (let ((s (erc-client-info (erc-trim-string (match-string 1 msg))))) |
| @@ -4513,7 +4480,7 @@ See also `erc-display-message'." | |||
| 4513 | nil) | 4480 | nil) |
| 4514 | 4481 | ||
| 4515 | (defvar erc-ctcp-query-ECHO-hook '(erc-ctcp-query-ECHO)) | 4482 | (defvar erc-ctcp-query-ECHO-hook '(erc-ctcp-query-ECHO)) |
| 4516 | (defun erc-ctcp-query-ECHO (proc nick login host to msg) | 4483 | (defun erc-ctcp-query-ECHO (_proc nick _login _host _to msg) |
| 4517 | "Respond to a CTCP ECHO query." | 4484 | "Respond to a CTCP ECHO query." |
| 4518 | (when (string-match "^ECHO\\s-+\\(.*\\)\\s-*$" msg) | 4485 | (when (string-match "^ECHO\\s-+\\(.*\\)\\s-*$" msg) |
| 4519 | (let ((s (match-string 1 msg))) | 4486 | (let ((s (match-string 1 msg))) |
| @@ -4522,7 +4489,7 @@ See also `erc-display-message'." | |||
| 4522 | nil) | 4489 | nil) |
| 4523 | 4490 | ||
| 4524 | (defvar erc-ctcp-query-FINGER-hook '(erc-ctcp-query-FINGER)) | 4491 | (defvar erc-ctcp-query-FINGER-hook '(erc-ctcp-query-FINGER)) |
| 4525 | (defun erc-ctcp-query-FINGER (proc nick login host to msg) | 4492 | (defun erc-ctcp-query-FINGER (_proc nick _login _host _to _msg) |
| 4526 | "Respond to a CTCP FINGER query." | 4493 | "Respond to a CTCP FINGER query." |
| 4527 | (unless erc-disable-ctcp-replies | 4494 | (unless erc-disable-ctcp-replies |
| 4528 | (let ((s (if erc-anonymous-login | 4495 | (let ((s (if erc-anonymous-login |
| @@ -4538,7 +4505,7 @@ See also `erc-display-message'." | |||
| 4538 | nil) | 4505 | nil) |
| 4539 | 4506 | ||
| 4540 | (defvar erc-ctcp-query-PING-hook '(erc-ctcp-query-PING)) | 4507 | (defvar erc-ctcp-query-PING-hook '(erc-ctcp-query-PING)) |
| 4541 | (defun erc-ctcp-query-PING (proc nick login host to msg) | 4508 | (defun erc-ctcp-query-PING (_proc nick _login _host _to msg) |
| 4542 | "Respond to a CTCP PING query." | 4509 | "Respond to a CTCP PING query." |
| 4543 | (when (string-match "^PING\\s-+\\(.*\\)" msg) | 4510 | (when (string-match "^PING\\s-+\\(.*\\)" msg) |
| 4544 | (unless erc-disable-ctcp-replies | 4511 | (unless erc-disable-ctcp-replies |
| @@ -4547,21 +4514,21 @@ See also `erc-display-message'." | |||
| 4547 | nil) | 4514 | nil) |
| 4548 | 4515 | ||
| 4549 | (defvar erc-ctcp-query-TIME-hook '(erc-ctcp-query-TIME)) | 4516 | (defvar erc-ctcp-query-TIME-hook '(erc-ctcp-query-TIME)) |
| 4550 | (defun erc-ctcp-query-TIME (proc nick login host to msg) | 4517 | (defun erc-ctcp-query-TIME (_proc nick _login _host _to _msg) |
| 4551 | "Respond to a CTCP TIME query." | 4518 | "Respond to a CTCP TIME query." |
| 4552 | (unless erc-disable-ctcp-replies | 4519 | (unless erc-disable-ctcp-replies |
| 4553 | (erc-send-ctcp-notice nick (format "TIME %s" (current-time-string)))) | 4520 | (erc-send-ctcp-notice nick (format "TIME %s" (current-time-string)))) |
| 4554 | nil) | 4521 | nil) |
| 4555 | 4522 | ||
| 4556 | (defvar erc-ctcp-query-USERINFO-hook '(erc-ctcp-query-USERINFO)) | 4523 | (defvar erc-ctcp-query-USERINFO-hook '(erc-ctcp-query-USERINFO)) |
| 4557 | (defun erc-ctcp-query-USERINFO (proc nick login host to msg) | 4524 | (defun erc-ctcp-query-USERINFO (_proc nick _login _host _to _msg) |
| 4558 | "Respond to a CTCP USERINFO query." | 4525 | "Respond to a CTCP USERINFO query." |
| 4559 | (unless erc-disable-ctcp-replies | 4526 | (unless erc-disable-ctcp-replies |
| 4560 | (erc-send-ctcp-notice nick (format "USERINFO %s" erc-user-information))) | 4527 | (erc-send-ctcp-notice nick (format "USERINFO %s" erc-user-information))) |
| 4561 | nil) | 4528 | nil) |
| 4562 | 4529 | ||
| 4563 | (defvar erc-ctcp-query-VERSION-hook '(erc-ctcp-query-VERSION)) | 4530 | (defvar erc-ctcp-query-VERSION-hook '(erc-ctcp-query-VERSION)) |
| 4564 | (defun erc-ctcp-query-VERSION (proc nick login host to msg) | 4531 | (defun erc-ctcp-query-VERSION (_proc nick _login _host _to _msg) |
| 4565 | "Respond to a CTCP VERSION query." | 4532 | "Respond to a CTCP VERSION query." |
| 4566 | (unless erc-disable-ctcp-replies | 4533 | (unless erc-disable-ctcp-replies |
| 4567 | (erc-send-ctcp-notice | 4534 | (erc-send-ctcp-notice |
| @@ -4584,7 +4551,7 @@ See also `erc-display-message'." | |||
| 4584 | 'CTCP-UNKNOWN ?n nick ?u login ?h host ?m msg)))) | 4551 | 'CTCP-UNKNOWN ?n nick ?u login ?h host ?m msg)))) |
| 4585 | 4552 | ||
| 4586 | (defvar erc-ctcp-reply-ECHO-hook '(erc-ctcp-reply-ECHO)) | 4553 | (defvar erc-ctcp-reply-ECHO-hook '(erc-ctcp-reply-ECHO)) |
| 4587 | (defun erc-ctcp-reply-ECHO (proc nick login host to msg) | 4554 | (defun erc-ctcp-reply-ECHO (_proc nick _login _host _to msg) |
| 4588 | "Handle a CTCP ECHO reply." | 4555 | "Handle a CTCP ECHO reply." |
| 4589 | (when (string-match "^ECHO\\s-+\\(.*\\)\\s-*$" msg) | 4556 | (when (string-match "^ECHO\\s-+\\(.*\\)\\s-*$" msg) |
| 4590 | (let ((message (match-string 1 msg))) | 4557 | (let ((message (match-string 1 msg))) |
| @@ -4594,7 +4561,7 @@ See also `erc-display-message'." | |||
| 4594 | nil) | 4561 | nil) |
| 4595 | 4562 | ||
| 4596 | (defvar erc-ctcp-reply-CLIENTINFO-hook '(erc-ctcp-reply-CLIENTINFO)) | 4563 | (defvar erc-ctcp-reply-CLIENTINFO-hook '(erc-ctcp-reply-CLIENTINFO)) |
| 4597 | (defun erc-ctcp-reply-CLIENTINFO (proc nick login host to msg) | 4564 | (defun erc-ctcp-reply-CLIENTINFO (_proc nick _login _host _to msg) |
| 4598 | "Handle a CTCP CLIENTINFO reply." | 4565 | "Handle a CTCP CLIENTINFO reply." |
| 4599 | (when (string-match "^CLIENTINFO\\s-+\\(.*\\)\\s-*$" msg) | 4566 | (when (string-match "^CLIENTINFO\\s-+\\(.*\\)\\s-*$" msg) |
| 4600 | (let ((message (match-string 1 msg))) | 4567 | (let ((message (match-string 1 msg))) |
| @@ -4604,7 +4571,7 @@ See also `erc-display-message'." | |||
| 4604 | nil) | 4571 | nil) |
| 4605 | 4572 | ||
| 4606 | (defvar erc-ctcp-reply-FINGER-hook '(erc-ctcp-reply-FINGER)) | 4573 | (defvar erc-ctcp-reply-FINGER-hook '(erc-ctcp-reply-FINGER)) |
| 4607 | (defun erc-ctcp-reply-FINGER (proc nick login host to msg) | 4574 | (defun erc-ctcp-reply-FINGER (_proc nick _login _host _to msg) |
| 4608 | "Handle a CTCP FINGER reply." | 4575 | "Handle a CTCP FINGER reply." |
| 4609 | (when (string-match "^FINGER\\s-+\\(.*\\)\\s-*$" msg) | 4576 | (when (string-match "^FINGER\\s-+\\(.*\\)\\s-*$" msg) |
| 4610 | (let ((message (match-string 1 msg))) | 4577 | (let ((message (match-string 1 msg))) |
| @@ -4614,7 +4581,7 @@ See also `erc-display-message'." | |||
| 4614 | nil) | 4581 | nil) |
| 4615 | 4582 | ||
| 4616 | (defvar erc-ctcp-reply-PING-hook '(erc-ctcp-reply-PING)) | 4583 | (defvar erc-ctcp-reply-PING-hook '(erc-ctcp-reply-PING)) |
| 4617 | (defun erc-ctcp-reply-PING (proc nick login host to msg) | 4584 | (defun erc-ctcp-reply-PING (_proc nick _login _host _to msg) |
| 4618 | "Handle a CTCP PING reply." | 4585 | "Handle a CTCP PING reply." |
| 4619 | (if (not (string-match "^PING\\s-+\\([0-9.]+\\)" msg)) | 4586 | (if (not (string-match "^PING\\s-+\\([0-9.]+\\)" msg)) |
| 4620 | nil | 4587 | nil |
| @@ -4632,7 +4599,7 @@ See also `erc-display-message'." | |||
| 4632 | 'bad-ping-response ?n nick ?t time)))))) | 4599 | 'bad-ping-response ?n nick ?t time)))))) |
| 4633 | 4600 | ||
| 4634 | (defvar erc-ctcp-reply-TIME-hook '(erc-ctcp-reply-TIME)) | 4601 | (defvar erc-ctcp-reply-TIME-hook '(erc-ctcp-reply-TIME)) |
| 4635 | (defun erc-ctcp-reply-TIME (proc nick login host to msg) | 4602 | (defun erc-ctcp-reply-TIME (_proc nick _login _host _to msg) |
| 4636 | "Handle a CTCP TIME reply." | 4603 | "Handle a CTCP TIME reply." |
| 4637 | (when (string-match "^TIME\\s-+\\(.*\\)\\s-*$" msg) | 4604 | (when (string-match "^TIME\\s-+\\(.*\\)\\s-*$" msg) |
| 4638 | (let ((message (match-string 1 msg))) | 4605 | (let ((message (match-string 1 msg))) |
| @@ -4642,7 +4609,7 @@ See also `erc-display-message'." | |||
| 4642 | nil) | 4609 | nil) |
| 4643 | 4610 | ||
| 4644 | (defvar erc-ctcp-reply-VERSION-hook '(erc-ctcp-reply-VERSION)) | 4611 | (defvar erc-ctcp-reply-VERSION-hook '(erc-ctcp-reply-VERSION)) |
| 4645 | (defun erc-ctcp-reply-VERSION (proc nick login host to msg) | 4612 | (defun erc-ctcp-reply-VERSION (_proc nick _login _host _to msg) |
| 4646 | "Handle a CTCP VERSION reply." | 4613 | "Handle a CTCP VERSION reply." |
| 4647 | (when (string-match "^VERSION\\s-+\\(.*\\)\\s-*$" msg) | 4614 | (when (string-match "^VERSION\\s-+\\(.*\\)\\s-*$" msg) |
| 4648 | (let ((message (match-string 1 msg))) | 4615 | (let ((message (match-string 1 msg))) |
| @@ -4705,7 +4672,7 @@ received. Should be called with the current buffer set to the | |||
| 4705 | channel buffer. | 4672 | channel buffer. |
| 4706 | 4673 | ||
| 4707 | See also `erc-channel-begin-receiving-names'." | 4674 | See also `erc-channel-begin-receiving-names'." |
| 4708 | (maphash (lambda (nick user) | 4675 | (maphash (lambda (nick _user) |
| 4709 | (if (null (gethash nick erc-channel-new-member-names)) | 4676 | (if (null (gethash nick erc-channel-new-member-names)) |
| 4710 | (erc-remove-channel-user nick))) | 4677 | (erc-remove-channel-user nick))) |
| 4711 | erc-channel-users) | 4678 | erc-channel-users) |
| @@ -4746,8 +4713,7 @@ channel." | |||
| 4746 | (setq names (delete "" (split-string names-string))) | 4713 | (setq names (delete "" (split-string names-string))) |
| 4747 | (let ((erc-channel-members-changed-hook nil)) | 4714 | (let ((erc-channel-members-changed-hook nil)) |
| 4748 | (dolist (item names) | 4715 | (dolist (item names) |
| 4749 | (let ((updatep t) | 4716 | (let ((updatep t)) |
| 4750 | ch) | ||
| 4751 | (if (rassq (elt item 0) prefix) | 4717 | (if (rassq (elt item 0) prefix) |
| 4752 | (cond ((= (length item) 1) | 4718 | (cond ((= (length item) 1) |
| 4753 | (setq updatep nil)) | 4719 | (setq updatep nil)) |
| @@ -4780,8 +4746,7 @@ The buffer where the change happened is current while this hook is called." | |||
| 4780 | 4746 | ||
| 4781 | (defun erc-update-user-nick (nick &optional new-nick | 4747 | (defun erc-update-user-nick (nick &optional new-nick |
| 4782 | host login full-name info) | 4748 | host login full-name info) |
| 4783 | "Updates the stored user information for the user with nickname | 4749 | "Update the stored user information for the user with nickname NICK. |
| 4784 | NICK. | ||
| 4785 | 4750 | ||
| 4786 | See also: `erc-update-user'." | 4751 | See also: `erc-update-user'." |
| 4787 | (erc-update-user (erc-get-server-user nick) new-nick | 4752 | (erc-update-user (erc-get-server-user nick) new-nick |
| @@ -4831,8 +4796,8 @@ which USER is a member, and t is returned." | |||
| 4831 | (defun erc-update-current-channel-member | 4796 | (defun erc-update-current-channel-member |
| 4832 | (nick new-nick &optional add op voice host login full-name info | 4797 | (nick new-nick &optional add op voice host login full-name info |
| 4833 | update-message-time) | 4798 | update-message-time) |
| 4834 | "Updates the stored user information for the user with nickname | 4799 | "Update the stored user information for the user with nickname NICK. |
| 4835 | NICK. `erc-update-user' is called to handle changes to nickname, | 4800 | `erc-update-user' is called to handle changes to nickname, |
| 4836 | HOST, LOGIN, FULL-NAME, and INFO. If OP or VOICE are non-nil, | 4801 | HOST, LOGIN, FULL-NAME, and INFO. If OP or VOICE are non-nil, |
| 4837 | they must be equal to either `on' or `off', in which case the | 4802 | they must be equal to either `on' or `off', in which case the |
| 4838 | operator or voice status of the user in the current channel is | 4803 | operator or voice status of the user in the current channel is |
| @@ -4850,7 +4815,7 @@ If, and only if, changes are made, or the user is added, | |||
| 4850 | See also: `erc-update-user' and `erc-update-channel-member'." | 4815 | See also: `erc-update-user' and `erc-update-channel-member'." |
| 4851 | (let* (changed user-changed | 4816 | (let* (changed user-changed |
| 4852 | (channel-data (erc-get-channel-user nick)) | 4817 | (channel-data (erc-get-channel-user nick)) |
| 4853 | (cuser (if channel-data (cdr channel-data))) | 4818 | (cuser (cdr channel-data)) |
| 4854 | (user (if channel-data (car channel-data) | 4819 | (user (if channel-data (car channel-data) |
| 4855 | (erc-get-server-user nick)))) | 4820 | (erc-get-server-user nick)))) |
| 4856 | (if cuser | 4821 | (if cuser |
| @@ -4908,7 +4873,7 @@ See also: `erc-update-user' and `erc-update-channel-member'." | |||
| 4908 | (defun erc-update-channel-member (channel nick new-nick | 4873 | (defun erc-update-channel-member (channel nick new-nick |
| 4909 | &optional add op voice host login | 4874 | &optional add op voice host login |
| 4910 | full-name info update-message-time) | 4875 | full-name info update-message-time) |
| 4911 | "Updates user and channel information for the user with | 4876 | "Update user and channel information for the user with |
| 4912 | nickname NICK in channel CHANNEL. | 4877 | nickname NICK in channel CHANNEL. |
| 4913 | 4878 | ||
| 4914 | See also: `erc-update-current-channel-member'." | 4879 | See also: `erc-update-current-channel-member'." |
| @@ -4951,7 +4916,6 @@ TOPIC string to the current topic." | |||
| 4951 | "Set the modes for the TGT provided as MODE-STRING." | 4916 | "Set the modes for the TGT provided as MODE-STRING." |
| 4952 | (let* ((modes (erc-parse-modes mode-string)) | 4917 | (let* ((modes (erc-parse-modes mode-string)) |
| 4953 | (add-modes (nth 0 modes)) | 4918 | (add-modes (nth 0 modes)) |
| 4954 | (remove-modes (nth 1 modes)) | ||
| 4955 | ;; list of triples: (mode-char 'on/'off argument) | 4919 | ;; list of triples: (mode-char 'on/'off argument) |
| 4956 | (arg-modes (nth 2 modes))) | 4920 | (arg-modes (nth 2 modes))) |
| 4957 | (cond ((erc-channel-p tgt); channel modes | 4921 | (cond ((erc-channel-p tgt); channel modes |
| @@ -5040,6 +5004,7 @@ arg-modes is a list of triples of the form: | |||
| 5040 | "Update the mode information for TGT, provided as MODE-STRING. | 5004 | "Update the mode information for TGT, provided as MODE-STRING. |
| 5041 | Optional arguments: NICK, HOST and LOGIN - the attributes of the | 5005 | Optional arguments: NICK, HOST and LOGIN - the attributes of the |
| 5042 | person who changed the modes." | 5006 | person who changed the modes." |
| 5007 | ;; FIXME: neither of nick, host, and login are used! | ||
| 5043 | (let* ((modes (erc-parse-modes mode-string)) | 5008 | (let* ((modes (erc-parse-modes mode-string)) |
| 5044 | (add-modes (nth 0 modes)) | 5009 | (add-modes (nth 0 modes)) |
| 5045 | (remove-modes (nth 1 modes)) | 5010 | (remove-modes (nth 1 modes)) |
| @@ -5197,8 +5162,7 @@ START and END describe positions in OBJECT. | |||
| 5197 | If VALUE-LIST is nil, set each property in PROPERTIES to t, else set | 5162 | If VALUE-LIST is nil, set each property in PROPERTIES to t, else set |
| 5198 | each property to the corresponding value in VALUE-LIST." | 5163 | each property to the corresponding value in VALUE-LIST." |
| 5199 | (unless value-list | 5164 | (unless value-list |
| 5200 | (setq value-list (mapcar (lambda (x) | 5165 | (setq value-list (mapcar (lambda (_x) t) |
| 5201 | t) | ||
| 5202 | properties))) | 5166 | properties))) |
| 5203 | (while (and properties value-list) | 5167 | (while (and properties value-list) |
| 5204 | (erc-put-text-property | 5168 | (erc-put-text-property |
| @@ -5290,7 +5254,7 @@ submitted line to be intentional." | |||
| 5290 | "Regular expression used for matching commands in ERC.") | 5254 | "Regular expression used for matching commands in ERC.") |
| 5291 | 5255 | ||
| 5292 | (defun erc-send-input (input) | 5256 | (defun erc-send-input (input) |
| 5293 | "Treat INPUT as typed in by the user. It is assumed that the input | 5257 | "Treat INPUT as typed in by the user. It is assumed that the input |
| 5294 | and the prompt is already deleted. | 5258 | and the prompt is already deleted. |
| 5295 | This returns non-nil only if we actually send anything." | 5259 | This returns non-nil only if we actually send anything." |
| 5296 | ;; Handle different kinds of inputs | 5260 | ;; Handle different kinds of inputs |
| @@ -5380,8 +5344,8 @@ list of the form: (command args) where both elements are strings." | |||
| 5380 | (when (string-match erc-command-regexp line) | 5344 | (when (string-match erc-command-regexp line) |
| 5381 | (let* ((cmd (erc-command-symbol (match-string 1 line))) | 5345 | (let* ((cmd (erc-command-symbol (match-string 1 line))) |
| 5382 | ;; note: return is nil, we apply this simply for side effects | 5346 | ;; note: return is nil, we apply this simply for side effects |
| 5383 | (canon-defun (while (and cmd (symbolp (symbol-function cmd))) | 5347 | (_canon-defun (while (and cmd (symbolp (symbol-function cmd))) |
| 5384 | (setq cmd (symbol-function cmd)))) | 5348 | (setq cmd (symbol-function cmd)))) |
| 5385 | (cmd-fun (or cmd #'erc-cmd-default)) | 5349 | (cmd-fun (or cmd #'erc-cmd-default)) |
| 5386 | (arg (if cmd | 5350 | (arg (if cmd |
| 5387 | (if (get cmd-fun 'do-not-parse-args) | 5351 | (if (get cmd-fun 'do-not-parse-args) |
| @@ -5449,22 +5413,18 @@ See also `erc-downcase'." | |||
| 5449 | 5413 | ||
| 5450 | (defun erc-add-default-channel (channel) | 5414 | (defun erc-add-default-channel (channel) |
| 5451 | "Add CHANNEL to the default channel list." | 5415 | "Add CHANNEL to the default channel list." |
| 5452 | 5416 | (let ((chl (downcase channel))) | |
| 5453 | (let ((d1 (car erc-default-recipients)) | ||
| 5454 | (d2 (cdr erc-default-recipients)) | ||
| 5455 | (chl (downcase channel))) | ||
| 5456 | (setq erc-default-recipients | 5417 | (setq erc-default-recipients |
| 5457 | (cons chl erc-default-recipients)))) | 5418 | (cons chl erc-default-recipients)))) |
| 5458 | 5419 | ||
| 5459 | (defun erc-delete-default-channel (channel &optional buffer) | 5420 | (defun erc-delete-default-channel (channel &optional buffer) |
| 5460 | "Delete CHANNEL from the default channel list." | 5421 | "Delete CHANNEL from the default channel list." |
| 5461 | (let ((ob (current-buffer))) | 5422 | (with-current-buffer (if (and buffer |
| 5462 | (with-current-buffer (if (and buffer | 5423 | (bufferp buffer)) |
| 5463 | (bufferp buffer)) | 5424 | buffer |
| 5464 | buffer | 5425 | (current-buffer)) |
| 5465 | (current-buffer)) | 5426 | (setq erc-default-recipients (delete (downcase channel) |
| 5466 | (setq erc-default-recipients (delete (downcase channel) | 5427 | erc-default-recipients)))) |
| 5467 | erc-default-recipients))))) | ||
| 5468 | 5428 | ||
| 5469 | (defun erc-add-query (nickname) | 5429 | (defun erc-add-query (nickname) |
| 5470 | "Add QUERY'd NICKNAME to the default channel list. | 5430 | "Add QUERY'd NICKNAME to the default channel list. |
| @@ -5473,10 +5433,10 @@ The previous default target of QUERY type gets removed." | |||
| 5473 | (let ((d1 (car erc-default-recipients)) | 5433 | (let ((d1 (car erc-default-recipients)) |
| 5474 | (d2 (cdr erc-default-recipients)) | 5434 | (d2 (cdr erc-default-recipients)) |
| 5475 | (qt (cons 'QUERY (downcase nickname)))) | 5435 | (qt (cons 'QUERY (downcase nickname)))) |
| 5476 | (if (and (listp d1) | 5436 | (setq erc-default-recipients (cons qt (if (and (listp d1) |
| 5477 | (eq (car d1) 'QUERY)) | 5437 | (eq (car d1) 'QUERY)) |
| 5478 | (setq erc-default-recipients (cons qt d2)) | 5438 | d2 |
| 5479 | (setq erc-default-recipients (cons qt erc-default-recipients))))) | 5439 | erc-default-recipients))))) |
| 5480 | 5440 | ||
| 5481 | (defun erc-delete-query () | 5441 | (defun erc-delete-query () |
| 5482 | "Delete the topmost target if it is a QUERY." | 5442 | "Delete the topmost target if it is a QUERY." |
| @@ -5527,17 +5487,11 @@ The addressed target is the string before the first colon in MSG." | |||
| 5527 | (let ((nick (erc-server-user-nickname user)) | 5487 | (let ((nick (erc-server-user-nickname user)) |
| 5528 | (host (erc-server-user-host user)) | 5488 | (host (erc-server-user-host user)) |
| 5529 | (login (erc-server-user-login user))) | 5489 | (login (erc-server-user-login user))) |
| 5530 | (concat (if nick | 5490 | (concat (or nick "") |
| 5531 | nick | ||
| 5532 | "") | ||
| 5533 | "!" | 5491 | "!" |
| 5534 | (if login | 5492 | (or login "") |
| 5535 | login | ||
| 5536 | "") | ||
| 5537 | "@" | 5493 | "@" |
| 5538 | (if host | 5494 | (or host "")))) |
| 5539 | host | ||
| 5540 | "")))) | ||
| 5541 | 5495 | ||
| 5542 | (defun erc-list-match (lst str) | 5496 | (defun erc-list-match (lst str) |
| 5543 | "Return non-nil if any regexp in LST matches STR." | 5497 | "Return non-nil if any regexp in LST matches STR." |
| @@ -5588,7 +5542,7 @@ This command is sent even if excess flood is detected." | |||
| 5588 | (interactive "P") | 5542 | (interactive "P") |
| 5589 | (erc-set-active-buffer (current-buffer)) | 5543 | (erc-set-active-buffer (current-buffer)) |
| 5590 | (let ((tgt (erc-default-target)) | 5544 | (let ((tgt (erc-default-target)) |
| 5591 | (erc-force-send t)) | 5545 | (erc-force-send t)) ;FIXME: Not used anywhere! |
| 5592 | (cond ((or (not tgt) (not (erc-channel-p tgt))) | 5546 | (cond ((or (not tgt) (not (erc-channel-p tgt))) |
| 5593 | (erc-display-message nil 'error (current-buffer) 'no-target)) | 5547 | (erc-display-message nil 'error (current-buffer) 'no-target)) |
| 5594 | (arg (erc-load-irc-script-lines (list (concat "/mode " tgt " -i")) | 5548 | (arg (erc-load-irc-script-lines (list (concat "/mode " tgt " -i")) |
| @@ -5626,7 +5580,7 @@ If CHANNEL is non-nil, toggle MODE for that channel, otherwise use | |||
| 5626 | (interactive "P") | 5580 | (interactive "P") |
| 5627 | (erc-set-active-buffer (current-buffer)) | 5581 | (erc-set-active-buffer (current-buffer)) |
| 5628 | (let ((tgt (or channel (erc-default-target))) | 5582 | (let ((tgt (or channel (erc-default-target))) |
| 5629 | (erc-force-send t)) | 5583 | (erc-force-send t)) ;FIXME: Not used anywhere! |
| 5630 | (cond ((or (null tgt) (null (erc-channel-p tgt))) | 5584 | (cond ((or (null tgt) (null (erc-channel-p tgt))) |
| 5631 | (erc-display-message nil 'error 'active 'no-target)) | 5585 | (erc-display-message nil 'error 'active 'no-target)) |
| 5632 | ((member mode erc-channel-modes) | 5586 | ((member mode erc-channel-modes) |
| @@ -5670,12 +5624,11 @@ specified in the list PATH. | |||
| 5670 | If FILE is found, return the path to it." | 5624 | If FILE is found, return the path to it." |
| 5671 | (let ((filepath file)) | 5625 | (let ((filepath file)) |
| 5672 | (if (file-readable-p filepath) filepath | 5626 | (if (file-readable-p filepath) filepath |
| 5673 | (progn | 5627 | (while (and path |
| 5674 | (while (and path | 5628 | (progn (setq filepath (expand-file-name file (car path))) |
| 5675 | (progn (setq filepath (expand-file-name file (car path))) | 5629 | (not (file-readable-p filepath)))) |
| 5676 | (not (file-readable-p filepath)))) | 5630 | (setq path (cdr path))) |
| 5677 | (setq path (cdr path))) | 5631 | (if path filepath nil)))) |
| 5678 | (if path filepath nil))))) | ||
| 5679 | 5632 | ||
| 5680 | (defun erc-select-startup-file () | 5633 | (defun erc-select-startup-file () |
| 5681 | "Select an ERC startup file. | 5634 | "Select an ERC startup file. |
| @@ -5789,7 +5742,6 @@ If optional NOEXPAND is non-nil, do not expand script-specific | |||
| 5789 | sequences, process the lines verbatim. Use this for multiline | 5742 | sequences, process the lines verbatim. Use this for multiline |
| 5790 | user input." | 5743 | user input." |
| 5791 | (let* ((cb (current-buffer)) | 5744 | (let* ((cb (current-buffer)) |
| 5792 | (pnt (point)) | ||
| 5793 | (s "") | 5745 | (s "") |
| 5794 | (sp (or (erc-command-indicator) (erc-prompt))) | 5746 | (sp (or (erc-command-indicator) (erc-prompt))) |
| 5795 | (args (and (boundp 'erc-script-args) erc-script-args))) | 5747 | (args (and (boundp 'erc-script-args) erc-script-args))) |
| @@ -6030,13 +5982,12 @@ entry of `channel-members'." | |||
| 6030 | (user (if channel-data | 5982 | (user (if channel-data |
| 6031 | (car channel-data) | 5983 | (car channel-data) |
| 6032 | (erc-get-server-user word))) | 5984 | (erc-get-server-user word))) |
| 6033 | host login full-name info nick op voice) | 5985 | host login full-name nick op voice) |
| 6034 | (when user | 5986 | (when user |
| 6035 | (setq nick (erc-server-user-nickname user) | 5987 | (setq nick (erc-server-user-nickname user) |
| 6036 | host (erc-server-user-host user) | 5988 | host (erc-server-user-host user) |
| 6037 | login (erc-server-user-login user) | 5989 | login (erc-server-user-login user) |
| 6038 | full-name (erc-server-user-full-name user) | 5990 | full-name (erc-server-user-full-name user)) |
| 6039 | info (erc-server-user-info user)) | ||
| 6040 | (if cuser | 5991 | (if cuser |
| 6041 | (setq op (erc-channel-user-op cuser) | 5992 | (setq op (erc-channel-user-op cuser) |
| 6042 | voice (erc-channel-user-voice cuser))) | 5993 | voice (erc-channel-user-voice cuser))) |
| @@ -6048,7 +5999,7 @@ entry of `channel-members'." | |||
| 6048 | (format " and is +%s%s on %s" | 5999 | (format " and is +%s%s on %s" |
| 6049 | (if op "o" "") | 6000 | (if op "o" "") |
| 6050 | (if voice "v" "") | 6001 | (if voice "v" "") |
| 6051 | (erc-default-target)) | 6002 | (erc-default-target)) |
| 6052 | "")) | 6003 | "")) |
| 6053 | user)))) | 6004 | user)))) |
| 6054 | 6005 | ||
| @@ -6597,7 +6548,7 @@ See also `format-spec'." | |||
| 6597 | (add-hook 'kill-buffer-hook 'erc-kill-buffer-function) | 6548 | (add-hook 'kill-buffer-hook 'erc-kill-buffer-function) |
| 6598 | 6549 | ||
| 6599 | (defcustom erc-kill-server-hook '(erc-kill-server) | 6550 | (defcustom erc-kill-server-hook '(erc-kill-server) |
| 6600 | "Invoked whenever a server-buffer is killed via `kill-buffer'." | 6551 | "Invoked whenever a server buffer is killed via `kill-buffer'." |
| 6601 | :group 'erc-hooks | 6552 | :group 'erc-hooks |
| 6602 | :type 'hook) | 6553 | :type 'hook) |
| 6603 | 6554 | ||
| @@ -6702,9 +6653,9 @@ Otherwise, connect to HOST:PORT as USER and /join CHANNEL." | |||
| 6702 | 6653 | ||
| 6703 | (provide 'erc) | 6654 | (provide 'erc) |
| 6704 | 6655 | ||
| 6705 | ;;; Deprecated. We might eventually stop requiring the goodies automatically. | 6656 | ;; Deprecated. We might eventually stop requiring the goodies automatically. |
| 6706 | ;;; IMPORTANT: This require must appear _after_ the above (provide 'erc) to | 6657 | ;; IMPORTANT: This require must appear _after_ the above (provide 'erc) to |
| 6707 | ;;; avoid a recursive require error when byte-compiling the entire package. | 6658 | ;; avoid a recursive require error when byte-compiling the entire package. |
| 6708 | (require 'erc-goodies) | 6659 | (require 'erc-goodies) |
| 6709 | 6660 | ||
| 6710 | ;;; erc.el ends here | 6661 | ;;; erc.el ends here |
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index 69dc6c76b41..ef8a53f3c0b 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el | |||
| @@ -993,14 +993,6 @@ at the moment are: | |||
| 993 | ,@commands | 993 | ,@commands |
| 994 | (eshell-debug-command ,(concat "done " (eval tag)) form)))) | 994 | (eshell-debug-command ,(concat "done " (eval tag)) form)))) |
| 995 | 995 | ||
| 996 | (defsubst eshell-macrop (object) | ||
| 997 | "Return t if OBJECT is a macro or nil otherwise." | ||
| 998 | (and (symbolp object) (fboundp object) | ||
| 999 | (setq object (indirect-function object)) | ||
| 1000 | (listp object) | ||
| 1001 | (eq 'macro (car object)) | ||
| 1002 | (functionp (cdr object)))) | ||
| 1003 | |||
| 1004 | (defun eshell-do-eval (form &optional synchronous-p) | 996 | (defun eshell-do-eval (form &optional synchronous-p) |
| 1005 | "Evaluate form, simplifying it as we go. | 997 | "Evaluate form, simplifying it as we go. |
| 1006 | Unless SYNCHRONOUS-P is non-nil, throws `eshell-defer' if it needs to | 998 | Unless SYNCHRONOUS-P is non-nil, throws `eshell-defer' if it needs to |
| @@ -1016,7 +1008,7 @@ be finished later after the completion of an asynchronous subprocess." | |||
| 1016 | (setq form (cadr (cadr form)))) | 1008 | (setq form (cadr (cadr form)))) |
| 1017 | ;; expand any macros directly into the form. This is done so that | 1009 | ;; expand any macros directly into the form. This is done so that |
| 1018 | ;; we can modify any `let' forms to evaluate only once. | 1010 | ;; we can modify any `let' forms to evaluate only once. |
| 1019 | (if (eshell-macrop (car form)) | 1011 | (if (macrop (car form)) |
| 1020 | (let ((exp (eshell-copy-tree (macroexpand form)))) | 1012 | (let ((exp (eshell-copy-tree (macroexpand form)))) |
| 1021 | (eshell-manipulate (format "expanding macro `%s'" | 1013 | (eshell-manipulate (format "expanding macro `%s'" |
| 1022 | (symbol-name (car form))) | 1014 | (symbol-name (car form))) |
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index 5346bd16fd2..ed5fecf09ff 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el | |||
| @@ -740,7 +740,7 @@ This is done after all necessary filtering has been done." | |||
| 740 | (if (<= (point) oend) | 740 | (if (<= (point) oend) |
| 741 | (setq oend (+ oend nchars))) | 741 | (setq oend (+ oend nchars))) |
| 742 | (insert-before-markers string) | 742 | (insert-before-markers string) |
| 743 | (if (= (window-start (selected-window)) (point)) | 743 | (if (= (window-start) (point)) |
| 744 | (set-window-start (selected-window) | 744 | (set-window-start (selected-window) |
| 745 | (- (point) nchars))) | 745 | (- (point) nchars))) |
| 746 | (if (= (point) eshell-last-input-end) | 746 | (if (= (point) eshell-last-input-end) |
diff --git a/lisp/ffap.el b/lisp/ffap.el index 70096248e19..737de8b5991 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el | |||
| @@ -1073,7 +1073,7 @@ Assumes the buffer has not changed." | |||
| 1073 | (or (and (eq major-mode 'w3-mode) ; In a w3 buffer button? | 1073 | (or (and (eq major-mode 'w3-mode) ; In a w3 buffer button? |
| 1074 | (w3-view-this-url t)) | 1074 | (w3-view-this-url t)) |
| 1075 | (let ((thing-at-point-beginning-of-url-regexp ffap-url-regexp) | 1075 | (let ((thing-at-point-beginning-of-url-regexp ffap-url-regexp) |
| 1076 | (thing-at-point-default-mail-scheme ffap-foo-at-bar-prefix)) | 1076 | (thing-at-point-default-mail-uri-scheme ffap-foo-at-bar-prefix)) |
| 1077 | (thing-at-point-url-at-point t | 1077 | (thing-at-point-url-at-point t |
| 1078 | (if (use-region-p) | 1078 | (if (use-region-p) |
| 1079 | (cons (region-beginning) | 1079 | (cons (region-beginning) |
| @@ -1736,7 +1736,7 @@ Only intended for interactive use." | |||
| 1736 | ;; Preserve selected buffer, but do not do save-window-excursion, | 1736 | ;; Preserve selected buffer, but do not do save-window-excursion, |
| 1737 | ;; since we want to see any window created by the form. Temporarily | 1737 | ;; since we want to see any window created by the form. Temporarily |
| 1738 | ;; select the article buffer, so we can see any point movement. | 1738 | ;; select the article buffer, so we can see any point movement. |
| 1739 | (let ((sb (window-buffer (selected-window)))) | 1739 | (let ((sb (window-buffer))) |
| 1740 | (gnus-configure-windows 'article) | 1740 | (gnus-configure-windows 'article) |
| 1741 | (pop-to-buffer gnus-article-buffer) | 1741 | (pop-to-buffer gnus-article-buffer) |
| 1742 | (widen) | 1742 | (widen) |
diff --git a/lisp/filecache.el b/lisp/filecache.el index ae3cb8d074a..69649e105bc 100644 --- a/lisp/filecache.el +++ b/lisp/filecache.el | |||
| @@ -453,8 +453,9 @@ message reporting the number of file names deleted." | |||
| 453 | (dolist (f files) | 453 | (dolist (f files) |
| 454 | (if (file-cache-delete-file f) | 454 | (if (file-cache-delete-file f) |
| 455 | (setq n (1+ n)))) | 455 | (setq n (1+ n)))) |
| 456 | (message "Filecache: uncached %d file name%s." | 456 | (when message |
| 457 | n (if (= n 1) "" "s")))) | 457 | (message "Filecache: uncached %d file name%s." |
| 458 | n (if (= n 1) "" "s"))))) | ||
| 458 | 459 | ||
| 459 | (defun file-cache-delete-file-regexp (regexp) | 460 | (defun file-cache-delete-file-regexp (regexp) |
| 460 | "Delete files matching REGEXP from the file cache." | 461 | "Delete files matching REGEXP from the file cache." |
| @@ -679,10 +680,7 @@ match REGEXP." | |||
| 679 | "*File Cache Files Matching*"))) | 680 | "*File Cache Files Matching*"))) |
| 680 | (erase-buffer) | 681 | (erase-buffer) |
| 681 | (insert | 682 | (insert |
| 682 | (mapconcat | 683 | (mapconcat #'identity results "\n")) |
| 683 | 'identity | ||
| 684 | results | ||
| 685 | "\n")) | ||
| 686 | (goto-char (point-min)) | 684 | (goto-char (point-min)) |
| 687 | (display-buffer buf))) | 685 | (display-buffer buf))) |
| 688 | 686 | ||
diff --git a/lisp/filenotify.el b/lisp/filenotify.el index d2f37b99107..5a5435bb4cb 100644 --- a/lisp/filenotify.el +++ b/lisp/filenotify.el | |||
| @@ -92,7 +92,7 @@ car of that event, which is the symbol `file-notify'." | |||
| 92 | (pending-event (assoc desc file-notify--pending-events)) | 92 | (pending-event (assoc desc file-notify--pending-events)) |
| 93 | (actions (nth 1 event)) | 93 | (actions (nth 1 event)) |
| 94 | (file (file-notify--event-file-name event)) | 94 | (file (file-notify--event-file-name event)) |
| 95 | file1 cookie callback) | 95 | file1 callback) |
| 96 | 96 | ||
| 97 | ;; Make actions a list. | 97 | ;; Make actions a list. |
| 98 | (unless (consp actions) (setq actions (cons actions nil))) | 98 | (unless (consp actions) (setq actions (cons actions nil))) |
diff --git a/lisp/files.el b/lisp/files.el index 526c535450b..f9ff3c936bd 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -1603,13 +1603,16 @@ killed." | |||
| 1603 | "Create a suitably named buffer for visiting FILENAME, and return it. | 1603 | "Create a suitably named buffer for visiting FILENAME, and return it. |
| 1604 | FILENAME (sans directory) is used unchanged if that name is free; | 1604 | FILENAME (sans directory) is used unchanged if that name is free; |
| 1605 | otherwise a string <2> or <3> or ... is appended to get an unused name. | 1605 | otherwise a string <2> or <3> or ... is appended to get an unused name. |
| 1606 | Spaces at the start of FILENAME (sans directory) are removed." | 1606 | |
| 1607 | Emacs treats buffers whose names begin with a space as internal buffers. | ||
| 1608 | To avoid confusion when visiting a file whose name begins with a space, | ||
| 1609 | this function prepends a \"|\" to the final result if necessary." | ||
| 1607 | (let ((lastname (file-name-nondirectory filename))) | 1610 | (let ((lastname (file-name-nondirectory filename))) |
| 1608 | (if (string= lastname "") | 1611 | (if (string= lastname "") |
| 1609 | (setq lastname filename)) | 1612 | (setq lastname filename)) |
| 1610 | (save-match-data | 1613 | (generate-new-buffer (if (string-match-p "\\` " lastname) |
| 1611 | (string-match "^ *\\(.*\\)" lastname) | 1614 | (concat "|" lastname) |
| 1612 | (generate-new-buffer (match-string 1 lastname))))) | 1615 | lastname)))) |
| 1613 | 1616 | ||
| 1614 | (defun generate-new-buffer (name) | 1617 | (defun generate-new-buffer (name) |
| 1615 | "Create and return a buffer with a name based on NAME. | 1618 | "Create and return a buffer with a name based on NAME. |
| @@ -2272,8 +2275,8 @@ since only a single case-insensitive search through the alist is made." | |||
| 2272 | ("\\.scm\\.[0-9]*\\'" . scheme-mode) | 2275 | ("\\.scm\\.[0-9]*\\'" . scheme-mode) |
| 2273 | ("\\.[ck]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode) | 2276 | ("\\.[ck]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode) |
| 2274 | ("\\.bash\\'" . sh-mode) | 2277 | ("\\.bash\\'" . sh-mode) |
| 2275 | ("\\(/\\|\\`\\)\\.\\(bash_profile\\|z?login\\|bash_login\\|z?logout\\)\\'" . sh-mode) | 2278 | ("\\(/\\|\\`\\)\\.\\(bash_\\(profile\\|history\\|log\\(in\\|out\\)\\)\\|z?log\\(in\\|out\\)\\)\\'" . sh-mode) |
| 2276 | ("\\(/\\|\\`\\)\\.\\(bash_logout\\|shrc\\|[kz]shrc\\|bashrc\\|t?cshrc\\|esrc\\)\\'" . sh-mode) | 2279 | ("\\(/\\|\\`\\)\\.\\(shrc\\|[kz]shrc\\|bashrc\\|t?cshrc\\|esrc\\)\\'" . sh-mode) |
| 2277 | ("\\(/\\|\\`\\)\\.\\([kz]shenv\\|xinitrc\\|startxrc\\|xsession\\)\\'" . sh-mode) | 2280 | ("\\(/\\|\\`\\)\\.\\([kz]shenv\\|xinitrc\\|startxrc\\|xsession\\)\\'" . sh-mode) |
| 2278 | ("\\.m?spec\\'" . sh-mode) | 2281 | ("\\.m?spec\\'" . sh-mode) |
| 2279 | ("\\.m[mes]\\'" . nroff-mode) | 2282 | ("\\.m[mes]\\'" . nroff-mode) |
| @@ -2451,6 +2454,7 @@ and `magic-mode-alist', which determines modes based on file contents.") | |||
| 2451 | ("wishx" . tcl-mode) | 2454 | ("wishx" . tcl-mode) |
| 2452 | ("tcl" . tcl-mode) | 2455 | ("tcl" . tcl-mode) |
| 2453 | ("tclsh" . tcl-mode) | 2456 | ("tclsh" . tcl-mode) |
| 2457 | ("expect" . tcl-mode) | ||
| 2454 | ("scm" . scheme-mode) | 2458 | ("scm" . scheme-mode) |
| 2455 | ("ash" . sh-mode) | 2459 | ("ash" . sh-mode) |
| 2456 | ("bash" . sh-mode) | 2460 | ("bash" . sh-mode) |
| @@ -6690,7 +6694,9 @@ based on existing mode bits, as in \"og+rX-w\"." | |||
| 6690 | (string-to-number value 8) | 6694 | (string-to-number value 8) |
| 6691 | (file-modes-symbolic-to-number value modes))))) | 6695 | (file-modes-symbolic-to-number value modes))))) |
| 6692 | 6696 | ||
| 6693 | 6697 | (define-obsolete-variable-alias 'cache-long-line-scans | |
| 6698 | 'cache-long-scans "24.4") | ||
| 6699 | |||
| 6694 | ;; Trashcan handling. | 6700 | ;; Trashcan handling. |
| 6695 | (defcustom trash-directory nil | 6701 | (defcustom trash-directory nil |
| 6696 | "Directory for `move-file-to-trash' to move files and directories to. | 6702 | "Directory for `move-file-to-trash' to move files and directories to. |
diff --git a/lisp/filesets.el b/lisp/filesets.el index fbf28dbecbc..82891770f12 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el | |||
| @@ -214,8 +214,8 @@ key is supported." | |||
| 214 | 214 | ||
| 215 | (defun filesets-which-command-p (cmd) | 215 | (defun filesets-which-command-p (cmd) |
| 216 | "Call \"which CMD\" and return non-nil if the command was found." | 216 | "Call \"which CMD\" and return non-nil if the command was found." |
| 217 | (when (string-match (format "\\(/[^/]+\\)?/%s" cmd) | 217 | (when (string-match-p (format "\\(/[^/]+\\)?/%s" cmd) |
| 218 | (filesets-which-command cmd)) | 218 | (filesets-which-command cmd)) |
| 219 | cmd)) | 219 | cmd)) |
| 220 | 220 | ||
| 221 | (defun filesets-message (level &rest args) | 221 | (defun filesets-message (level &rest args) |
| @@ -1082,7 +1082,7 @@ defined in `filesets-ingroup-patterns'." | |||
| 1082 | 1082 | ||
| 1083 | (require 'easymenu) | 1083 | (require 'easymenu) |
| 1084 | 1084 | ||
| 1085 | (defun filesets-error (class &rest args) | 1085 | (defun filesets-error (_class &rest args) |
| 1086 | "`error' wrapper." | 1086 | "`error' wrapper." |
| 1087 | (error "%s" (mapconcat 'identity args " "))) | 1087 | (error "%s" (mapconcat 'identity args " "))) |
| 1088 | 1088 | ||
| @@ -1093,10 +1093,10 @@ defined in `filesets-ingroup-patterns'." | |||
| 1093 | If NEGATIVE is non-nil, remove all directory names." | 1093 | If NEGATIVE is non-nil, remove all directory names." |
| 1094 | (filesets-filter-list lst | 1094 | (filesets-filter-list lst |
| 1095 | (lambda (x) | 1095 | (lambda (x) |
| 1096 | (and (not (string-match "^\\.+/$" x)) | 1096 | (and (not (string-match-p "^\\.+/$" x)) |
| 1097 | (if negative | 1097 | (if negative |
| 1098 | (not (string-match "[:/\\]$" x)) | 1098 | (not (string-match-p "[:/\\]$" x)) |
| 1099 | (string-match "[:/\\]$" x)))))) | 1099 | (string-match-p "[:/\\]$" x)))))) |
| 1100 | 1100 | ||
| 1101 | (defun filesets-conditional-sort (lst &optional access-fn) | 1101 | (defun filesets-conditional-sort (lst &optional access-fn) |
| 1102 | "Return a sorted copy of LST, LST being a list of strings. | 1102 | "Return a sorted copy of LST, LST being a list of strings. |
| @@ -1130,18 +1130,18 @@ Return full path if FULL-FLAG is non-nil." | |||
| 1130 | (dirs nil)) | 1130 | (dirs nil)) |
| 1131 | (dolist (this (file-name-all-completions "" dir)) | 1131 | (dolist (this (file-name-all-completions "" dir)) |
| 1132 | (cond | 1132 | (cond |
| 1133 | ((string-match "^\\.+/$" this) | 1133 | ((string-match-p "^\\.+/$" this) |
| 1134 | nil) | 1134 | nil) |
| 1135 | ((string-match "[:/\\]$" this) | 1135 | ((string-match-p "[:/\\]$" this) |
| 1136 | (when (or (not match-dirs-flag) | 1136 | (when (or (not match-dirs-flag) |
| 1137 | (not pattern) | 1137 | (not pattern) |
| 1138 | (string-match pattern this)) | 1138 | (string-match-p pattern this)) |
| 1139 | (filesets-message 5 "Filesets: matched dir %S with pattern %S" | 1139 | (filesets-message 5 "Filesets: matched dir %S with pattern %S" |
| 1140 | this pattern) | 1140 | this pattern) |
| 1141 | (setq dirs (cons this dirs)))) | 1141 | (setq dirs (cons this dirs)))) |
| 1142 | (t | 1142 | (t |
| 1143 | (when (or (not pattern) | 1143 | (when (or (not pattern) |
| 1144 | (string-match pattern this)) | 1144 | (string-match-p pattern this)) |
| 1145 | (filesets-message 5 "Filesets: matched file %S with pattern %S" | 1145 | (filesets-message 5 "Filesets: matched file %S with pattern %S" |
| 1146 | this pattern) | 1146 | this pattern) |
| 1147 | (setq files (cons (if full-flag | 1147 | (setq files (cons (if full-flag |
| @@ -1249,7 +1249,7 @@ Return full path if FULL-FLAG is non-nil." | |||
| 1249 | (let ((filename (file-name-nondirectory file))) | 1249 | (let ((filename (file-name-nondirectory file))) |
| 1250 | (filesets-some | 1250 | (filesets-some |
| 1251 | (lambda (entry) | 1251 | (lambda (entry) |
| 1252 | (when (and (string-match (nth 0 entry) filename) | 1252 | (when (and (string-match-p (nth 0 entry) filename) |
| 1253 | (filesets-eviewer-constraint-p entry)) | 1253 | (filesets-eviewer-constraint-p entry)) |
| 1254 | entry)) | 1254 | entry)) |
| 1255 | filesets-external-viewers))) | 1255 | filesets-external-viewers))) |
| @@ -2004,7 +2004,7 @@ LOOKUP-NAME is used as lookup name for retrieving fileset specific settings." | |||
| 2004 | (fn (or fun (lambda (a b) | 2004 | (fn (or fun (lambda (a b) |
| 2005 | (and (stringp a) | 2005 | (and (stringp a) |
| 2006 | (stringp b) | 2006 | (stringp b) |
| 2007 | (string-match a b)))))) | 2007 | (string-match-p a b)))))) |
| 2008 | (filesets-some (lambda (x) | 2008 | (filesets-some (lambda (x) |
| 2009 | (if (funcall fn (car x) masterfile) | 2009 | (if (funcall fn (car x) masterfile) |
| 2010 | (nth pos x) | 2010 | (nth pos x) |
diff --git a/lisp/find-file.el b/lisp/find-file.el index 9f7d877ec3b..d9a9f08f19b 100644 --- a/lisp/find-file.el +++ b/lisp/find-file.el | |||
| @@ -528,11 +528,9 @@ the `ff-ignore-include' variable." | |||
| 528 | stub ;; name of the file without extension | 528 | stub ;; name of the file without extension |
| 529 | alist ;; working copy of the list of file extensions | 529 | alist ;; working copy of the list of file extensions |
| 530 | pathname ;; the pathname of the file or the #include line | 530 | pathname ;; the pathname of the file or the #include line |
| 531 | default-name ;; file we should create if none found | ||
| 532 | format ;; what we have to match | 531 | format ;; what we have to match |
| 533 | found ;; name of the file or buffer found - nil if none | 532 | found ;; name of the file or buffer found - nil if none |
| 534 | dirs ;; local value of ff-search-directories | 533 | dirs) ;; local value of ff-search-directories |
| 535 | no-match) ;; whether we know about this kind of file | ||
| 536 | 534 | ||
| 537 | (message "Working...") | 535 | (message "Working...") |
| 538 | 536 | ||
| @@ -545,7 +543,6 @@ the `ff-ignore-include' variable." | |||
| 545 | 543 | ||
| 546 | (cond | 544 | (cond |
| 547 | ((and (not ff-ignore-include) fname) | 545 | ((and (not ff-ignore-include) fname) |
| 548 | (setq default-name fname) | ||
| 549 | (setq found (ff-get-file-name dirs fname nil))) | 546 | (setq found (ff-get-file-name dirs fname nil))) |
| 550 | 547 | ||
| 551 | ;; let's just get the corresponding file | 548 | ;; let's just get the corresponding file |
| @@ -558,7 +555,6 @@ the `ff-ignore-include' variable." | |||
| 558 | "/none.none")) | 555 | "/none.none")) |
| 559 | 556 | ||
| 560 | (setq fname (file-name-nondirectory pathname) | 557 | (setq fname (file-name-nondirectory pathname) |
| 561 | no-match nil | ||
| 562 | match (car alist)) | 558 | match (car alist)) |
| 563 | 559 | ||
| 564 | ;; find the table entry corresponding to this file | 560 | ;; find the table entry corresponding to this file |
| @@ -569,8 +565,7 @@ the `ff-ignore-include' variable." | |||
| 569 | (setq pos (ff-string-match (car match) fname))) | 565 | (setq pos (ff-string-match (car match) fname))) |
| 570 | 566 | ||
| 571 | ;; no point going on if we haven't found anything | 567 | ;; no point going on if we haven't found anything |
| 572 | (if (not match) | 568 | (when match |
| 573 | (setq no-match t) | ||
| 574 | 569 | ||
| 575 | ;; otherwise, suffixes contains what we need | 570 | ;; otherwise, suffixes contains what we need |
| 576 | (setq suffixes (car (cdr match)) | 571 | (setq suffixes (car (cdr match)) |
| @@ -583,8 +578,7 @@ the `ff-ignore-include' variable." | |||
| 583 | (progn | 578 | (progn |
| 584 | (setq suffixes (funcall action (buffer-file-name)) | 579 | (setq suffixes (funcall action (buffer-file-name)) |
| 585 | match (cons (car match) (list suffixes)) | 580 | match (cons (car match) (list suffixes)) |
| 586 | stub nil | 581 | stub nil)) |
| 587 | default-name (car suffixes))) | ||
| 588 | 582 | ||
| 589 | ;; otherwise build our filename stub | 583 | ;; otherwise build our filename stub |
| 590 | (cond | 584 | (cond |
| @@ -599,11 +593,7 @@ the `ff-ignore-include' variable." | |||
| 599 | (setq format (concat "\\(.+\\)" (car match))) | 593 | (setq format (concat "\\(.+\\)" (car match))) |
| 600 | (string-match format fname) | 594 | (string-match format fname) |
| 601 | (setq stub (substring fname (match-beginning 1) (match-end 1))) | 595 | (setq stub (substring fname (match-beginning 1) (match-end 1))) |
| 602 | )) | 596 | ))) |
| 603 | |||
| 604 | ;; if we find nothing, we should try to get a file like this one | ||
| 605 | (setq default-name | ||
| 606 | (concat stub (car (car (cdr match)))))) | ||
| 607 | 597 | ||
| 608 | ;; do the real work - find the file | 598 | ;; do the real work - find the file |
| 609 | (setq found | 599 | (setq found |
| @@ -671,7 +661,7 @@ name of the first file found." | |||
| 671 | (setq buf (buffer-name (car blist))) | 661 | (setq buf (buffer-name (car blist))) |
| 672 | (while (and blist (not found)) | 662 | (while (and blist (not found)) |
| 673 | 663 | ||
| 674 | (if (string-match (concat filename "<[0-9]+>") buf) | 664 | (if (string-match-p (concat filename "<[0-9]+>") buf) |
| 675 | (setq found (buffer-file-name (car blist)))) | 665 | (setq found (buffer-file-name (car blist)))) |
| 676 | 666 | ||
| 677 | (setq blist (cdr blist)) | 667 | (setq blist (cdr blist)) |
| @@ -797,20 +787,18 @@ See variable `ff-special-constructs'." | |||
| 797 | "Get all the directory files under directory HERE. | 787 | "Get all the directory files under directory HERE. |
| 798 | Exclude all files in the optional EXCLUDE list." | 788 | Exclude all files in the optional EXCLUDE list." |
| 799 | (if (file-directory-p here) | 789 | (if (file-directory-p here) |
| 800 | (condition-case nil | 790 | (ignore-errors |
| 801 | (progn | 791 | (let ((files (directory-files here t)) |
| 802 | (let ((files (directory-files here t)) | 792 | (dirlist (list)) |
| 803 | (dirlist (list)) | 793 | file) |
| 804 | file) | 794 | (while files |
| 805 | (while files | 795 | (setq file (car files)) |
| 806 | (setq file (car files)) | 796 | (if (and |
| 807 | (if (and | 797 | (file-directory-p file) |
| 808 | (file-directory-p file) | 798 | (not (member (ff-basename file) exclude))) |
| 809 | (not (member (ff-basename file) exclude))) | 799 | (setq dirlist (cons file dirlist))) |
| 810 | (setq dirlist (cons file dirlist))) | 800 | (setq files (cdr files))) |
| 811 | (setq files (cdr files))) | 801 | (setq dirlist (reverse dirlist)))) |
| 812 | (setq dirlist (reverse dirlist)))) | ||
| 813 | (error nil)) | ||
| 814 | nil)) | 802 | nil)) |
| 815 | 803 | ||
| 816 | (defun ff-switch-file (f1 f2 file &optional in-other-window new-file) | 804 | (defun ff-switch-file (f1 f2 file &optional in-other-window new-file) |
| @@ -892,9 +880,7 @@ Given START and/or END, checks between these characters." | |||
| 892 | Build up a new file list based possibly on part of the directory name | 880 | Build up a new file list based possibly on part of the directory name |
| 893 | and the name of the file passed in." | 881 | and the name of the file passed in." |
| 894 | (ff-string-match "\\(.*\\)/\\([^/]+\\)/\\([^.]+\\).\\([^/]+\\)$" arg) | 882 | (ff-string-match "\\(.*\\)/\\([^/]+\\)/\\([^.]+\\).\\([^/]+\\)$" arg) |
| 895 | (let ((path (if (match-beginning 1) | 883 | (let ((dire (if (match-beginning 2) |
| 896 | (substring arg (match-beginning 1) (match-end 1)) nil)) | ||
| 897 | (dire (if (match-beginning 2) | ||
| 898 | (substring arg (match-beginning 2) (match-end 2)) nil)) | 884 | (substring arg (match-beginning 2) (match-end 2)) nil)) |
| 899 | (file (if (match-beginning 3) | 885 | (file (if (match-beginning 3) |
| 900 | (substring arg (match-beginning 3) (match-end 3)) nil)) | 886 | (substring arg (match-beginning 3) (match-end 3)) nil)) |
diff --git a/lisp/find-lisp.el b/lisp/find-lisp.el index cac09bb11a8..0eea918dc48 100644 --- a/lisp/find-lisp.el +++ b/lisp/find-lisp.el | |||
| @@ -53,7 +53,7 @@ | |||
| 53 | "Internal variable.") | 53 | "Internal variable.") |
| 54 | 54 | ||
| 55 | (defconst find-lisp-line-indent " " | 55 | (defconst find-lisp-line-indent " " |
| 56 | "Indentation for dired file lines.") | 56 | "Indentation for Dired file lines.") |
| 57 | 57 | ||
| 58 | (defvar find-lisp-file-predicate nil | 58 | (defvar find-lisp-file-predicate nil |
| 59 | "Predicate for choosing to include files.") | 59 | "Predicate for choosing to include files.") |
| @@ -280,7 +280,7 @@ It is a function which takes two arguments, the directory and its parent." | |||
| 280 | 280 | ||
| 281 | ;;;###autoload | 281 | ;;;###autoload |
| 282 | (defun find-lisp-find-dired-filter (regexp) | 282 | (defun find-lisp-find-dired-filter (regexp) |
| 283 | "Change the filter on a find-lisp-find-dired buffer to REGEXP." | 283 | "Change the filter on a `find-lisp-find-dired' buffer to REGEXP." |
| 284 | (interactive "sSet filter to regexp: ") | 284 | (interactive "sSet filter to regexp: ") |
| 285 | (setq find-lisp-regexp regexp) | 285 | (setq find-lisp-regexp regexp) |
| 286 | (revert-buffer)) | 286 | (revert-buffer)) |
diff --git a/lisp/finder.el b/lisp/finder.el index e07c6a241ab..c06c01c2c97 100644 --- a/lisp/finder.el +++ b/lisp/finder.el | |||
| @@ -225,8 +225,8 @@ from; the default is `load-path'." | |||
| 225 | (lambda (a b) (string< (symbol-name (car a)) | 225 | (lambda (a b) (string< (symbol-name (car a)) |
| 226 | (symbol-name (car b)))))) | 226 | (symbol-name (car b)))))) |
| 227 | 227 | ||
| 228 | (save-excursion | 228 | (with-current-buffer |
| 229 | (find-file generated-finder-keywords-file) | 229 | (find-file-noselect generated-finder-keywords-file) |
| 230 | (setq buffer-undo-list t) | 230 | (setq buffer-undo-list t) |
| 231 | (erase-buffer) | 231 | (erase-buffer) |
| 232 | (insert (autoload-rubric generated-finder-keywords-file | 232 | (insert (autoload-rubric generated-finder-keywords-file |
diff --git a/lisp/follow.el b/lisp/follow.el index ef26788c0b1..2c9365b2ba6 100644 --- a/lisp/follow.el +++ b/lisp/follow.el | |||
| @@ -515,7 +515,7 @@ Works like `scroll-up' when not in Follow mode." | |||
| 515 | (declare-function comint-adjust-point "comint" (window)) | 515 | (declare-function comint-adjust-point "comint" (window)) |
| 516 | (defvar comint-scroll-show-maximum-output) | 516 | (defvar comint-scroll-show-maximum-output) |
| 517 | 517 | ||
| 518 | (defun follow-comint-scroll-to-bottom (&optional window) | 518 | (defun follow-comint-scroll-to-bottom (&optional _window) |
| 519 | "Scroll the bottom-most window in the current Follow chain. | 519 | "Scroll the bottom-most window in the current Follow chain. |
| 520 | This is to be called by `comint-postoutput-scroll-to-bottom'." | 520 | This is to be called by `comint-postoutput-scroll-to-bottom'." |
| 521 | (let* ((buffer (current-buffer)) | 521 | (let* ((buffer (current-buffer)) |
| @@ -572,7 +572,7 @@ selected if the original window is the first one in the frame." | |||
| 572 | (interactive "P") | 572 | (interactive "P") |
| 573 | (let ((other (or (and (null arg) | 573 | (let ((other (or (and (null arg) |
| 574 | (not (eq (selected-window) | 574 | (not (eq (selected-window) |
| 575 | (frame-first-window (selected-frame))))) | 575 | (frame-first-window)))) |
| 576 | (and arg | 576 | (and arg |
| 577 | (< (prefix-numeric-value arg) 0)))) | 577 | (< (prefix-numeric-value arg) 0)))) |
| 578 | (start (window-start))) | 578 | (start (window-start))) |
| @@ -883,15 +883,14 @@ returned by `follow-windows-start-end'." | |||
| 883 | (defun follow-select-if-visible (dest win-start-end) | 883 | (defun follow-select-if-visible (dest win-start-end) |
| 884 | "Select and return a window, if DEST is visible in it. | 884 | "Select and return a window, if DEST is visible in it. |
| 885 | Return the selected window." | 885 | Return the selected window." |
| 886 | (let (win win-end wse) | 886 | (let (win wse) |
| 887 | (while (and (not win) win-start-end) | 887 | (while (and (not win) win-start-end) |
| 888 | ;; Don't select a window that was just moved. This makes it | 888 | ;; Don't select a window that was just moved. This makes it |
| 889 | ;; possible to later select the last window after a | 889 | ;; possible to later select the last window after a |
| 890 | ;; `end-of-buffer' command. | 890 | ;; `end-of-buffer' command. |
| 891 | (setq wse (car win-start-end)) | 891 | (setq wse (car win-start-end)) |
| 892 | (when (follow-pos-visible dest (car wse) win-start-end) | 892 | (when (follow-pos-visible dest (car wse) win-start-end) |
| 893 | (setq win (car wse) | 893 | (setq win (car wse)) |
| 894 | win-end (nth 2 wse)) | ||
| 895 | (select-window win)) | 894 | (select-window win)) |
| 896 | (setq win-start-end (cdr win-start-end))) | 895 | (setq win-start-end (cdr win-start-end))) |
| 897 | win)) | 896 | win)) |
| @@ -1083,7 +1082,7 @@ should be a member of WINDOWS, starts at position START." | |||
| 1083 | This is done by reading and rewriting the start position of | 1082 | This is done by reading and rewriting the start position of |
| 1084 | non-first windows in Follow mode." | 1083 | non-first windows in Follow mode." |
| 1085 | (let* ((orig-buffer (current-buffer)) | 1084 | (let* ((orig-buffer (current-buffer)) |
| 1086 | (top (frame-first-window (selected-frame))) | 1085 | (top (frame-first-window)) |
| 1087 | (win top) | 1086 | (win top) |
| 1088 | who) ; list of (buffer . frame) | 1087 | who) ; list of (buffer . frame) |
| 1089 | ;; If the only window in the frame is a minibuffer | 1088 | ;; If the only window in the frame is a minibuffer |
| @@ -1260,6 +1259,8 @@ non-first windows in Follow mode." | |||
| 1260 | 1259 | ||
| 1261 | ;; If the region is visible, make it look good when spanning | 1260 | ;; If the region is visible, make it look good when spanning |
| 1262 | ;; multiple windows. | 1261 | ;; multiple windows. |
| 1262 | |||
| 1263 | ;; FIXME: Why not use `use-region-p' here? | ||
| 1263 | (when (region-active-p) | 1264 | (when (region-active-p) |
| 1264 | (follow-maximize-region | 1265 | (follow-maximize-region |
| 1265 | (selected-window) windows win-start-end))) | 1266 | (selected-window) windows win-start-end))) |
diff --git a/lisp/format.el b/lisp/format.el index 221eaadcdd8..fc8dcb97b01 100644 --- a/lisp/format.el +++ b/lisp/format.el | |||
| @@ -225,10 +225,12 @@ For most purposes, consider using `format-encode-region' instead." | |||
| 225 | (setq selective-display sel-disp) | 225 | (setq selective-display sel-disp) |
| 226 | (set-buffer-multibyte multibyte) | 226 | (set-buffer-multibyte multibyte) |
| 227 | (setq buffer-file-coding-system coding-system)) | 227 | (setq buffer-file-coding-system coding-system)) |
| 228 | (copy-to-buffer copy-buf from to) | 228 | (let ((inhibit-read-only t)) ; bug#14887 |
| 229 | (set-buffer copy-buf) | 229 | (copy-to-buffer copy-buf from to) |
| 230 | (format-insert-annotations write-region-annotations-so-far from) | 230 | (set-buffer copy-buf) |
| 231 | (format-encode-run-method to-fn (point-min) (point-max) orig-buf) | 231 | (format-insert-annotations write-region-annotations-so-far from) |
| 232 | (format-encode-run-method to-fn (point-min) (point-max) | ||
| 233 | orig-buf)) | ||
| 232 | (when (buffer-live-p copy-buf) | 234 | (when (buffer-live-p copy-buf) |
| 233 | (with-current-buffer copy-buf | 235 | (with-current-buffer copy-buf |
| 234 | ;; Set write-region-post-annotation-function to | 236 | ;; Set write-region-post-annotation-function to |
diff --git a/lisp/forms.el b/lisp/forms.el index 37914bf5465..38fc0b320dd 100644 --- a/lisp/forms.el +++ b/lisp/forms.el | |||
| @@ -439,6 +439,8 @@ Also, initial position is at last record." | |||
| 439 | (defvar forms--rw-face nil | 439 | (defvar forms--rw-face nil |
| 440 | "Face used to represent read-write data on the screen.") | 440 | "Face used to represent read-write data on the screen.") |
| 441 | 441 | ||
| 442 | (defvar read-file-filter) ; bound in forms--intuit-from-file | ||
| 443 | |||
| 442 | ;;;###autoload | 444 | ;;;###autoload |
| 443 | (defun forms-mode (&optional primary) | 445 | (defun forms-mode (&optional primary) |
| 444 | "Major mode to visit files in a field-structured manner using a form. | 446 | "Major mode to visit files in a field-structured manner using a form. |
| @@ -913,7 +915,7 @@ Commands: Equivalent keys in read-only mode: | |||
| 913 | `(lambda (arg) | 915 | `(lambda (arg) |
| 914 | (let ((inhibit-read-only t)) | 916 | (let ((inhibit-read-only t)) |
| 915 | ,@(apply 'append | 917 | ,@(apply 'append |
| 916 | (mapcar 'forms--make-format-elt-using-text-properties | 918 | (mapcar #'forms--make-format-elt-using-text-properties |
| 917 | forms-format-list)) | 919 | forms-format-list)) |
| 918 | ;; Prevent insertion before the first text. | 920 | ;; Prevent insertion before the first text. |
| 919 | ,@(if (numberp (car forms-format-list)) | 921 | ,@(if (numberp (car forms-format-list)) |
| @@ -926,7 +928,7 @@ Commands: Equivalent keys in read-only mode: | |||
| 926 | (setq forms--iif-start nil)) | 928 | (setq forms--iif-start nil)) |
| 927 | `(lambda (arg) | 929 | `(lambda (arg) |
| 928 | ,@(apply 'append | 930 | ,@(apply 'append |
| 929 | (mapcar 'forms--make-format-elt forms-format-list))))) | 931 | (mapcar #'forms--make-format-elt forms-format-list))))) |
| 930 | 932 | ||
| 931 | ;; We have tallied the number of markers and dynamic texts, | 933 | ;; We have tallied the number of markers and dynamic texts, |
| 932 | ;; so we can allocate the arrays now. | 934 | ;; so we can allocate the arrays now. |
| @@ -1098,7 +1100,7 @@ Commands: Equivalent keys in read-only mode: | |||
| 1098 | (goto-char (point-min)) | 1100 | (goto-char (point-min)) |
| 1099 | ,@(apply 'append | 1101 | ,@(apply 'append |
| 1100 | (mapcar | 1102 | (mapcar |
| 1101 | 'forms--make-parser-elt | 1103 | #'forms--make-parser-elt |
| 1102 | (append forms-format-list (list nil))))))))) | 1104 | (append forms-format-list (list nil))))))))) |
| 1103 | 1105 | ||
| 1104 | (forms--debug 'forms--parser)) | 1106 | (forms--debug 'forms--parser)) |
| @@ -1198,8 +1200,6 @@ Commands: Equivalent keys in read-only mode: | |||
| 1198 | (setq forms--field nil))) | 1200 | (setq forms--field nil))) |
| 1199 | )) | 1201 | )) |
| 1200 | 1202 | ||
| 1201 | (defvar read-file-filter) ; bound in forms--intuit-from-file | ||
| 1202 | |||
| 1203 | (defun forms--intuit-from-file () | 1203 | (defun forms--intuit-from-file () |
| 1204 | "Get number of fields and a default form using the data file." | 1204 | "Get number of fields and a default form using the data file." |
| 1205 | 1205 | ||
| @@ -1569,10 +1569,10 @@ As a side effect: sets `forms--the-record-list'." | |||
| 1569 | ;; Build new record. | 1569 | ;; Build new record. |
| 1570 | (setq forms--the-record-list (forms--parse-form)) | 1570 | (setq forms--the-record-list (forms--parse-form)) |
| 1571 | (setq the-record | 1571 | (setq the-record |
| 1572 | (mapconcat 'identity forms--the-record-list forms-field-sep)) | 1572 | (mapconcat #'identity forms--the-record-list forms-field-sep)) |
| 1573 | 1573 | ||
| 1574 | (if (string-match (regexp-quote forms-field-sep) | 1574 | (if (string-match-p (regexp-quote forms-field-sep) |
| 1575 | (mapconcat 'identity forms--the-record-list "")) | 1575 | (mapconcat #'identity forms--the-record-list "")) |
| 1576 | (error "Field separator occurs in record - update refused")) | 1576 | (error "Field separator occurs in record - update refused")) |
| 1577 | 1577 | ||
| 1578 | ;; Handle multi-line fields, if allowed. | 1578 | ;; Handle multi-line fields, if allowed. |
| @@ -1580,7 +1580,7 @@ As a side effect: sets `forms--the-record-list'." | |||
| 1580 | (forms--trans the-record "\n" forms-multi-line)) | 1580 | (forms--trans the-record "\n" forms-multi-line)) |
| 1581 | 1581 | ||
| 1582 | ;; A final sanity check before updating. | 1582 | ;; A final sanity check before updating. |
| 1583 | (if (string-match "\n" the-record) | 1583 | (if (string-match-p "\n" the-record) |
| 1584 | (error "Multi-line fields in this record - update refused")) | 1584 | (error "Multi-line fields in this record - update refused")) |
| 1585 | 1585 | ||
| 1586 | (with-current-buffer forms--file-buffer | 1586 | (with-current-buffer forms--file-buffer |
| @@ -1779,11 +1779,7 @@ after the current record." | |||
| 1779 | (setq the-list (cdr (append the-fields nil)))) | 1779 | (setq the-list (cdr (append the-fields nil)))) |
| 1780 | (setq the-list (make-list forms-number-of-fields ""))) | 1780 | (setq the-list (make-list forms-number-of-fields ""))) |
| 1781 | 1781 | ||
| 1782 | (setq the-record | 1782 | (setq the-record (mapconcat #'identity the-list forms-field-sep)) |
| 1783 | (mapconcat | ||
| 1784 | 'identity | ||
| 1785 | the-list | ||
| 1786 | forms-field-sep)) | ||
| 1787 | 1783 | ||
| 1788 | (with-current-buffer forms--file-buffer | 1784 | (with-current-buffer forms--file-buffer |
| 1789 | (forms--goto-record ln) | 1785 | (forms--goto-record ln) |
diff --git a/lisp/frame.el b/lisp/frame.el index 22cf484e54a..3668f24ba01 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -500,10 +500,7 @@ See help of `modify-frame-parameters' for more information." | |||
| 500 | "Return some frame other than the current frame. | 500 | "Return some frame other than the current frame. |
| 501 | Create one if necessary. Note that the minibuffer frame, if separate, | 501 | Create one if necessary. Note that the minibuffer frame, if separate, |
| 502 | is not considered (see `next-frame')." | 502 | is not considered (see `next-frame')." |
| 503 | (let ((s (if (equal (next-frame (selected-frame)) (selected-frame)) | 503 | (if (equal (next-frame) (selected-frame)) (make-frame) (next-frame))) |
| 504 | (make-frame) | ||
| 505 | (next-frame (selected-frame))))) | ||
| 506 | s)) | ||
| 507 | 504 | ||
| 508 | (defun next-multiframe-window () | 505 | (defun next-multiframe-window () |
| 509 | "Select the next window, regardless of which frame it is on." | 506 | "Select the next window, regardless of which frame it is on." |
| @@ -875,8 +872,11 @@ If there is no frame by that name, signal an error." | |||
| 875 | "The brightness of the background. | 872 | "The brightness of the background. |
| 876 | Set this to the symbol `dark' if your background color is dark, | 873 | Set this to the symbol `dark' if your background color is dark, |
| 877 | `light' if your background is light, or nil (automatic by default) | 874 | `light' if your background is light, or nil (automatic by default) |
| 878 | if you want Emacs to examine the brightness for you. Don't set this | 875 | if you want Emacs to examine the brightness for you. |
| 879 | variable with `setq'; this won't have the expected effect." | 876 | |
| 877 | If you change this without using customize, you should use | ||
| 878 | `frame-set-background-mode' to update existing frames; | ||
| 879 | e.g. (mapc 'frame-set-background-mode (frame-list))." | ||
| 880 | :group 'faces | 880 | :group 'faces |
| 881 | :set #'(lambda (var value) | 881 | :set #'(lambda (var value) |
| 882 | (set-default var value) | 882 | (set-default var value) |
| @@ -1278,9 +1278,6 @@ keys and their meanings." | |||
| 1278 | 1278 | ||
| 1279 | 1279 | ||
| 1280 | ;;;; Frame/display capabilities. | 1280 | ;;;; Frame/display capabilities. |
| 1281 | (defun selected-terminal () | ||
| 1282 | "Return the terminal that is now selected." | ||
| 1283 | (frame-terminal (selected-frame))) | ||
| 1284 | 1281 | ||
| 1285 | (declare-function msdos-mouse-p "dosfns.c") | 1282 | (declare-function msdos-mouse-p "dosfns.c") |
| 1286 | 1283 | ||
| @@ -1448,6 +1445,8 @@ monitor, use `display-monitor-attributes-list'." | |||
| 1448 | 1445 | ||
| 1449 | (declare-function x-display-backing-store "xfns.c" (&optional terminal)) | 1446 | (declare-function x-display-backing-store "xfns.c" (&optional terminal)) |
| 1450 | 1447 | ||
| 1448 | ;; In NS port, the return value may be `buffered', `retained', or | ||
| 1449 | ;; `non-retained'. See src/nsfns.m. | ||
| 1451 | (defun display-backing-store (&optional display) | 1450 | (defun display-backing-store (&optional display) |
| 1452 | "Return the backing store capability of DISPLAY's screen. | 1451 | "Return the backing store capability of DISPLAY's screen. |
| 1453 | The value may be `always', `when-mapped', `not-useful', or nil if | 1452 | The value may be `always', `when-mapped', `not-useful', or nil if |
diff --git a/lisp/frameset.el b/lisp/frameset.el index 63ee9af23fc..53ab0a5f081 100644 --- a/lisp/frameset.el +++ b/lisp/frameset.el | |||
| @@ -41,155 +41,560 @@ | |||
| 41 | (require 'cl-lib) | 41 | (require 'cl-lib) |
| 42 | 42 | ||
| 43 | 43 | ||
| 44 | ;; Framesets have two fields: | 44 | (cl-defstruct (frameset (:type vector) :named |
| 45 | ;; - properties: a property list to store both frameset-specific and | 45 | (:constructor frameset--make) |
| 46 | ;; user-defined serializable data. Currently defined properties | 46 | ;; Copier is defined below. |
| 47 | ;; include: | 47 | (:copier nil)) |
| 48 | ;; :version ID - Identifies the version of the frameset struct; | 48 | |
| 49 | ;; this is the only property always present and | 49 | "A frameset encapsulates a serializable view of a set of frames and windows. |
| 50 | ;; must not be modified. | 50 | |
| 51 | ;; :app APPINFO - Freeform. Can be used by applications and | 51 | It contains the following slots, which can be accessed with |
| 52 | ;; packages to indicate the intended (but by no | 52 | \(frameset-SLOT fs) and set with (setf (frameset-SLOT fs) VALUE): |
| 53 | ;; means exclusive) use of the frameset. For | 53 | |
| 54 | ;; example, currently desktop.el sets :app to | 54 | version A read-only version number, identifying the format |
| 55 | ;; `(desktop . ,desktop-file-version). | 55 | of the frameset struct. Currently its value is 1. |
| 56 | ;; :name NAME - The name of the frameset instance; a string. | 56 | timestamp A read-only timestamp, the output of `current-time'. |
| 57 | ;; :desc TEXT - A description for user consumption (to choose | 57 | app A symbol, or a list whose first element is a symbol, which |
| 58 | ;; among framesets, etc.); a string. | 58 | identifies the creator of the frameset and related info; |
| 59 | ;; - states: an alist of items (FRAME-PARAMETERS . WINDOW-STATE) in | 59 | for example, desktop.el sets this slot to a list |
| 60 | ;; no particular order. Each item represents a frame to be | 60 | `(desktop . ,desktop-file-version). |
| 61 | ;; restored. | 61 | name A string, the name of the frameset instance. |
| 62 | 62 | description A string, a description for user consumption (to show in | |
| 63 | (cl-defstruct (frameset (:type list) :named | 63 | menus, messages, etc). |
| 64 | (:copier nil) | 64 | properties A property list, to store both frameset-specific and |
| 65 | (:predicate nil)) | 65 | user-defined serializable data. |
| 66 | properties ;; property list | 66 | states A list of items (FRAME-PARAMETERS . WINDOW-STATE), in no |
| 67 | states) ;; list of conses (frame-state . window-state) | 67 | particular order. Each item represents a frame to be |
| 68 | 68 | restored. FRAME-PARAMETERS is a frame's parameter alist, | |
| 69 | (defun copy-frameset (frameset) | 69 | extracted with (frame-parameters FRAME) and filtered |
| 70 | "Return a copy of FRAMESET. | 70 | through `frameset-filter-params'. |
| 71 | This is a deep copy done with `copy-tree'." | 71 | WINDOW-STATE is the output of `window-state-get' applied |
| 72 | to the root window of the frame. | ||
| 73 | |||
| 74 | To avoid collisions, it is recommended that applications wanting to add | ||
| 75 | private serializable data to `properties' either store all info under a | ||
| 76 | single, distinctive name, or use property names with a well-chosen prefix. | ||
| 77 | |||
| 78 | A frameset is intended to be used through the following simple API: | ||
| 79 | |||
| 80 | - `frameset-save', the type's constructor, captures all or a subset of the | ||
| 81 | live frames, and returns a serializable snapshot of them (a frameset). | ||
| 82 | - `frameset-restore' takes a frameset, and restores the frames and windows | ||
| 83 | it describes, as faithfully as possible. | ||
| 84 | - `frameset-p' is the predicate for the frameset type. | ||
| 85 | - `frameset-valid-p' checks a frameset's validity. | ||
| 86 | - `frameset-copy' returns a deep copy of a frameset. | ||
| 87 | - `frameset-prop' is a `setf'able accessor for the contents of the | ||
| 88 | `properties' slot. | ||
| 89 | - The `frameset-SLOT' accessors described above." | ||
| 90 | |||
| 91 | (version 1 :read-only t) | ||
| 92 | (timestamp (current-time) :read-only t) | ||
| 93 | (app nil) | ||
| 94 | (name nil) | ||
| 95 | (description nil) | ||
| 96 | (properties nil) | ||
| 97 | (states nil)) | ||
| 98 | |||
| 99 | ;; Add nicer docstrings for built-in predicate and accessors. | ||
| 100 | (put 'frameset-p 'function-documentation | ||
| 101 | "Return non-nil if OBJECT is a frameset, nil otherwise.\n\n(fn OBJECT)") | ||
| 102 | (put 'frameset-version 'function-documentation | ||
| 103 | "Return the version number of FRAMESET.\n | ||
| 104 | It is an integer that identifies the format of the frameset struct. | ||
| 105 | This slot cannot be modified.\n\n(fn FRAMESET)") | ||
| 106 | (put 'frameset-timestamp 'function-documentation | ||
| 107 | "Return the creation timestamp of FRAMESET.\n | ||
| 108 | The value is in the format returned by `current-time'. | ||
| 109 | This slot cannot be modified.\n\n(fn FRAMESET)") | ||
| 110 | (put 'frameset-app 'function-documentation | ||
| 111 | "Return the application identifier for FRAMESET.\n | ||
| 112 | The value is either a symbol, like `my-app', or a list | ||
| 113 | \(my-app ADDITIONAL-DATA...).\n\n(fn FRAMESET)") | ||
| 114 | (put 'frameset-name 'function-documentation | ||
| 115 | "Return the name of FRAMESET (a string).\n\n(fn FRAMESET)") | ||
| 116 | (put 'frameset-description 'function-documentation | ||
| 117 | "Return the description of FRAMESET (a string).\n\n(fn FRAMESET)") | ||
| 118 | (put 'frameset-properties 'function-documentation | ||
| 119 | "Return the property list of FRAMESET.\n | ||
| 120 | This list is useful to store both frameset-specific and user-defined | ||
| 121 | serializable data. The simplest way to access and modify it is | ||
| 122 | through `frameset-prop' (which see).\n\n(fn FRAMESET)") | ||
| 123 | (put 'frameset-states 'function-documentation | ||
| 124 | "Return the list of frame states of FRAMESET.\n | ||
| 125 | A frame state is a pair (FRAME-PARAMETERS . WINDOW-STATE), where | ||
| 126 | FRAME-PARAMETERS is a frame's parameter alist, extracted with | ||
| 127 | \(frame-parameters FRAME) and filtered through `frameset-filter-params', | ||
| 128 | and WINDOW-STATE is the output of `window-state-get' applied to the | ||
| 129 | root window of the frame.\n | ||
| 130 | IMPORTANT: Modifying this slot may cause frameset functions to fail, | ||
| 131 | unless the type constraints defined above are respected.\n\n(fn FRAMESET)") | ||
| 132 | |||
| 133 | ;; We autoloaded this for use in register.el, but now that we use registerv | ||
| 134 | ;; objects, this autoload is not useful any more. | ||
| 135 | ;; ;;;###autoload (autoload 'frameset-p "frameset" | ||
| 136 | ;; ;;;###autoload "Return non-nil if OBJECT is a frameset, nil otherwise." nil) | ||
| 137 | |||
| 138 | (defun frameset-copy (frameset) | ||
| 139 | "Return a deep copy of FRAMESET. | ||
| 140 | FRAMESET is copied with `copy-tree'." | ||
| 72 | (copy-tree frameset t)) | 141 | (copy-tree frameset t)) |
| 73 | 142 | ||
| 74 | ;;;###autoload | 143 | (defun frameset-valid-p (object) |
| 75 | (defun frameset-p (frameset) | 144 | "Return non-nil if OBJECT is a valid frameset, nil otherwise." |
| 76 | "If FRAMESET is a frameset, return its :version. | 145 | (and (frameset-p object) |
| 77 | Else return nil." | 146 | (integerp (frameset-version object)) |
| 78 | (and (eq (car-safe frameset) 'frameset) | 147 | (consp (frameset-timestamp object)) |
| 79 | (plist-get (cl-second frameset) :version))) | 148 | (let ((app (frameset-app object))) |
| 149 | (or (null app) ; APP is nil | ||
| 150 | (symbolp app) ; or a symbol | ||
| 151 | (and (consp app) ; or a list | ||
| 152 | (symbolp (car app))))) ; starting with a symbol | ||
| 153 | (stringp (or (frameset-name object) "")) | ||
| 154 | (stringp (or (frameset-description object) "")) | ||
| 155 | (listp (frameset-properties object)) | ||
| 156 | (let ((states (frameset-states object))) | ||
| 157 | (and (listp states) | ||
| 158 | (cl-every #'consp (frameset-states object)))) | ||
| 159 | (frameset-version object))) ; And VERSION is non-nil. | ||
| 160 | |||
| 161 | (defun frameset--prop-setter (frameset property value) | ||
| 162 | "Setter function for `frameset-prop'. Internal use only." | ||
| 163 | (setf (frameset-properties frameset) | ||
| 164 | (plist-put (frameset-properties frameset) property value)) | ||
| 165 | value) | ||
| 80 | 166 | ||
| 81 | ;; A setf'able accessor to the frameset's properties | 167 | ;; A setf'able accessor to the frameset's properties |
| 82 | (defun frameset-prop (frameset prop) | 168 | (defun frameset-prop (frameset property) |
| 83 | "Return the value of the PROP property of FRAMESET. | 169 | "Return the value for FRAMESET of PROPERTY. |
| 84 | |||
| 85 | Properties other than :version can be set with | ||
| 86 | 170 | ||
| 87 | (setf (frameset-prop FRAMESET PROP) NEW-VALUE)" | 171 | Properties can be set with |
| 88 | (plist-get (frameset-properties frameset) prop)) | ||
| 89 | 172 | ||
| 90 | (gv-define-setter frameset-prop (val fs prop) | 173 | (setf (frameset-prop FRAMESET PROPERTY) NEW-VALUE)" |
| 91 | (macroexp-let2 nil v val | 174 | (declare (gv-setter frameset--prop-setter)) |
| 92 | `(progn | 175 | (plist-get (frameset-properties frameset) property)) |
| 93 | (cl-assert (not (eq ,prop :version)) t ":version can not be set") | ||
| 94 | (setf (frameset-properties ,fs) | ||
| 95 | (plist-put (frameset-properties ,fs) ,prop ,v)) | ||
| 96 | ,v))) | ||
| 97 | 176 | ||
| 98 | 177 | ||
| 99 | ;; Filtering | 178 | ;; Filtering |
| 100 | 179 | ||
| 101 | (defvar frameset-filter-alist | 180 | ;; What's the deal with these "filter alists"? |
| 102 | '((background-color . frameset-filter-sanitize-color) | 181 | ;; |
| 103 | (buffer-list . t) | 182 | ;; Let's say that Emacs' frame parameters were never designed as a tool to |
| 104 | (buffer-predicate . t) | 183 | ;; precisely record (or restore) a frame's state. They grew organically, |
| 105 | (buried-buffer-list . t) | 184 | ;; and their uses and behaviors reflect their history. In using them to |
| 106 | (font . frameset-filter-save-parm) | 185 | ;; implement framesets, the unwary implementer, or the prospective package |
| 107 | (foreground-color . frameset-filter-sanitize-color) | 186 | ;; writer willing to use framesets in their code, might fall victim of some |
| 108 | (fullscreen . frameset-filter-save-parm) | 187 | ;; unexpected... oddities. |
| 109 | (GUI:font . frameset-filter-restore-parm) | 188 | ;; |
| 110 | (GUI:fullscreen . frameset-filter-restore-parm) | 189 | ;; You can find frame parameters that: |
| 111 | (GUI:height . frameset-filter-restore-parm) | 190 | ;; |
| 112 | (GUI:width . frameset-filter-restore-parm) | 191 | ;; - can be used to get and set some data from the frame's current state |
| 113 | (height . frameset-filter-save-parm) | 192 | ;; (`height', `width') |
| 114 | (left . frameset-filter-iconified) | 193 | ;; - can be set at creation time, and setting them afterwards has no effect |
| 115 | (minibuffer . frameset-filter-minibuffer) | 194 | ;; (`window-state', `minibuffer') |
| 116 | (top . frameset-filter-iconified) | 195 | ;; - can be set at creation time, and setting them afterwards will fail with |
| 117 | (width . frameset-filter-save-parm)) | 196 | ;; an error, *unless* you set it to the same value, a noop (`border-width') |
| 197 | ;; - act differently when passed at frame creation time, and when set | ||
| 198 | ;; afterwards (`height') | ||
| 199 | ;; - affect the value of other parameters (`name', `visibility') | ||
| 200 | ;; - can be ignored by window managers (most positional args, like `height', | ||
| 201 | ;; `width', `left' and `top', and others, like `auto-raise', `auto-lower') | ||
| 202 | ;; - can be set externally in X resources or Window registry (again, most | ||
| 203 | ;; positional parameters, and also `toolbar-lines', `menu-bar-lines' etc.) | ||
| 204 | ;, - can contain references to live objects (`buffer-list', `minibuffer') or | ||
| 205 | ;; code (`buffer-predicate') | ||
| 206 | ;; - are set automatically, and cannot be changed (`window-id', `parent-id'), | ||
| 207 | ;; but setting them produces no error | ||
| 208 | ;; - have a noticeable effect in some window managers, and are ignored in | ||
| 209 | ;; others (`menu-bar-lines') | ||
| 210 | ;; - can not be safely set in a tty session and then copied back to a GUI | ||
| 211 | ;; session (`font', `background-color', `foreground-color') | ||
| 212 | ;; | ||
| 213 | ;; etc etc. | ||
| 214 | ;; | ||
| 215 | ;; Which means that, in order to save a parameter alist to disk and read it | ||
| 216 | ;; back later to reconstruct a frame, some processing must be done. That's | ||
| 217 | ;; what `frameset-filter-params' and the `frameset-*-filter-alist' variables | ||
| 218 | ;; are for. | ||
| 219 | ;; | ||
| 220 | ;; First, a clarification. The word "filter" in these names refers to both | ||
| 221 | ;; common meanings of filter: to filter out (i.e., to remove), and to pass | ||
| 222 | ;; through a transformation function (think `filter-buffer-substring'). | ||
| 223 | ;; | ||
| 224 | ;; `frameset-filter-params' takes a parameter alist PARAMETERS, a filtering | ||
| 225 | ;; alist FILTER-ALIST, and a flag SAVING to indicate whether we are filtering | ||
| 226 | ;; parameters with the intent of saving a frame or restoring it. It then | ||
| 227 | ;; accumulates an output alist, FILTERED, by checking each parameter in | ||
| 228 | ;; PARAMETERS against FILTER-ALIST and obeying any rule found there. The | ||
| 229 | ;; absence of a rule just means the parameter/value pair (called CURRENT in | ||
| 230 | ;; filtering functions) is copied to FILTERED as is. Keyword values :save, | ||
| 231 | ;; :restore and :never tell the function to copy CURRENT to FILTERED in the | ||
| 232 | ;; respective situations, that is, when saving, restoring, or never at all. | ||
| 233 | ;; Values :save and :restore are not used in this package, because usually if | ||
| 234 | ;; you don't want to save a parameter, you don't want to restore it either. | ||
| 235 | ;; But they can be useful, for example, if you already have a saved frameset | ||
| 236 | ;; created with some intent, and want to reuse it for a different objective | ||
| 237 | ;; where the expected parameter list has different requirements. | ||
| 238 | ;; | ||
| 239 | ;; Finally, the value can also be a filtering function, or a filtering | ||
| 240 | ;; function plus some arguments. The function is called for each matching | ||
| 241 | ;; parameter, and receives CURRENT (the parameter/value pair being processed), | ||
| 242 | ;; FILTERED (the output alist so far), PARAMETERS (the full parameter alist), | ||
| 243 | ;; SAVING (the save/restore flag), plus any additional ARGS set along the | ||
| 244 | ;; function in the `frameset-*-filter-alist' entry. The filtering function | ||
| 245 | ;; then has the possibility to pass along CURRENT, or reject it altogether, | ||
| 246 | ;; or pass back a (NEW-PARAM . NEW-VALUE) pair, which does not even need to | ||
| 247 | ;; refer to the same parameter (so you can filter `width' and return `height' | ||
| 248 | ;; and vice versa, if you're feeling silly and want to mess with the user's | ||
| 249 | ;; mind). As a help in deciding what to do, the filtering function has | ||
| 250 | ;; access to PARAMETERS, but must not change it in any way. It also has | ||
| 251 | ;; access to FILTERED, which can be modified at will. This allows two or | ||
| 252 | ;; more filters to coordinate themselves, because in general there's no way | ||
| 253 | ;; to predict the order in which they will be run. | ||
| 254 | ;; | ||
| 255 | ;; So, which parameters are filtered by default, and why? Let's see. | ||
| 256 | ;; | ||
| 257 | ;; - `buffer-list', `buried-buffer-list', `buffer-predicate': They contain | ||
| 258 | ;; references to live objects, or in the case of `buffer-predicate', it | ||
| 259 | ;; could also contain an fbound symbol (a predicate function) that could | ||
| 260 | ;; not be defined in a later session. | ||
| 261 | ;; | ||
| 262 | ;; - `window-id', `outer-window-id', `parent-id': They are assigned | ||
| 263 | ;; automatically and cannot be set, so keeping them is harmless, but they | ||
| 264 | ;; add clutter. `window-system' is similar: it's assigned at frame | ||
| 265 | ;; creation, and does not serve any useful purpose later. | ||
| 266 | ;; | ||
| 267 | ;; - `left', `top': Only problematic when saving an iconified frame, because | ||
| 268 | ;; when the frame is iconified they are set to (- 32000), which doesn't | ||
| 269 | ;; really help in restoring the frame. Better to remove them and let the | ||
| 270 | ;; window manager choose a default position for the frame. | ||
| 271 | ;; | ||
| 272 | ;; - `background-color', `foreground-color': In tty frames they can be set | ||
| 273 | ;; to "unspecified-bg" and "unspecified-fg", which aren't understood on | ||
| 274 | ;; GUI sessions. They have to be filtered out when switching from tty to | ||
| 275 | ;; a graphical display. | ||
| 276 | ;; | ||
| 277 | ;; - `tty', `tty-type': These are tty-specific. When switching to a GUI | ||
| 278 | ;; display they do no harm, but they clutter the parameter alist. | ||
| 279 | ;; | ||
| 280 | ;; - `minibuffer': It can contain a reference to a live window, which cannot | ||
| 281 | ;; be serialized. Because of Emacs' idiosyncratic treatment of this | ||
| 282 | ;; parameter, frames created with (minibuffer . t) have a parameter | ||
| 283 | ;; (minibuffer . #<window...>), while frames created with | ||
| 284 | ;; (minibuffer . #<window...>) have (minibuffer . nil), which is madness | ||
| 285 | ;; but helps to differentiate between minibufferless and "normal" frames. | ||
| 286 | ;; So, changing (minibuffer . #<window...>) to (minibuffer . t) allows | ||
| 287 | ;; Emacs to set up the new frame correctly. Nice, uh? | ||
| 288 | ;; | ||
| 289 | ;; - `name': If this parameter is directly set, `explicit-name' is | ||
| 290 | ;; automatically set to t, and then `name' no longer changes dynamically. | ||
| 291 | ;; So, in general, not saving `name' is the right thing to do, though | ||
| 292 | ;; surely there are applications that will want to override this filter. | ||
| 293 | ;; | ||
| 294 | ;; - `font', `fullscreen', `height' and `width': These parameters suffer | ||
| 295 | ;; from the fact that they are badly mangled when going through a | ||
| 296 | ;; tty session, though not all in the same way. When saving a GUI frame | ||
| 297 | ;; and restoring it in a tty, the height and width of the new frame are | ||
| 298 | ;; those of the tty screen (let's say 80x25, for example); going back | ||
| 299 | ;; to a GUI session means getting frames of the tty screen size (so all | ||
| 300 | ;; your frames are 80 cols x 25 rows). For `fullscreen' there's a | ||
| 301 | ;; similar problem, because a tty frame cannot really be fullscreen or | ||
| 302 | ;; maximized, so the state is lost. The problem with `font' is a bit | ||
| 303 | ;; different, because a valid GUI font spec in `font' turns into | ||
| 304 | ;; (font . "tty") in a tty frame, and when read back into a GUI session | ||
| 305 | ;; it fails because `font's value is no longer a valid font spec. | ||
| 306 | ;; | ||
| 307 | ;; In most cases, the filtering functions just do the obvious thing: remove | ||
| 308 | ;; CURRENT when it is meaningless to keep it, or pass a modified copy if | ||
| 309 | ;; that helps (as in the case of `minibuffer'). | ||
| 310 | ;; | ||
| 311 | ;; The exception are the parameters in the last set, which should survive | ||
| 312 | ;; the roundtrip though tty-land. The answer is to add "stashing | ||
| 313 | ;; parameters", working in pairs, to shelve the GUI-specific contents and | ||
| 314 | ;; restore it once we're back in pixel country. That's what functions | ||
| 315 | ;; `frameset-filter-shelve-param' and `frameset-filter-unshelve-param' do. | ||
| 316 | ;; | ||
| 317 | ;; Basically, if you set `frameset-filter-shelve-param' as the filter for | ||
| 318 | ;; a parameter P, it will detect when it is restoring a GUI frame into a | ||
| 319 | ;; tty session, and save P's value in the custom parameter X:P, but only | ||
| 320 | ;; if X:P does not exist already (so it is not overwritten if you enter | ||
| 321 | ;; the tty session more than once). If you're not switching to a tty | ||
| 322 | ;; frame, the filter just passes CURRENT along. | ||
| 323 | ;; | ||
| 324 | ;; The parameter X:P, on the other hand, must have been setup to be | ||
| 325 | ;; filtered by `frameset-filter-unshelve-param', which unshelves the | ||
| 326 | ;; value: if we're entering a GUI session, returns P instead of CURRENT, | ||
| 327 | ;; while in other cases it just passes it along. | ||
| 328 | ;; | ||
| 329 | ;; The only additional trick is that `frameset-filter-shelve-param' does | ||
| 330 | ;; not set P if switching back to GUI and P already has a value, because | ||
| 331 | ;; it assumes that `frameset-filter-unshelve-param' did set it up. And | ||
| 332 | ;; `frameset-filter-unshelve-param', when unshelving P, must look into | ||
| 333 | ;; FILTERED to determine if P has already been set and if so, modify it; | ||
| 334 | ;; else just returns P. | ||
| 335 | ;; | ||
| 336 | ;; Currently, the value of X in X:P is `GUI', but you can use any prefix, | ||
| 337 | ;; by passing its symbol as argument in the filter: | ||
| 338 | ;; | ||
| 339 | ;; (my-parameter frameset-filter-shelve-param MYPREFIX) | ||
| 340 | ;; | ||
| 341 | ;; instead of | ||
| 342 | ;; | ||
| 343 | ;; (my-parameter . frameset-filter-shelve-param) | ||
| 344 | ;; | ||
| 345 | ;; Note that `frameset-filter-unshelve-param' does not need MYPREFIX | ||
| 346 | ;; because it is available from the parameter name in CURRENT. Also note | ||
| 347 | ;; that the colon between the prefix and the parameter name is hardcoded. | ||
| 348 | ;; The reason is that X:P is quite readable, and that the colon is a | ||
| 349 | ;; very unusual character in symbol names, other than in initial position | ||
| 350 | ;; in keywords (emacs -Q has only two such symbols, and one of them is a | ||
| 351 | ;; URL). So the probability of a collision with existing or future | ||
| 352 | ;; symbols is quite insignificant. | ||
| 353 | ;; | ||
| 354 | ;; Now, what about the filter alist variables? There are three of them, | ||
| 355 | ;; though only two sets of parameters: | ||
| 356 | ;; | ||
| 357 | ;; - `frameset-session-filter-alist' contains these filters that allow to | ||
| 358 | ;; save and restore framesets in-session, without the need to serialize | ||
| 359 | ;; the frameset or save it to disk (for example, to save a frameset in a | ||
| 360 | ;; register and restore it later). Filters in this list do not remove | ||
| 361 | ;; live objects, except in `minibuffer', which is dealt especially by | ||
| 362 | ;; `frameset-save' / `frameset-restore'. | ||
| 363 | ;; | ||
| 364 | ;; - `frameset-persistent-filter-alist' is the whole deal. It does all | ||
| 365 | ;; the filtering described above, and the result is ready to be saved on | ||
| 366 | ;; disk without loss of information. That's the format used by the | ||
| 367 | ;; desktop.el package, for example. | ||
| 368 | ;; | ||
| 369 | ;; IMPORTANT: These variables share structure and should NEVER be modified. | ||
| 370 | ;; | ||
| 371 | ;; - `frameset-filter-alist': The value of this variable is the default | ||
| 372 | ;; value for the FILTERS arguments of `frameset-save' and | ||
| 373 | ;; `frameset-restore'. It is set to `frameset-persistent-filter-alist', | ||
| 374 | ;; though it can be changed by specific applications. | ||
| 375 | ;; | ||
| 376 | ;; How to use them? | ||
| 377 | ;; | ||
| 378 | ;; The simplest way is just do nothing. The default should work | ||
| 379 | ;; reasonably and sensibly enough. But, what if you really need a | ||
| 380 | ;; customized filter alist? Then you can create your own variable | ||
| 381 | ;; | ||
| 382 | ;; (defvar my-filter-alist | ||
| 383 | ;; '((my-param1 . :never) | ||
| 384 | ;; (my-param2 . :save) | ||
| 385 | ;; (my-param3 . :restore) | ||
| 386 | ;; (my-param4 . my-filtering-function-without-args) | ||
| 387 | ;; (my-param5 my-filtering-function-with arg1 arg2) | ||
| 388 | ;; ;;; many other parameters | ||
| 389 | ;; ) | ||
| 390 | ;; "My customized parameter filter alist.") | ||
| 391 | ;; | ||
| 392 | ;; or, if you're only changing a few items, | ||
| 393 | ;; | ||
| 394 | ;; (defvar my-filter-alist | ||
| 395 | ;; (nconc '((my-param1 . :never) | ||
| 396 | ;; (my-param2 . my-filtering-function)) | ||
| 397 | ;; frameset-filter-alist) | ||
| 398 | ;; "My brief customized parameter filter alist.") | ||
| 399 | ;; | ||
| 400 | ;; and pass it to the FILTER arg of the save/restore functions, | ||
| 401 | ;; ALWAYS taking care of not modifying the original lists; if you're | ||
| 402 | ;; going to do any modifying of my-filter-alist, please use | ||
| 403 | ;; | ||
| 404 | ;; (nconc '((my-param1 . :never) ...) | ||
| 405 | ;; (copy-sequence frameset-filter-alist)) | ||
| 406 | ;; | ||
| 407 | ;; One thing you shouldn't forget is that they are alists, so searching | ||
| 408 | ;; in them is sequential. If you just want to change the default of | ||
| 409 | ;; `name' to allow it to be saved, you can set (name . nil) in your | ||
| 410 | ;; customized filter alist; it will take precedence over the latter | ||
| 411 | ;; setting. In case you decide that you *always* want to save `name', | ||
| 412 | ;; you can add it to `frameset-filter-alist': | ||
| 413 | ;; | ||
| 414 | ;; (push '(name . nil) frameset-filter-alist) | ||
| 415 | ;; | ||
| 416 | ;; In certain applications, having a parameter filtering function like | ||
| 417 | ;; `frameset-filter-params' can be useful, even if you're not using | ||
| 418 | ;; framesets. The interface of `frameset-filter-params' is generic | ||
| 419 | ;; and does not depend of global state, with one exception: it uses | ||
| 420 | ;; the internal variable `frameset--target-display' to decide if, and | ||
| 421 | ;; how, to modify the `display' parameter of FILTERED. But that | ||
| 422 | ;; should not represent any problem, because it's only meaningful | ||
| 423 | ;; when restoring, and customized uses of `frameset-filter-params' | ||
| 424 | ;; are likely to use their own filter alist and just call | ||
| 425 | ;; | ||
| 426 | ;; (setq my-filtered (frameset-filter-params my-params my-filters t)) | ||
| 427 | ;; | ||
| 428 | ;; In case you want to use it with the standard filters, you can | ||
| 429 | ;; wrap the call to `frameset-filter-params' in a let form to bind | ||
| 430 | ;; `frameset--target-display' to nil or the desired value. | ||
| 431 | ;; | ||
| 432 | |||
| 433 | ;;;###autoload | ||
| 434 | (defvar frameset-session-filter-alist | ||
| 435 | '((name . :never) | ||
| 436 | (left . frameset-filter-iconified) | ||
| 437 | (minibuffer . frameset-filter-minibuffer) | ||
| 438 | (top . frameset-filter-iconified)) | ||
| 439 | "Minimum set of parameters to filter for live (on-session) framesets. | ||
| 440 | DO NOT MODIFY. See `frameset-filter-alist' for a full description.") | ||
| 441 | |||
| 442 | ;;;###autoload | ||
| 443 | (defvar frameset-persistent-filter-alist | ||
| 444 | (nconc | ||
| 445 | '((background-color . frameset-filter-sanitize-color) | ||
| 446 | (buffer-list . :never) | ||
| 447 | (buffer-predicate . :never) | ||
| 448 | (buried-buffer-list . :never) | ||
| 449 | (font . frameset-filter-shelve-param) | ||
| 450 | (foreground-color . frameset-filter-sanitize-color) | ||
| 451 | (fullscreen . frameset-filter-shelve-param) | ||
| 452 | (GUI:font . frameset-filter-unshelve-param) | ||
| 453 | (GUI:fullscreen . frameset-filter-unshelve-param) | ||
| 454 | (GUI:height . frameset-filter-unshelve-param) | ||
| 455 | (GUI:width . frameset-filter-unshelve-param) | ||
| 456 | (height . frameset-filter-shelve-param) | ||
| 457 | (outer-window-id . :never) | ||
| 458 | (parent-id . :never) | ||
| 459 | (tty . frameset-filter-tty-to-GUI) | ||
| 460 | (tty-type . frameset-filter-tty-to-GUI) | ||
| 461 | (width . frameset-filter-shelve-param) | ||
| 462 | (window-id . :never) | ||
| 463 | (window-system . :never)) | ||
| 464 | frameset-session-filter-alist) | ||
| 465 | "Parameters to filter for persistent framesets. | ||
| 466 | DO NOT MODIFY. See `frameset-filter-alist' for a full description.") | ||
| 467 | |||
| 468 | ;;;###autoload | ||
| 469 | (defvar frameset-filter-alist frameset-persistent-filter-alist | ||
| 118 | "Alist of frame parameters and filtering functions. | 470 | "Alist of frame parameters and filtering functions. |
| 119 | 471 | ||
| 120 | Each element is a cons (PARAM . ACTION), where PARAM is a parameter | 472 | This alist is the default value of the FILTERS argument of |
| 121 | name (a symbol identifying a frame parameter), and ACTION can be: | 473 | `frameset-save' and `frameset-restore' (which see). |
| 474 | |||
| 475 | Initially, `frameset-filter-alist' is set to, and shares the value of, | ||
| 476 | `frameset-persistent-filter-alist'. You can override any item in | ||
| 477 | this alist by `push'ing a new item onto it. If, for some reason, you | ||
| 478 | intend to modify existing values, do | ||
| 122 | 479 | ||
| 123 | t The parameter is always removed from the parameter list. | 480 | (setq frameset-filter-alist (copy-tree frameset-filter-alist)) |
| 124 | :save The parameter is removed when saving the frame. | 481 | |
| 125 | :restore The parameter is removed when restoring the frame. | 482 | before changing anything. |
| 483 | |||
| 484 | On saving, PARAMETERS is the parameter alist of each frame processed, | ||
| 485 | and FILTERED is the parameter alist that gets saved to the frameset. | ||
| 486 | |||
| 487 | On restoring, PARAMETERS is the parameter alist extracted from the | ||
| 488 | frameset, and FILTERED is the resulting frame parameter alist used | ||
| 489 | to restore the frame. | ||
| 490 | |||
| 491 | Elements of `frameset-filter-alist' are conses (PARAM . ACTION), | ||
| 492 | where PARAM is a parameter name (a symbol identifying a frame | ||
| 493 | parameter), and ACTION can be: | ||
| 494 | |||
| 495 | nil The parameter is copied to FILTERED. | ||
| 496 | :never The parameter is never copied to FILTERED. | ||
| 497 | :save The parameter is copied only when saving the frame. | ||
| 498 | :restore The parameter is copied only when restoring the frame. | ||
| 126 | FILTER A filter function. | 499 | FILTER A filter function. |
| 127 | 500 | ||
| 128 | FILTER can be a symbol FILTER-FUN, or a list (FILTER-FUN ARGS...). | 501 | FILTER can be a symbol FILTER-FUN, or a list (FILTER-FUN ARGS...). |
| 129 | It will be called with four arguments CURRENT, FILTERED, PARAMETERS | 502 | FILTER-FUN is invoked with |
| 130 | and SAVING, plus any additional ARGS: | 503 | |
| 504 | (apply FILTER-FUN CURRENT FILTERED PARAMETERS SAVING ARGS) | ||
| 505 | |||
| 506 | where | ||
| 131 | 507 | ||
| 132 | CURRENT A cons (PARAM . VALUE), where PARAM is the one being | 508 | CURRENT A cons (PARAM . VALUE), where PARAM is the one being |
| 133 | filtered and VALUE is its current value. | 509 | filtered and VALUE is its current value. |
| 134 | FILTERED The alist of parameters filtered so far. | 510 | FILTERED The resulting alist (so far). |
| 135 | PARAMETERS The complete alist of parameters being filtered, | 511 | PARAMETERS The complete alist of parameters being filtered, |
| 136 | SAVING Non-nil if filtering before saving state, nil otherwise. | 512 | SAVING Non-nil if filtering before saving state, nil if filtering |
| 513 | before restoring it. | ||
| 514 | ARGS Any additional arguments specified in the ACTION. | ||
| 515 | |||
| 516 | FILTER-FUN is allowed to modify items in FILTERED, but no other arguments. | ||
| 517 | It must return: | ||
| 518 | nil Skip CURRENT (do not add it to FILTERED). | ||
| 519 | t Add CURRENT to FILTERED as is. | ||
| 520 | (NEW-PARAM . NEW-VALUE) Add this to FILTERED instead of CURRENT. | ||
| 137 | 521 | ||
| 138 | The FILTER-FUN function must return: | 522 | Frame parameters not on this alist are passed intact, as if they were |
| 139 | nil CURRENT is removed from the list. | 523 | defined with ACTION = nil.") |
| 140 | t CURRENT is left as is. | ||
| 141 | (PARAM' . VALUE') Replace CURRENT with this. | ||
| 142 | 524 | ||
| 143 | Frame parameters not on this list are passed intact.") | ||
| 144 | 525 | ||
| 145 | (defvar frameset--target-display nil | 526 | (defvar frameset--target-display nil |
| 146 | ;; Either (minibuffer . VALUE) or nil. | 527 | ;; Either (minibuffer . VALUE) or nil. |
| 147 | ;; This refers to the current frame config being processed inside | 528 | ;; This refers to the current frame config being processed inside |
| 148 | ;; `frame--restore-frames' and its auxiliary functions (like filtering). | 529 | ;; `frameset-restore' and its auxiliary functions (like filtering). |
| 149 | ;; If nil, there is no need to change the display. | 530 | ;; If nil, there is no need to change the display. |
| 150 | ;; If non-nil, display parameter to use when creating the frame. | 531 | ;; If non-nil, display parameter to use when creating the frame. |
| 151 | "Internal use only.") | 532 | "Internal use only.") |
| 152 | 533 | ||
| 153 | (defun frameset-switch-to-gui-p (parameters) | 534 | (defun frameset-switch-to-gui-p (parameters) |
| 154 | "True when switching to a graphic display. | 535 | "True when switching to a graphic display. |
| 155 | Return t if PARAMETERS describes a text-only terminal and | 536 | Return non-nil if the parameter alist PARAMETERS describes a frame on a |
| 156 | the target is a graphic display; otherwise return nil. | 537 | text-only terminal, and the frame is being restored on a graphic display; |
| 157 | Only meaningful when called from a filtering function in | 538 | otherwise return nil. Only meaningful when called from a filtering |
| 158 | `frameset-filter-alist'." | 539 | function in `frameset-filter-alist'." |
| 159 | (and frameset--target-display ; we're switching | 540 | (and frameset--target-display ; we're switching |
| 160 | (null (cdr (assq 'display parameters))) ; from a tty | 541 | (null (cdr (assq 'display parameters))) ; from a tty |
| 161 | (cdr frameset--target-display))) ; to a GUI display | 542 | (cdr frameset--target-display))) ; to a GUI display |
| 162 | 543 | ||
| 163 | (defun frameset-switch-to-tty-p (parameters) | 544 | (defun frameset-switch-to-tty-p (parameters) |
| 164 | "True when switching to a text-only terminal. | 545 | "True when switching to a text-only terminal. |
| 165 | Return t if PARAMETERS describes a graphic display and | 546 | Return non-nil if the parameter alist PARAMETERS describes a frame on a |
| 166 | the target is a text-only terminal; otherwise return nil. | 547 | graphic display, and the frame is being restored on a text-only terminal; |
| 167 | Only meaningful when called from a filtering function in | 548 | otherwise return nil. Only meaningful when called from a filtering |
| 168 | `frameset-filter-alist'." | 549 | function in `frameset-filter-alist'." |
| 169 | (and frameset--target-display ; we're switching | 550 | (and frameset--target-display ; we're switching |
| 170 | (cdr (assq 'display parameters)) ; from a GUI display | 551 | (cdr (assq 'display parameters)) ; from a GUI display |
| 171 | (null (cdr frameset--target-display)))) ; to a tty | 552 | (null (cdr frameset--target-display)))) ; to a tty |
| 553 | |||
| 554 | (defun frameset-filter-tty-to-GUI (_current _filtered parameters saving) | ||
| 555 | "Remove CURRENT when switching from tty to a graphic display. | ||
| 556 | |||
| 557 | For the meaning of CURRENT, FILTERED, PARAMETERS and SAVING, | ||
| 558 | see `frameset-filter-alist'." | ||
| 559 | (or saving | ||
| 560 | (not (frameset-switch-to-gui-p parameters)))) | ||
| 172 | 561 | ||
| 173 | (defun frameset-filter-sanitize-color (current _filtered parameters saving) | 562 | (defun frameset-filter-sanitize-color (current _filtered parameters saving) |
| 174 | "When switching to a GUI frame, remove \"unspecified\" colors. | 563 | "When switching to a GUI frame, remove \"unspecified\" colors. |
| 175 | Useful as a filter function for tty-specific parameters." | 564 | Useful as a filter function for tty-specific parameters. |
| 565 | |||
| 566 | For the meaning of CURRENT, FILTERED, PARAMETERS and SAVING, | ||
| 567 | see `frameset-filter-alist'." | ||
| 176 | (or saving | 568 | (or saving |
| 177 | (not (frameset-switch-to-gui-p parameters)) | 569 | (not (frameset-switch-to-gui-p parameters)) |
| 178 | (not (stringp (cdr current))) | 570 | (not (stringp (cdr current))) |
| 179 | (not (string-match-p "^unspecified-[fb]g$" (cdr current))))) | 571 | (not (string-match-p "^unspecified-[fb]g$" (cdr current))))) |
| 180 | 572 | ||
| 181 | (defun frameset-filter-minibuffer (current _filtered _parameters saving) | 573 | (defun frameset-filter-minibuffer (current filtered _parameters saving) |
| 182 | "When saving, convert (minibuffer . #<window>) parameter to (minibuffer . t)." | 574 | "Force the minibuffer parameter to have a sensible value. |
| 183 | (or (not saving) | 575 | |
| 184 | (if (windowp (cdr current)) | 576 | When saving, convert (minibuffer . #<window>) to (minibuffer . t). |
| 185 | '(minibuffer . t) | 577 | When restoring, if there are two copies, keep the one pointing to |
| 186 | t))) | 578 | a live window. |
| 579 | |||
| 580 | For the meaning of CURRENT, FILTERED, PARAMETERS and SAVING, | ||
| 581 | see `frameset-filter-alist'." | ||
| 582 | (let ((value (cdr current)) mini) | ||
| 583 | (cond (saving | ||
| 584 | (if (windowp value) '(minibuffer . t) t)) | ||
| 585 | ((setq mini (assq 'minibuffer filtered)) | ||
| 586 | (when (windowp value) (setcdr mini value)) | ||
| 587 | nil) | ||
| 588 | (t t)))) | ||
| 187 | 589 | ||
| 188 | (defun frameset-filter-save-parm (current _filtered parameters saving | 590 | (defun frameset-filter-shelve-param (current _filtered parameters saving |
| 189 | &optional prefix) | 591 | &optional prefix) |
| 190 | "When switching to a tty frame, save parameter P as PREFIX:P. | 592 | "When switching to a tty frame, save parameter P as PREFIX:P. |
| 191 | The parameter can be later restored with `frameset-filter-restore-parm'. | 593 | The parameter can be later restored with `frameset-filter-unshelve-param'. |
| 192 | PREFIX defaults to `GUI'." | 594 | PREFIX defaults to `GUI'. |
| 595 | |||
| 596 | For the meaning of CURRENT, FILTERED, PARAMETERS and SAVING, | ||
| 597 | see `frameset-filter-alist'." | ||
| 193 | (unless prefix (setq prefix 'GUI)) | 598 | (unless prefix (setq prefix 'GUI)) |
| 194 | (cond (saving t) | 599 | (cond (saving t) |
| 195 | ((frameset-switch-to-tty-p parameters) | 600 | ((frameset-switch-to-tty-p parameters) |
| @@ -201,9 +606,12 @@ PREFIX defaults to `GUI'." | |||
| 201 | (not (assq (intern (format "%s:%s" prefix (car current))) parameters))) | 606 | (not (assq (intern (format "%s:%s" prefix (car current))) parameters))) |
| 202 | (t t))) | 607 | (t t))) |
| 203 | 608 | ||
| 204 | (defun frameset-filter-restore-parm (current filtered parameters saving) | 609 | (defun frameset-filter-unshelve-param (current filtered parameters saving) |
| 205 | "When switching to a GUI frame, restore PREFIX:P parameter as P. | 610 | "When switching to a GUI frame, restore PREFIX:P parameter as P. |
| 206 | CURRENT must be of the form (PREFIX:P . value)." | 611 | CURRENT must be of the form (PREFIX:P . value). |
| 612 | |||
| 613 | For the meaning of CURRENT, FILTERED, PARAMETERS and SAVING, | ||
| 614 | see `frameset-filter-alist'." | ||
| 207 | (or saving | 615 | (or saving |
| 208 | (not (frameset-switch-to-gui-p parameters)) | 616 | (not (frameset-switch-to-gui-p parameters)) |
| 209 | (let* ((prefix:p (symbol-name (car current))) | 617 | (let* ((prefix:p (symbol-name (car current))) |
| @@ -218,38 +626,40 @@ CURRENT must be of the form (PREFIX:P . value)." | |||
| 218 | 626 | ||
| 219 | (defun frameset-filter-iconified (_current _filtered parameters saving) | 627 | (defun frameset-filter-iconified (_current _filtered parameters saving) |
| 220 | "Remove CURRENT when saving an iconified frame. | 628 | "Remove CURRENT when saving an iconified frame. |
| 221 | This is used for positions parameters `left' and `top', which are | 629 | This is used for positional parameters `left' and `top', which are |
| 222 | meaningless in an iconified frame, so the frame is restored in a | 630 | meaningless in an iconified frame, so the frame is restored in a |
| 223 | default position." | 631 | default position. |
| 224 | (not (and saving (eq (cdr (assq 'visibility parameters)) 'icon)))) | ||
| 225 | 632 | ||
| 226 | (defun frameset-keep-original-display-p (force-display) | 633 | For the meaning of CURRENT, FILTERED, PARAMETERS and SAVING, |
| 227 | "True if saved frames' displays should be honored." | 634 | see `frameset-filter-alist'." |
| 228 | (cond ((daemonp) t) | 635 | (not (and saving (eq (cdr (assq 'visibility parameters)) 'icon)))) |
| 229 | ((eq system-type 'windows-nt) nil) | ||
| 230 | (t (null force-display)))) | ||
| 231 | 636 | ||
| 232 | (defun frameset-filter-params (parameters filter-alist saving) | 637 | (defun frameset-filter-params (parameters filter-alist saving) |
| 233 | "Filter parameter list PARAMETERS and return a filtered list. | 638 | "Filter parameter alist PARAMETERS and return a filtered alist. |
| 234 | FILTER-ALIST is an alist of parameter filters, in the format of | 639 | FILTER-ALIST is an alist of parameter filters, in the format of |
| 235 | `frameset-filter-alist' (which see). | 640 | `frameset-filter-alist' (which see). |
| 236 | SAVING is non-nil while filtering parameters to save a frameset, | 641 | SAVING is non-nil while filtering parameters to save a frameset, |
| 237 | nil while the filtering is done to restore it." | 642 | nil while the filtering is done to restore it." |
| 238 | (let ((filtered nil)) | 643 | (let ((filtered nil)) |
| 239 | (dolist (current parameters) | 644 | (dolist (current parameters) |
| 645 | ;; When saving, the parameter alist is temporary, so modifying it | ||
| 646 | ;; is not a problem. When restoring, the parameter alist is part | ||
| 647 | ;; of a frameset, so we must copy parameters to avoid inadvertent | ||
| 648 | ;; modifications. | ||
| 240 | (pcase (cdr (assq (car current) filter-alist)) | 649 | (pcase (cdr (assq (car current) filter-alist)) |
| 241 | (`nil | 650 | (`nil |
| 242 | (push current filtered)) | 651 | (push (if saving current (copy-tree current)) filtered)) |
| 243 | (`t | 652 | (:never |
| 244 | nil) | 653 | nil) |
| 245 | (:save | ||
| 246 | (unless saving (push current filtered))) | ||
| 247 | (:restore | 654 | (:restore |
| 655 | (unless saving (push (copy-tree current) filtered))) | ||
| 656 | (:save | ||
| 248 | (when saving (push current filtered))) | 657 | (when saving (push current filtered))) |
| 249 | ((or `(,fun . ,args) (and fun (pred fboundp))) | 658 | ((or `(,fun . ,args) (and fun (pred fboundp))) |
| 250 | (let ((this (apply fun current filtered parameters saving args))) | 659 | (let* ((this (apply fun current filtered parameters saving args)) |
| 251 | (when this | 660 | (val (if (eq this t) current this))) |
| 252 | (push (if (eq this t) current this) filtered)))) | 661 | (when val |
| 662 | (push (if saving val (copy-tree val)) filtered)))) | ||
| 253 | (other | 663 | (other |
| 254 | (delay-warning 'frameset (format "Unknown filter %S" other) :error)))) | 664 | (delay-warning 'frameset (format "Unknown filter %S" other) :error)))) |
| 255 | ;; Set the display parameter after filtering, so that filter functions | 665 | ;; Set the display parameter after filtering, so that filter functions |
| @@ -262,21 +672,48 @@ nil while the filtering is done to restore it." | |||
| 262 | filtered)) | 672 | filtered)) |
| 263 | 673 | ||
| 264 | 674 | ||
| 265 | ;; Saving framesets | 675 | ;; Frame ids |
| 266 | 676 | ||
| 267 | (defun frameset--set-id (frame) | 677 | (defun frameset--set-id (frame) |
| 268 | "Set FRAME's `frameset-id' if not yet set. | 678 | "Set FRAME's id if not yet set. |
| 269 | Internal use only." | 679 | Internal use only." |
| 270 | (unless (frame-parameter frame 'frameset-id) | 680 | (unless (frame-parameter frame 'frameset--id) |
| 271 | (set-frame-parameter frame | 681 | (set-frame-parameter frame |
| 272 | 'frameset-id | 682 | 'frameset--id |
| 273 | (mapconcat (lambda (n) (format "%04X" n)) | 683 | (mapconcat (lambda (n) (format "%04X" n)) |
| 274 | (cl-loop repeat 4 collect (random 65536)) | 684 | (cl-loop repeat 4 collect (random 65536)) |
| 275 | "-")))) | 685 | "-")))) |
| 686 | ;;;###autoload | ||
| 687 | (defun frameset-frame-id (frame) | ||
| 688 | "Return the frame id of FRAME, if it has one; else, return nil. | ||
| 689 | A frame id is a string that uniquely identifies a frame. | ||
| 690 | It is persistent across `frameset-save' / `frameset-restore' | ||
| 691 | invocations, and once assigned is never changed unless the same | ||
| 692 | frame is duplicated (via `frameset-restore'), in which case the | ||
| 693 | newest frame keeps the id and the old frame's is set to nil." | ||
| 694 | (frame-parameter frame 'frameset--id)) | ||
| 695 | |||
| 696 | ;;;###autoload | ||
| 697 | (defun frameset-frame-id-equal-p (frame id) | ||
| 698 | "Return non-nil if FRAME's id matches ID." | ||
| 699 | (string= (frameset-frame-id frame) id)) | ||
| 700 | |||
| 701 | ;;;###autoload | ||
| 702 | (defun frameset-frame-with-id (id &optional frame-list) | ||
| 703 | "Return the live frame with id ID, if exists; else nil. | ||
| 704 | If FRAME-LIST is a list of frames, check these frames only. | ||
| 705 | If nil, check all live frames." | ||
| 706 | (cl-find-if (lambda (f) | ||
| 707 | (and (frame-live-p f) | ||
| 708 | (frameset-frame-id-equal-p f id))) | ||
| 709 | (or frame-list (frame-list)))) | ||
| 710 | |||
| 711 | |||
| 712 | ;; Saving framesets | ||
| 276 | 713 | ||
| 277 | (defun frameset--process-minibuffer-frames (frame-list) | 714 | (defun frameset--record-minibuffer-relationships (frame-list) |
| 278 | "Process FRAME-LIST and record minibuffer relationships. | 715 | "Process FRAME-LIST and record minibuffer relationships. |
| 279 | FRAME-LIST is a list of frames." | 716 | FRAME-LIST is a list of frames. Internal use only." |
| 280 | ;; Record frames with their own minibuffer | 717 | ;; Record frames with their own minibuffer |
| 281 | (dolist (frame (minibuffer-frame-list)) | 718 | (dolist (frame (minibuffer-frame-list)) |
| 282 | (when (memq frame frame-list) | 719 | (when (memq frame frame-list) |
| @@ -291,73 +728,106 @@ FRAME-LIST is a list of frames." | |||
| 291 | (dolist (frame frame-list) | 728 | (dolist (frame frame-list) |
| 292 | (unless (frame-parameter frame 'frameset--mini) | 729 | (unless (frame-parameter frame 'frameset--mini) |
| 293 | (frameset--set-id frame) | 730 | (frameset--set-id frame) |
| 294 | (let* ((mb-frame (window-frame (minibuffer-window frame))) | 731 | (let ((mb-frame (window-frame (minibuffer-window frame)))) |
| 295 | (id (and mb-frame (frame-parameter mb-frame 'frameset-id)))) | 732 | ;; For minibufferless frames, frameset--mini is a cons |
| 296 | (if (null id) | 733 | ;; (nil . FRAME-ID), where FRAME-ID is the frameset--id of |
| 297 | (error "Minibuffer frame %S for %S is excluded" mb-frame frame) | 734 | ;; the frame containing its minibuffer window. |
| 298 | ;; For minibufferless frames, frameset--mini is a cons | 735 | ;; FRAME-ID can be set to nil, if FRAME-LIST doesn't contain |
| 299 | ;; (nil . FRAME-ID), where FRAME-ID is the frameset-id of | 736 | ;; the minibuffer frame of a minibufferless frame; we allow |
| 300 | ;; the frame containing its minibuffer window. | 737 | ;; it without trying to second-guess the user. |
| 301 | (set-frame-parameter frame | 738 | (set-frame-parameter frame |
| 302 | 'frameset--mini | 739 | 'frameset--mini |
| 303 | (cons nil id))))))) | 740 | (cons nil |
| 741 | (and mb-frame | ||
| 742 | (frameset-frame-id mb-frame)))))))) | ||
| 304 | 743 | ||
| 305 | ;;;###autoload | 744 | ;;;###autoload |
| 306 | (cl-defun frameset-save (frame-list &key filters predicate properties) | 745 | (cl-defun frameset-save (frame-list |
| 307 | "Return the frameset of FRAME-LIST, a list of frames. | 746 | &key app name description |
| 308 | If nil, FRAME-LIST defaults to all live frames. | 747 | filters predicate properties) |
| 309 | FILTERS is an alist of parameter filters; defaults to `frameset-filter-alist'. | 748 | "Return a frameset for FRAME-LIST, a list of frames. |
| 749 | Dead frames and non-frame objects are silently removed from the list. | ||
| 750 | If nil, FRAME-LIST defaults to the output of `frame-list' (all live frames). | ||
| 751 | APP, NAME and DESCRIPTION are optional data; see the docstring of the | ||
| 752 | `frameset' defstruct for details. | ||
| 753 | FILTERS is an alist of parameter filters; if nil, the value of the variable | ||
| 754 | `frameset-filter-alist' is used instead. | ||
| 310 | PREDICATE is a predicate function, which must return non-nil for frames that | 755 | PREDICATE is a predicate function, which must return non-nil for frames that |
| 311 | should be saved; it defaults to saving all frames from FRAME-LIST. | 756 | should be saved; if PREDICATE is nil, all frames from FRAME-LIST are saved. |
| 312 | PROPERTIES is a user-defined property list to add to the frameset." | 757 | PROPERTIES is a user-defined property list to add to the frameset." |
| 313 | (let ((frames (cl-delete-if-not #'frame-live-p | 758 | (let* ((list (or (copy-sequence frame-list) (frame-list))) |
| 314 | (cl-delete-if-not (or predicate #'framep) | 759 | (frames (cl-delete-if-not #'frame-live-p |
| 315 | (or (copy-sequence frame-list) | 760 | (if predicate |
| 316 | (frame-list)))))) | 761 | (cl-delete-if-not predicate list) |
| 317 | (frameset--process-minibuffer-frames frames) | 762 | list))) |
| 318 | (make-frameset :properties (append '(:version 1) properties) | 763 | fs) |
| 319 | :states (mapcar | 764 | (frameset--record-minibuffer-relationships frames) |
| 320 | (lambda (frame) | 765 | (setq fs (frameset--make |
| 321 | (cons | 766 | :app app |
| 322 | (frameset-filter-params (frame-parameters frame) | 767 | :name name |
| 323 | (or filters | 768 | :description description |
| 324 | frameset-filter-alist) | 769 | :properties properties |
| 325 | t) | 770 | :states (mapcar |
| 326 | (window-state-get (frame-root-window frame) t))) | 771 | (lambda (frame) |
| 327 | frames)))) | 772 | (cons |
| 773 | (frameset-filter-params (frame-parameters frame) | ||
| 774 | (or filters | ||
| 775 | frameset-filter-alist) | ||
| 776 | t) | ||
| 777 | (window-state-get (frame-root-window frame) t))) | ||
| 778 | frames))) | ||
| 779 | (cl-assert (frameset-valid-p fs)) | ||
| 780 | fs)) | ||
| 328 | 781 | ||
| 329 | 782 | ||
| 330 | ;; Restoring framesets | 783 | ;; Restoring framesets |
| 331 | 784 | ||
| 332 | (defvar frameset--reuse-list nil | 785 | (defvar frameset--reuse-list nil |
| 333 | "Internal use only.") | 786 | "The list of frames potentially reusable. |
| 334 | 787 | Its value is only meaningful during execution of `frameset-restore'. | |
| 335 | (defun frameset--compute-pos (value left/top right/bottom) | 788 | Internal use only.") |
| 789 | |||
| 790 | (defun frameset-compute-pos (value left/top right/bottom) | ||
| 791 | "Return an absolute positioning value for a frame. | ||
| 792 | VALUE is the value of a positional frame parameter (`left' or `top'). | ||
| 793 | If VALUE is relative to the screen edges (like (+ -35) or (-200), it is | ||
| 794 | converted to absolute by adding it to the corresponding edge; if it is | ||
| 795 | an absolute position, it is returned unmodified. | ||
| 796 | LEFT/TOP and RIGHT/BOTTOM indicate the dimensions of the screen in | ||
| 797 | pixels along the relevant direction: either the position of the left | ||
| 798 | and right edges for a `left' positional parameter, or the position of | ||
| 799 | the top and bottom edges for a `top' parameter." | ||
| 336 | (pcase value | 800 | (pcase value |
| 337 | (`(+ ,val) (+ left/top val)) | 801 | (`(+ ,val) (+ left/top val)) |
| 338 | (`(- ,val) (+ right/bottom val)) | 802 | (`(- ,val) (+ right/bottom val)) |
| 339 | (val val))) | 803 | (val val))) |
| 340 | 804 | ||
| 341 | (defun frameset--move-onscreen (frame force-onscreen) | 805 | (defun frameset-move-onscreen (frame force-onscreen) |
| 342 | "If FRAME is offscreen, move it back onscreen and, if necessary, resize it. | 806 | "If FRAME is offscreen, move it back onscreen and, if necessary, resize it. |
| 343 | For the description of FORCE-ONSCREEN, see `frameset-restore'. | 807 | For the description of FORCE-ONSCREEN, see `frameset-restore'. |
| 344 | When forced onscreen, frames wider than the monitor's workarea are converted | 808 | When forced onscreen, frames wider than the monitor's workarea are converted |
| 345 | to fullwidth, and frames taller than the workarea are converted to fullheight. | 809 | to fullwidth, and frames taller than the workarea are converted to fullheight. |
| 346 | NOTE: This only works for non-iconified frames. Internal use only." | 810 | NOTE: This only works for non-iconified frames." |
| 347 | (pcase-let* ((`(,left ,top ,width ,height) (cl-cdadr (frame-monitor-attributes frame))) | 811 | (pcase-let* ((`(,left ,top ,width ,height) (cl-cdadr (frame-monitor-attributes frame))) |
| 348 | (right (+ left width -1)) | 812 | (right (+ left width -1)) |
| 349 | (bottom (+ top height -1)) | 813 | (bottom (+ top height -1)) |
| 350 | (fr-left (frameset--compute-pos (frame-parameter frame 'left) left right)) | 814 | (fr-left (frameset-compute-pos (frame-parameter frame 'left) left right)) |
| 351 | (fr-top (frameset--compute-pos (frame-parameter frame 'top) top bottom)) | 815 | (fr-top (frameset-compute-pos (frame-parameter frame 'top) top bottom)) |
| 352 | (ch-width (frame-char-width frame)) | 816 | (ch-width (frame-char-width frame)) |
| 353 | (ch-height (frame-char-height frame)) | 817 | (ch-height (frame-char-height frame)) |
| 354 | (fr-width (max (frame-pixel-width frame) (* ch-width (frame-width frame)))) | 818 | (fr-width (max (frame-pixel-width frame) (* ch-width (frame-width frame)))) |
| 355 | (fr-height (max (frame-pixel-height frame) (* ch-height (frame-height frame)))) | 819 | (fr-height (max (frame-pixel-height frame) (* ch-height (frame-height frame)))) |
| 356 | (fr-right (+ fr-left fr-width -1)) | 820 | (fr-right (+ fr-left fr-width -1)) |
| 357 | (fr-bottom (+ fr-top fr-height -1))) | 821 | (fr-bottom (+ fr-top fr-height -1))) |
| 358 | (when (pcase force-onscreen | 822 | (when (pcase force-onscreen |
| 823 | ;; A predicate. | ||
| 824 | ((pred functionp) | ||
| 825 | (funcall force-onscreen | ||
| 826 | frame | ||
| 827 | (list fr-left fr-top fr-width fr-height) | ||
| 828 | (list left top width height))) | ||
| 359 | ;; Any corner is outside the screen. | 829 | ;; Any corner is outside the screen. |
| 360 | (`all (or (< fr-bottom top) (> fr-bottom bottom) | 830 | (:all (or (< fr-bottom top) (> fr-bottom bottom) |
| 361 | (< fr-left left) (> fr-left right) | 831 | (< fr-left left) (> fr-left right) |
| 362 | (< fr-right left) (> fr-right right) | 832 | (< fr-right left) (> fr-right right) |
| 363 | (< fr-top top) (> fr-top bottom))) | 833 | (< fr-top top) (> fr-top bottom))) |
| @@ -396,7 +866,7 @@ NOTE: This only works for non-iconified frames. Internal use only." | |||
| 396 | (when params | 866 | (when params |
| 397 | (modify-frame-parameters frame params)))))) | 867 | (modify-frame-parameters frame params)))))) |
| 398 | 868 | ||
| 399 | (defun frameset--find-frame (predicate display &rest args) | 869 | (defun frameset--find-frame-if (predicate display &rest args) |
| 400 | "Find a frame in `frameset--reuse-list' satisfying PREDICATE. | 870 | "Find a frame in `frameset--reuse-list' satisfying PREDICATE. |
| 401 | Look through available frames whose display property matches DISPLAY | 871 | Look through available frames whose display property matches DISPLAY |
| 402 | and return the first one for which (PREDICATE frame ARGS) returns t. | 872 | and return the first one for which (PREDICATE frame ARGS) returns t. |
| @@ -407,10 +877,10 @@ If PREDICATE is nil, it is always satisfied. Internal use only." | |||
| 407 | (apply predicate frame args)))) | 877 | (apply predicate frame args)))) |
| 408 | frameset--reuse-list)) | 878 | frameset--reuse-list)) |
| 409 | 879 | ||
| 410 | (defun frameset--reuse-frame (display frame-cfg) | 880 | (defun frameset--reuse-frame (display parameters) |
| 411 | "Look for an existing frame to reuse. | 881 | "Return an existing frame to reuse, or nil if none found. |
| 412 | DISPLAY is the display where the frame will be shown, and FRAME-CFG | 882 | DISPLAY is the display where the frame will be shown, and PARAMETERS |
| 413 | is the parameter list of the frame being restored. Internal use only." | 883 | is the parameter alist of the frame being restored. Internal use only." |
| 414 | (let ((frame nil) | 884 | (let ((frame nil) |
| 415 | mini) | 885 | mini) |
| 416 | ;; There are no fancy heuristics there. We could implement some | 886 | ;; There are no fancy heuristics there. We could implement some |
| @@ -423,19 +893,19 @@ is the parameter list of the frame being restored. Internal use only." | |||
| 423 | ;; will usually have only one frame, and should already work. | 893 | ;; will usually have only one frame, and should already work. |
| 424 | (cond ((null display) | 894 | (cond ((null display) |
| 425 | ;; When the target is tty, every existing frame is reusable. | 895 | ;; When the target is tty, every existing frame is reusable. |
| 426 | (setq frame (frameset--find-frame nil display))) | 896 | (setq frame (frameset--find-frame-if nil display))) |
| 427 | ((car (setq mini (cdr (assq 'frameset--mini frame-cfg)))) | 897 | ((car (setq mini (cdr (assq 'frameset--mini parameters)))) |
| 428 | ;; If the frame has its own minibuffer, let's see whether | 898 | ;; If the frame has its own minibuffer, let's see whether |
| 429 | ;; that frame has already been loaded (which can happen after | 899 | ;; that frame has already been loaded (which can happen after |
| 430 | ;; M-x desktop-read). | 900 | ;; M-x desktop-read). |
| 431 | (setq frame (frameset--find-frame | 901 | (setq frame (frameset--find-frame-if |
| 432 | (lambda (f id) | 902 | (lambda (f id) |
| 433 | (string= (frame-parameter f 'frameset-id) id)) | 903 | (frameset-frame-id-equal-p f id)) |
| 434 | display (cdr mini))) | 904 | display (cdr (assq 'frameset--id parameters)))) |
| 435 | ;; If it has not been loaded, and it is not a minibuffer-only frame, | 905 | ;; If it has not been loaded, and it is not a minibuffer-only frame, |
| 436 | ;; let's look for an existing non-minibuffer-only frame to reuse. | 906 | ;; let's look for an existing non-minibuffer-only frame to reuse. |
| 437 | (unless (or frame (eq (cdr (assq 'minibuffer frame-cfg)) 'only)) | 907 | (unless (or frame (eq (cdr (assq 'minibuffer parameters)) 'only)) |
| 438 | (setq frame (frameset--find-frame | 908 | (setq frame (frameset--find-frame-if |
| 439 | (lambda (f) | 909 | (lambda (f) |
| 440 | (let ((w (frame-parameter f 'minibuffer))) | 910 | (let ((w (frame-parameter f 'minibuffer))) |
| 441 | (and (window-live-p w) | 911 | (and (window-live-p w) |
| @@ -445,29 +915,40 @@ is the parameter list of the frame being restored. Internal use only." | |||
| 445 | (mini | 915 | (mini |
| 446 | ;; For minibufferless frames, check whether they already exist, | 916 | ;; For minibufferless frames, check whether they already exist, |
| 447 | ;; and that they are linked to the right minibuffer frame. | 917 | ;; and that they are linked to the right minibuffer frame. |
| 448 | (setq frame (frameset--find-frame | 918 | (setq frame (frameset--find-frame-if |
| 449 | (lambda (f id mini-id) | 919 | (lambda (f id mini-id) |
| 450 | (and (string= (frame-parameter f 'frameset-id) id) | 920 | (and (frameset-frame-id-equal-p f id) |
| 451 | (string= (frame-parameter (window-frame (minibuffer-window f)) | 921 | (or (null mini-id) ; minibuffer frame not saved |
| 452 | 'frameset-id) | 922 | (frameset-frame-id-equal-p |
| 453 | mini-id))) | 923 | (window-frame (minibuffer-window f)) |
| 454 | display (cdr (assq 'frameset-id frame-cfg)) (cdr mini)))) | 924 | mini-id)))) |
| 925 | display | ||
| 926 | (cdr (assq 'frameset--id parameters)) (cdr mini)))) | ||
| 455 | (t | 927 | (t |
| 456 | ;; Default to just finding a frame in the same display. | 928 | ;; Default to just finding a frame in the same display. |
| 457 | (setq frame (frameset--find-frame nil display)))) | 929 | (setq frame (frameset--find-frame-if nil display)))) |
| 458 | ;; If found, remove from the list. | 930 | ;; If found, remove from the list. |
| 459 | (when frame | 931 | (when frame |
| 460 | (setq frameset--reuse-list (delq frame frameset--reuse-list))) | 932 | (setq frameset--reuse-list (delq frame frameset--reuse-list))) |
| 461 | frame)) | 933 | frame)) |
| 462 | 934 | ||
| 463 | (defun frameset--get-frame (frame-cfg window-cfg filters force-onscreen) | 935 | (defun frameset--initial-params (parameters) |
| 936 | "Return a list of PARAMETERS that must be set when creating the frame. | ||
| 937 | Setting position and size parameters as soon as possible helps reducing | ||
| 938 | flickering; other parameters, like `minibuffer' and `border-width', can | ||
| 939 | not be changed once the frame has been created. Internal use only." | ||
| 940 | (cl-loop for param in '(left top with height border-width minibuffer) | ||
| 941 | collect (assq param parameters))) | ||
| 942 | |||
| 943 | (defun frameset--restore-frame (parameters window-state filters force-onscreen) | ||
| 464 | "Set up and return a frame according to its saved state. | 944 | "Set up and return a frame according to its saved state. |
| 465 | That means either reusing an existing frame or creating one anew. | 945 | That means either reusing an existing frame or creating one anew. |
| 466 | FRAME-CFG is the frame's parameter list; WINDOW-CFG is its window state. | 946 | PARAMETERS is the frame's parameter alist; WINDOW-STATE is its window state. |
| 467 | For the meaning of FORCE-ONSCREEN, see `frameset-restore'." | 947 | For the meaning of FILTERS and FORCE-ONSCREEN, see `frameset-restore'. |
| 468 | (let* ((fullscreen (cdr (assq 'fullscreen frame-cfg))) | 948 | Internal use only." |
| 469 | (lines (assq 'tool-bar-lines frame-cfg)) | 949 | (let* ((fullscreen (cdr (assq 'fullscreen parameters))) |
| 470 | (filtered-cfg (frameset-filter-params frame-cfg filters nil)) | 950 | (lines (assq 'tool-bar-lines parameters)) |
| 951 | (filtered-cfg (frameset-filter-params parameters filters nil)) | ||
| 471 | (display (cdr (assq 'display filtered-cfg))) ;; post-filtering | 952 | (display (cdr (assq 'display filtered-cfg))) ;; post-filtering |
| 472 | alt-cfg frame) | 953 | alt-cfg frame) |
| 473 | 954 | ||
| @@ -502,14 +983,12 @@ For the meaning of FORCE-ONSCREEN, see `frameset-restore'." | |||
| 502 | ;; If a frame needs to be created and it falls partially or fully offscreen, | 983 | ;; If a frame needs to be created and it falls partially or fully offscreen, |
| 503 | ;; sometimes it gets "pushed back" onscreen; however, moving it afterwards is | 984 | ;; sometimes it gets "pushed back" onscreen; however, moving it afterwards is |
| 504 | ;; allowed. So we create the frame as invisible and then reapply the full | 985 | ;; allowed. So we create the frame as invisible and then reapply the full |
| 505 | ;; parameter list (including position and size parameters). | 986 | ;; parameter alist (including position and size parameters). |
| 506 | (setq frame (or (and frameset--reuse-list | 987 | (setq frame (or (and frameset--reuse-list |
| 507 | (frameset--reuse-frame display filtered-cfg)) | 988 | (frameset--reuse-frame display filtered-cfg)) |
| 508 | (make-frame-on-display display | 989 | (make-frame-on-display display |
| 509 | (cons '(visibility) | 990 | (cons '(visibility) |
| 510 | (cl-loop | 991 | (frameset--initial-params filtered-cfg))))) |
| 511 | for param in '(left top width height minibuffer) | ||
| 512 | collect (assq param filtered-cfg)))))) | ||
| 513 | (modify-frame-parameters frame | 992 | (modify-frame-parameters frame |
| 514 | (if (eq (frame-parameter frame 'fullscreen) fullscreen) | 993 | (if (eq (frame-parameter frame 'fullscreen) fullscreen) |
| 515 | ;; Workaround for bug#14949 | 994 | ;; Workaround for bug#14949 |
| @@ -521,76 +1000,102 @@ For the meaning of FORCE-ONSCREEN, see `frameset-restore'." | |||
| 521 | ;; FIXME: iconified frames should be checked too, | 1000 | ;; FIXME: iconified frames should be checked too, |
| 522 | ;; but it is impossible without deiconifying them. | 1001 | ;; but it is impossible without deiconifying them. |
| 523 | (not (eq (frame-parameter frame 'visibility) 'icon))) | 1002 | (not (eq (frame-parameter frame 'visibility) 'icon))) |
| 524 | (frameset--move-onscreen frame force-onscreen)) | 1003 | (frameset-move-onscreen frame force-onscreen)) |
| 525 | 1004 | ||
| 526 | ;; Let's give the finishing touches (visibility, tool-bar, maximization). | 1005 | ;; Let's give the finishing touches (visibility, tool-bar, maximization). |
| 527 | (when lines (push lines alt-cfg)) | 1006 | (when lines (push lines alt-cfg)) |
| 528 | (when alt-cfg (modify-frame-parameters frame alt-cfg)) | 1007 | (when alt-cfg (modify-frame-parameters frame alt-cfg)) |
| 529 | ;; Now restore window state. | 1008 | ;; Now restore window state. |
| 530 | (window-state-put window-cfg (frame-root-window frame) 'safe) | 1009 | (window-state-put window-state (frame-root-window frame) 'safe) |
| 531 | frame)) | 1010 | frame)) |
| 532 | 1011 | ||
| 533 | (defun frameset--sort-states (state1 state2) | 1012 | (defun frameset--minibufferless-last-p (state1 state2) |
| 534 | "Predicate to sort frame states in a suitable order to be created. | 1013 | "Predicate to sort frame states in an order suitable for creating frames. |
| 535 | It sorts minibuffer-owning frames before minibufferless ones." | 1014 | It sorts minibuffer-owning frames before minibufferless ones. |
| 1015 | Internal use only." | ||
| 536 | (pcase-let ((`(,hasmini1 ,id-def1) (assq 'frameset--mini (car state1))) | 1016 | (pcase-let ((`(,hasmini1 ,id-def1) (assq 'frameset--mini (car state1))) |
| 537 | (`(,hasmini2 ,id-def2) (assq 'frameset--mini (car state2)))) | 1017 | (`(,hasmini2 ,id-def2) (assq 'frameset--mini (car state2)))) |
| 538 | (cond ((eq id-def1 t) t) | 1018 | (cond ((eq id-def1 t) t) |
| 539 | ((eq id-def2 t) nil) | 1019 | ((eq id-def2 t) nil) |
| 540 | ((not (eq hasmini1 hasmini2)) (eq hasmini1 t)) | 1020 | ((not (eq hasmini1 hasmini2)) (eq hasmini1 t)) |
| 541 | ((eq hasmini1 nil) (string< id-def1 id-def2)) | 1021 | ((eq hasmini1 nil) (or id-def1 id-def2)) |
| 542 | (t t)))) | 1022 | (t t)))) |
| 543 | 1023 | ||
| 544 | (defun frameset-sort-frames-for-deletion (frame1 _frame2) | 1024 | (defun frameset-keep-original-display-p (force-display) |
| 545 | "Predicate to sort live frames for deletion. | 1025 | "True if saved frames' displays should be honored. |
| 546 | Minibufferless frames must go first to avoid errors when attempting | 1026 | For the meaning of FORCE-DISPLAY, see `frameset-restore'." |
| 547 | to delete a frame whose minibuffer window is used by another frame." | 1027 | (cond ((daemonp) t) |
| 1028 | ((eq system-type 'windows-nt) nil) ;; Does ns support more than one display? | ||
| 1029 | (t (not force-display)))) | ||
| 1030 | |||
| 1031 | (defun frameset-minibufferless-first-p (frame1 _frame2) | ||
| 1032 | "Predicate to sort minibufferless frames before other frames." | ||
| 548 | (not (frame-parameter frame1 'minibuffer))) | 1033 | (not (frame-parameter frame1 'minibuffer))) |
| 549 | 1034 | ||
| 550 | ;;;###autoload | 1035 | ;;;###autoload |
| 551 | (cl-defun frameset-restore (frameset &key filters reuse-frames force-display force-onscreen) | 1036 | (cl-defun frameset-restore (frameset |
| 1037 | &key predicate filters reuse-frames | ||
| 1038 | force-display force-onscreen) | ||
| 552 | "Restore a FRAMESET into the current display(s). | 1039 | "Restore a FRAMESET into the current display(s). |
| 553 | 1040 | ||
| 554 | FILTERS is an alist of parameter filters; defaults to `frameset-filter-alist'. | 1041 | PREDICATE is a function called with two arguments, the parameter alist |
| 1042 | and the window-state of the frame being restored, in that order (see | ||
| 1043 | the docstring of the `frameset' defstruct for additional details). | ||
| 1044 | If PREDICATE returns nil, the frame described by that parameter alist | ||
| 1045 | and window-state is not restored. | ||
| 555 | 1046 | ||
| 556 | REUSE-FRAMES describes how to reuse existing frames while restoring a frameset: | 1047 | FILTERS is an alist of parameter filters; if nil, the value of |
| 557 | t Reuse any existing frame if possible; delete leftover frames. | 1048 | `frameset-filter-alist' is used instead. |
| 558 | nil Restore frameset in new frames and delete existing frames. | 1049 | |
| 559 | keep Restore frameset in new frames and keep the existing ones. | 1050 | REUSE-FRAMES selects the policy to use to reuse frames when restoring: |
| 560 | LIST A list of frames to reuse; only these will be reused, if possible, | 1051 | t Reuse existing frames if possible, and delete those not reused. |
| 561 | and any leftover one will be deleted; other frames not on this | 1052 | nil Restore frameset in new frames and delete existing frames. |
| 562 | list will be kept. | 1053 | :keep Restore frameset in new frames and keep the existing ones. |
| 1054 | LIST A list of frames to reuse; only these are reused (if possible). | ||
| 1055 | Remaining frames in this list are deleted; other frames not | ||
| 1056 | included on the list are left untouched. | ||
| 563 | 1057 | ||
| 564 | FORCE-DISPLAY can be: | 1058 | FORCE-DISPLAY can be: |
| 565 | t Frames will be restored in the current display. | 1059 | t Frames are restored in the current display. |
| 566 | nil Frames will be restored, if possible, in their original displays. | 1060 | nil Frames are restored, if possible, in their original displays. |
| 567 | delete Frames in other displays will be deleted instead of restored. | 1061 | :delete Frames in other displays are deleted instead of restored. |
| 1062 | PRED A function called with two arguments, the parameter alist and | ||
| 1063 | the window state (in that order). It must return t, nil or | ||
| 1064 | `:delete', as above but affecting only the frame that will | ||
| 1065 | be created from that parameter alist. | ||
| 568 | 1066 | ||
| 569 | FORCE-ONSCREEN can be: | 1067 | FORCE-ONSCREEN can be: |
| 570 | all Force onscreen any frame fully or partially offscreen. | 1068 | t Force onscreen only those frames that are fully offscreen. |
| 571 | t Force onscreen only those frames that are fully offscreen. | 1069 | nil Do not force any frame back onscreen. |
| 572 | nil Do not force any frame back onscreen. | 1070 | :all Force onscreen any frame fully or partially offscreen. |
| 1071 | PRED A function called with three arguments, | ||
| 1072 | - the live frame just restored, | ||
| 1073 | - a list (LEFT TOP WIDTH HEIGHT), describing the frame, | ||
| 1074 | - a list (LEFT TOP WIDTH HEIGHT), describing the workarea. | ||
| 1075 | It must return non-nil to force the frame onscreen, nil otherwise. | ||
| 1076 | |||
| 1077 | Note the timing and scope of the operations described above: REUSE-FRAMES | ||
| 1078 | affects existing frames; PREDICATE, FILTERS and FORCE-DISPLAY affect the frame | ||
| 1079 | being restored before that happens; and FORCE-ONSCREEN affects the frame once | ||
| 1080 | it has been restored. | ||
| 573 | 1081 | ||
| 574 | All keywords default to nil." | 1082 | All keyword parameters default to nil." |
| 575 | 1083 | ||
| 576 | (cl-assert (frameset-p frameset)) | 1084 | (cl-assert (frameset-valid-p frameset)) |
| 577 | 1085 | ||
| 578 | (let* ((delete-saved (eq force-display 'delete)) | 1086 | (let (other-frames) |
| 579 | (forcing (not (frameset-keep-original-display-p force-display))) | ||
| 580 | (target (and forcing (cons 'display (frame-parameter nil 'display)))) | ||
| 581 | other-frames) | ||
| 582 | 1087 | ||
| 583 | ;; frameset--reuse-list is a list of frames potentially reusable. Later we | 1088 | ;; frameset--reuse-list is a list of frames potentially reusable. Later we |
| 584 | ;; will decide which ones can be reused, and how to deal with any leftover. | 1089 | ;; will decide which ones can be reused, and how to deal with any leftover. |
| 585 | (pcase reuse-frames | 1090 | (pcase reuse-frames |
| 586 | ((or `nil `keep) | 1091 | ((or `nil `:keep) |
| 587 | (setq frameset--reuse-list nil | 1092 | (setq frameset--reuse-list nil |
| 588 | other-frames (frame-list))) | 1093 | other-frames (frame-list))) |
| 589 | ((pred consp) | 1094 | ((pred consp) |
| 590 | (setq frameset--reuse-list (copy-sequence reuse-frames) | 1095 | (setq frameset--reuse-list (copy-sequence reuse-frames) |
| 591 | other-frames (cl-delete-if (lambda (frame) | 1096 | other-frames (cl-delete-if (lambda (frame) |
| 592 | (memq frame frameset--reuse-list)) | 1097 | (memq frame frameset--reuse-list)) |
| 593 | (frame-list)))) | 1098 | (frame-list)))) |
| 594 | (_ | 1099 | (_ |
| 595 | (setq frameset--reuse-list (frame-list) | 1100 | (setq frameset--reuse-list (frame-list) |
| 596 | other-frames nil))) | 1101 | other-frames nil))) |
| @@ -598,96 +1103,140 @@ All keywords default to nil." | |||
| 598 | ;; Sort saved states to guarantee that minibufferless frames will be created | 1103 | ;; Sort saved states to guarantee that minibufferless frames will be created |
| 599 | ;; after the frames that contain their minibuffer windows. | 1104 | ;; after the frames that contain their minibuffer windows. |
| 600 | (dolist (state (sort (copy-sequence (frameset-states frameset)) | 1105 | (dolist (state (sort (copy-sequence (frameset-states frameset)) |
| 601 | #'frameset--sort-states)) | 1106 | #'frameset--minibufferless-last-p)) |
| 602 | (condition-case-unless-debug err | 1107 | (pcase-let ((`(,frame-cfg . ,window-cfg) state)) |
| 603 | (pcase-let* ((`(,frame-cfg . ,window-cfg) state) | 1108 | (when (or (null predicate) (funcall predicate frame-cfg window-cfg)) |
| 604 | ((and d-mini `(,hasmini . ,mb-id)) | 1109 | (condition-case-unless-debug err |
| 605 | (cdr (assq 'frameset--mini frame-cfg))) | 1110 | (let* ((d-mini (cdr (assq 'frameset--mini frame-cfg))) |
| 606 | (default (and (booleanp mb-id) mb-id)) | 1111 | (mb-id (cdr d-mini)) |
| 607 | (frame nil) (to-tty nil)) | 1112 | (default (and (car d-mini) mb-id)) |
| 608 | ;; Only set target if forcing displays and the target display is different. | 1113 | (force-display (if (functionp force-display) |
| 609 | (if (or (not forcing) | 1114 | (funcall force-display frame-cfg window-cfg) |
| 610 | (equal target (or (assq 'display frame-cfg) '(display . nil)))) | 1115 | force-display)) |
| 611 | (setq frameset--target-display nil) | 1116 | frame to-tty) |
| 612 | (setq frameset--target-display target | 1117 | ;; Only set target if forcing displays and the target display is different. |
| 613 | to-tty (null (cdr target)))) | 1118 | (cond ((frameset-keep-original-display-p force-display) |
| 614 | ;; If keeping non-reusable frames, and the frame-id of one of them | 1119 | (setq frameset--target-display nil)) |
| 615 | ;; matches the frame-id of a frame being restored (because, for example, | 1120 | ((eq (frame-parameter nil 'display) (cdr (assq 'display frame-cfg))) |
| 616 | ;; the frameset has already been read in the same session), remove the | 1121 | (setq frameset--target-display nil)) |
| 617 | ;; frame-id from the non-reusable frame, which is not useful anymore. | 1122 | (t |
| 618 | (when (and other-frames | 1123 | (setq frameset--target-display (cons 'display |
| 619 | (or (eq reuse-frames 'keep) (consp reuse-frames))) | 1124 | (frame-parameter nil 'display)) |
| 620 | (let ((dup (cl-find (cdr (assq 'frameset-frame-id frame-cfg)) | 1125 | to-tty (null (cdr frameset--target-display))))) |
| 621 | other-frames | 1126 | ;; Time to restore frames and set up their minibuffers as they were. |
| 622 | :key (lambda (frame) | 1127 | ;; We only skip a frame (thus deleting it) if either: |
| 623 | (frame-parameter frame 'frameset-frame-id)) | 1128 | ;; - we're switching displays, and the user chose the option to delete, or |
| 624 | :test #'string=))) | 1129 | ;; - we're switching to tty, and the frame to restore is minibuffer-only. |
| 625 | (when dup | 1130 | (unless (and frameset--target-display |
| 626 | (set-frame-parameter dup 'frameset-frame-id nil)))) | 1131 | (or (eq force-display :delete) |
| 627 | ;; Time to restore frames and set up their minibuffers as they were. | 1132 | (and to-tty |
| 628 | ;; We only skip a frame (thus deleting it) if either: | 1133 | (eq (cdr (assq 'minibuffer frame-cfg)) 'only)))) |
| 629 | ;; - we're switching displays, and the user chose the option to delete, or | 1134 | ;; If keeping non-reusable frames, and the frameset--id of one of them |
| 630 | ;; - we're switching to tty, and the frame to restore is minibuffer-only. | 1135 | ;; matches the id of a frame being restored (because, for example, the |
| 631 | (unless (and frameset--target-display | 1136 | ;; frameset has already been read in the same session), remove the |
| 632 | (or delete-saved | 1137 | ;; frameset--id from the non-reusable frame, which is not useful anymore. |
| 633 | (and to-tty | 1138 | (when (and other-frames |
| 634 | (eq (cdr (assq 'minibuffer frame-cfg)) 'only)))) | 1139 | (or (eq reuse-frames :keep) (consp reuse-frames))) |
| 635 | 1140 | (let ((dup (frameset-frame-with-id (cdr (assq 'frameset--id frame-cfg)) | |
| 636 | ;; Restore minibuffers. Some of this stuff could be done in a filter | 1141 | other-frames))) |
| 637 | ;; function, but it would be messy because restoring minibuffers affects | 1142 | (when dup |
| 638 | ;; global state; it's best to do it here than add a bunch of global | 1143 | (set-frame-parameter dup 'frameset--id nil)))) |
| 639 | ;; variables to pass info back-and-forth to/from the filter function. | 1144 | ;; Restore minibuffers. Some of this stuff could be done in a filter |
| 640 | (cond | 1145 | ;; function, but it would be messy because restoring minibuffers affects |
| 641 | ((null d-mini)) ;; No frameset--mini. Process as normal frame. | 1146 | ;; global state; it's best to do it here than add a bunch of global |
| 642 | (to-tty) ;; Ignore minibuffer stuff and process as normal frame. | 1147 | ;; variables to pass info back-and-forth to/from the filter function. |
| 643 | (hasmini ;; Frame has minibuffer (or it is minibuffer-only). | 1148 | (cond |
| 644 | (when (eq (cdr (assq 'minibuffer frame-cfg)) 'only) | 1149 | ((null d-mini)) ;; No frameset--mini. Process as normal frame. |
| 645 | (setq frame-cfg (append '((tool-bar-lines . 0) (menu-bar-lines . 0)) | 1150 | (to-tty) ;; Ignore minibuffer stuff and process as normal frame. |
| 646 | frame-cfg)))) | 1151 | ((car d-mini) ;; Frame has minibuffer (or it is minibuffer-only). |
| 647 | (t ;; Frame depends on other frame's minibuffer window. | 1152 | (when (eq (cdr (assq 'minibuffer frame-cfg)) 'only) |
| 648 | (let* ((mb-frame (or (cl-find-if | 1153 | (setq frame-cfg (append '((tool-bar-lines . 0) (menu-bar-lines . 0)) |
| 649 | (lambda (f) | 1154 | frame-cfg)))) |
| 650 | (string= (frame-parameter f 'frameset-id) | 1155 | (t ;; Frame depends on other frame's minibuffer window. |
| 651 | mb-id)) | 1156 | (when mb-id |
| 652 | (frame-list)) | 1157 | (let ((mb-frame (frameset-frame-with-id mb-id)) |
| 653 | (error "Minibuffer frame %S not found" mb-id))) | 1158 | (mb-window nil)) |
| 654 | (mb-param (assq 'minibuffer frame-cfg)) | 1159 | (if (not mb-frame) |
| 655 | (mb-window (minibuffer-window mb-frame))) | 1160 | (delay-warning 'frameset |
| 656 | (unless (and (window-live-p mb-window) | 1161 | (format "Minibuffer frame %S not found" mb-id) |
| 657 | (window-minibuffer-p mb-window)) | 1162 | :warning) |
| 658 | (error "Not a minibuffer window %s" mb-window)) | 1163 | (setq mb-window (minibuffer-window mb-frame)) |
| 659 | (if mb-param | 1164 | (unless (and (window-live-p mb-window) |
| 660 | (setcdr mb-param mb-window) | 1165 | (window-minibuffer-p mb-window)) |
| 661 | (push (cons 'minibuffer mb-window) frame-cfg)))))) | 1166 | (delay-warning 'frameset |
| 662 | ;; OK, we're ready at last to create (or reuse) a frame and | 1167 | (format "Not a minibuffer window %s" mb-window) |
| 663 | ;; restore the window config. | 1168 | :warning) |
| 664 | (setq frame (frameset--get-frame frame-cfg window-cfg | 1169 | (setq mb-window nil))) |
| 665 | (or filters frameset-filter-alist) | 1170 | (when mb-window |
| 666 | force-onscreen)) | 1171 | (push (cons 'minibuffer mb-window) frame-cfg)))))) |
| 667 | ;; Set default-minibuffer if required. | 1172 | ;; OK, we're ready at last to create (or reuse) a frame and |
| 668 | (when default (setq default-minibuffer-frame frame))) | 1173 | ;; restore the window config. |
| 669 | (error | 1174 | (setq frame (frameset--restore-frame frame-cfg window-cfg |
| 670 | (delay-warning 'frameset (error-message-string err) :error)))) | 1175 | (or filters frameset-filter-alist) |
| 1176 | force-onscreen)) | ||
| 1177 | ;; Set default-minibuffer if required. | ||
| 1178 | (when default (setq default-minibuffer-frame frame)))) | ||
| 1179 | (error | ||
| 1180 | (delay-warning 'frameset (error-message-string err) :error)))))) | ||
| 671 | 1181 | ||
| 672 | ;; In case we try to delete the initial frame, we want to make sure that | 1182 | ;; In case we try to delete the initial frame, we want to make sure that |
| 673 | ;; other frames are already visible (discussed in thread for bug#14841). | 1183 | ;; other frames are already visible (discussed in thread for bug#14841). |
| 674 | (sit-for 0 t) | 1184 | (sit-for 0 t) |
| 675 | 1185 | ||
| 676 | ;; Delete remaining frames, but do not fail if some resist being deleted. | 1186 | ;; Delete remaining frames, but do not fail if some resist being deleted. |
| 677 | (unless (eq reuse-frames 'keep) | 1187 | (unless (eq reuse-frames :keep) |
| 678 | (dolist (frame (sort (nconc (if (listp reuse-frames) nil other-frames) | 1188 | (dolist (frame (sort (nconc (if (listp reuse-frames) nil other-frames) |
| 679 | frameset--reuse-list) | 1189 | frameset--reuse-list) |
| 680 | #'frameset-sort-frames-for-deletion)) | 1190 | ;; Minibufferless frames must go first to avoid |
| 1191 | ;; errors when attempting to delete a frame whose | ||
| 1192 | ;; minibuffer window is used by another frame. | ||
| 1193 | #'frameset-minibufferless-first-p)) | ||
| 681 | (condition-case err | 1194 | (condition-case err |
| 682 | (delete-frame frame) | 1195 | (delete-frame frame) |
| 683 | (error | 1196 | (error |
| 684 | (delay-warning 'frameset (error-message-string err)))))) | 1197 | (delay-warning 'frameset (error-message-string err)))))) |
| 685 | (setq frameset--reuse-list nil) | 1198 | (setq frameset--reuse-list nil |
| 1199 | frameset--target-display nil) | ||
| 686 | 1200 | ||
| 687 | ;; Make sure there's at least one visible frame. | 1201 | ;; Make sure there's at least one visible frame. |
| 688 | (unless (or (daemonp) (visible-frame-list)) | 1202 | (unless (or (daemonp) (visible-frame-list)) |
| 689 | (make-frame-visible (car (frame-list)))))) | 1203 | (make-frame-visible (car (frame-list)))))) |
| 690 | 1204 | ||
| 1205 | |||
| 1206 | ;; Register support | ||
| 1207 | |||
| 1208 | (defun frameset--jump-to-register (data) | ||
| 1209 | "Restore frameset from DATA stored in register. | ||
| 1210 | Called from `jump-to-register'. Internal use only." | ||
| 1211 | (let* ((delete (and current-prefix-arg t)) | ||
| 1212 | (iconify-list (if delete nil (frame-list)))) | ||
| 1213 | (frameset-restore (aref data 0) | ||
| 1214 | :filters frameset-session-filter-alist | ||
| 1215 | :reuse-frames (if delete t :keep)) | ||
| 1216 | (mapc #'iconify-frame iconify-list) | ||
| 1217 | (let ((frame (frameset-frame-with-id (aref data 1)))) | ||
| 1218 | (when frame | ||
| 1219 | (select-frame-set-input-focus frame) | ||
| 1220 | (goto-char (aref data 2)))))) | ||
| 1221 | |||
| 1222 | ;;;###autoload | ||
| 1223 | (defun frameset-to-register (register &optional _arg) | ||
| 1224 | "Store the current frameset in register REGISTER. | ||
| 1225 | Use \\[jump-to-register] to restore the frameset. | ||
| 1226 | Argument is a character, naming the register." | ||
| 1227 | (interactive "cFrameset to register: \nP") | ||
| 1228 | (set-register register | ||
| 1229 | (registerv-make | ||
| 1230 | (vector (frameset-save nil | ||
| 1231 | :app 'register | ||
| 1232 | :filters frameset-session-filter-alist) | ||
| 1233 | ;; frameset-save does not include the value of point | ||
| 1234 | ;; in the current buffer, so record that separately. | ||
| 1235 | (frameset-frame-id nil) | ||
| 1236 | (point-marker)) | ||
| 1237 | :print-func (lambda (_data) (princ "a frameset.")) | ||
| 1238 | :jump-func #'frameset--jump-to-register))) | ||
| 1239 | |||
| 691 | (provide 'frameset) | 1240 | (provide 'frameset) |
| 692 | 1241 | ||
| 693 | ;;; frameset.el ends here | 1242 | ;;; frameset.el ends here |
diff --git a/lisp/generic-x.el b/lisp/generic-x.el index 1867759b549..c964b53952e 100644 --- a/lisp/generic-x.el +++ b/lisp/generic-x.el | |||
| @@ -460,130 +460,7 @@ like an INI file. You can add this hook to `find-file-hook'." | |||
| 460 | 460 | ||
| 461 | ;;; DOS/Windows BAT files | 461 | ;;; DOS/Windows BAT files |
| 462 | (when (memq 'bat-generic-mode generic-extras-enable-list) | 462 | (when (memq 'bat-generic-mode generic-extras-enable-list) |
| 463 | 463 | (define-obsolete-function-alias 'bat-generic-mode 'bat-mode "24.4")) | |
| 464 | (define-generic-mode bat-generic-mode | ||
| 465 | nil | ||
| 466 | nil | ||
| 467 | (eval-when-compile | ||
| 468 | (list | ||
| 469 | ;; Make this one first in the list, otherwise comments will | ||
| 470 | ;; be over-written by other variables | ||
| 471 | '("^[@ \t]*\\([rR][eE][mM][^\n\r]*\\)" 1 font-lock-comment-face t) | ||
| 472 | '("^[ \t]*\\(::.*\\)" 1 font-lock-comment-face t) | ||
| 473 | '("^[@ \t]*\\([bB][rR][eE][aA][kK]\\|[vV][eE][rR][iI][fF][yY]\\)[ \t]+\\([oO]\\([nN]\\|[fF][fF]\\)\\)" | ||
| 474 | (1 font-lock-builtin-face) | ||
| 475 | (2 font-lock-constant-face t t)) | ||
| 476 | ;; Any text (except ON/OFF) following ECHO is a string. | ||
| 477 | '("^[@ \t]*\\([eE][cC][hH][oO]\\)[ \t]+\\(\\([oO]\\([nN]\\|[fF][fF]\\)\\)\\|\\([^>|\r\n]+\\)\\)" | ||
| 478 | (1 font-lock-builtin-face) | ||
| 479 | (3 font-lock-constant-face t t) | ||
| 480 | (5 font-lock-string-face t t)) | ||
| 481 | ;; These keywords appear as the first word on a line. (Actually, they | ||
| 482 | ;; can also appear after "if ..." or "for ..." clause, but since they | ||
| 483 | ;; are frequently used in simple text, we punt.) | ||
| 484 | ;; In `generic-bat-mode-setup-function' we make the keywords | ||
| 485 | ;; case-insensitive | ||
| 486 | '("^[@ \t]*\\_<\\(for\\|if\\)\\_>" 1 font-lock-keyword-face) | ||
| 487 | ;; These keywords can be anywhere on a line | ||
| 488 | ;; In `generic-bat-mode-setup-function' we make the keywords | ||
| 489 | ;; case-insensitive | ||
| 490 | (list (regexp-opt '("do" "exist" "errorlevel" "goto" "not") 'symbols) | ||
| 491 | 1 font-lock-keyword-face) | ||
| 492 | ;; These are built-in commands. Only frequently-used ones are listed. | ||
| 493 | (list (concat "[ \t|\n]" | ||
| 494 | (regexp-opt '("CALL" "call" "Call" | ||
| 495 | "CD" "cd" "Cd" | ||
| 496 | "CLS" "cls" "Cls" | ||
| 497 | "COPY" "copy" "Copy" | ||
| 498 | "DEL" "del" "Del" | ||
| 499 | "ECHO" "echo" "Echo" | ||
| 500 | "MD" "md" "Md" | ||
| 501 | "PATH" "path" "Path" | ||
| 502 | "PAUSE" "pause" "Pause" | ||
| 503 | "PROMPT" "prompt" "Prompt" | ||
| 504 | "RD" "rd" "Rd" | ||
| 505 | "REN" "ren" "Ren" | ||
| 506 | "SET" "set" "Set" | ||
| 507 | "START" "start" "Start" | ||
| 508 | "SHIFT" "shift" "Shift") 'symbols)) | ||
| 509 | 1 font-lock-builtin-face) | ||
| 510 | '("^[ \t]*\\(:\\sw+\\)" 1 font-lock-function-name-face t) | ||
| 511 | '("\\(%\\sw+%\\)" 1 font-lock-variable-name-face t) | ||
| 512 | '("\\(%[0-9]\\)" 1 font-lock-variable-name-face t) | ||
| 513 | '("[\t ]+\\([+-/][^\t\n\" ]+\\)" 1 font-lock-type-face) | ||
| 514 | '("[ \t\n|]\\<\\([gG][oO][tT][oO]\\)\\>[ \t]*\\(\\sw+\\)?" | ||
| 515 | (1 font-lock-keyword-face) | ||
| 516 | (2 font-lock-function-name-face nil t)) | ||
| 517 | '("[ \t\n|]\\<\\([sS][eE][tT]\\)\\>[ \t]*\\(\\sw+\\)?[ \t]*=?" | ||
| 518 | (1 font-lock-builtin-face) | ||
| 519 | (2 font-lock-variable-name-face t t)))) | ||
| 520 | '("\\.[bB][aA][tT]\\'" | ||
| 521 | "\\.[cC][mM][dD]\\'" | ||
| 522 | "\\`[cC][oO][nN][fF][iI][gG]\\." | ||
| 523 | "\\`[aA][uU][tT][oO][eE][xX][eE][cC]\\.") | ||
| 524 | '(generic-bat-mode-setup-function) | ||
| 525 | "Generic mode for MS-Windows batch files.") | ||
| 526 | |||
| 527 | (defvar bat-generic-mode-syntax-table nil | ||
| 528 | "Syntax table in use in `bat-generic-mode' buffers.") | ||
| 529 | |||
| 530 | (defvar bat-generic-mode-keymap (make-sparse-keymap) | ||
| 531 | "Keymap for `bat-generic-mode'.") | ||
| 532 | |||
| 533 | (defun bat-generic-mode-compile () | ||
| 534 | "Run the current BAT file in a compilation buffer." | ||
| 535 | (interactive) | ||
| 536 | (let ((compilation-buffer-name-function | ||
| 537 | (function | ||
| 538 | (lambda (_ign) | ||
| 539 | (concat "*" (buffer-file-name) "*"))))) | ||
| 540 | (compile | ||
| 541 | (concat (w32-shell-name) " -c " (buffer-file-name))))) | ||
| 542 | |||
| 543 | (declare-function comint-mode "comint" ()) | ||
| 544 | (declare-function comint-exec "comint" (buffer name command startfile switches)) | ||
| 545 | |||
| 546 | (defun bat-generic-mode-run-as-comint () | ||
| 547 | "Run the current BAT file in a comint buffer." | ||
| 548 | (interactive) | ||
| 549 | (require 'comint) | ||
| 550 | (let* ((file (buffer-file-name)) | ||
| 551 | (buf-name (concat "*" file "*"))) | ||
| 552 | (with-current-buffer (get-buffer-create buf-name) | ||
| 553 | (erase-buffer) | ||
| 554 | (comint-mode) | ||
| 555 | (comint-exec | ||
| 556 | buf-name | ||
| 557 | file | ||
| 558 | (w32-shell-name) | ||
| 559 | nil | ||
| 560 | (list "-c" file)) | ||
| 561 | (display-buffer buf-name)))) | ||
| 562 | |||
| 563 | (define-key bat-generic-mode-keymap "\C-c\C-c" 'bat-generic-mode-compile) | ||
| 564 | |||
| 565 | ;; Make underscores count as words | ||
| 566 | (unless bat-generic-mode-syntax-table | ||
| 567 | (setq bat-generic-mode-syntax-table (make-syntax-table)) | ||
| 568 | (modify-syntax-entry ?_ "w" bat-generic-mode-syntax-table)) | ||
| 569 | |||
| 570 | ;; bat-generic-mode doesn't use the comment functionality of | ||
| 571 | ;; define-generic-mode because it has a three-letter comment-string, | ||
| 572 | ;; so we do it here manually instead | ||
| 573 | (defun generic-bat-mode-setup-function () | ||
| 574 | (make-local-variable 'parse-sexp-ignore-comments) | ||
| 575 | (make-local-variable 'comment-start) | ||
| 576 | (make-local-variable 'comment-start-skip) | ||
| 577 | (make-local-variable 'comment-end) | ||
| 578 | (setq imenu-generic-expression '((nil "^:\\(\\sw+\\)" 1)) | ||
| 579 | parse-sexp-ignore-comments t | ||
| 580 | comment-end "" | ||
| 581 | comment-start "REM " | ||
| 582 | comment-start-skip "[Rr][Ee][Mm] *") | ||
| 583 | (set-syntax-table bat-generic-mode-syntax-table) | ||
| 584 | ;; Make keywords case-insensitive | ||
| 585 | (setq font-lock-defaults '(generic-font-lock-keywords nil t)) | ||
| 586 | (use-local-map bat-generic-mode-keymap))) | ||
| 587 | 464 | ||
| 588 | ;;; Mailagent | 465 | ;;; Mailagent |
| 589 | ;; Mailagent is a Unix mail filtering program. Anyone wanna do a | 466 | ;; Mailagent is a Unix mail filtering program. Anyone wanna do a |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 2164fd96b46..c75588536a4 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,54 @@ | |||
| 1 | 2013-08-28 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * mm-decode.el (mm-temp-files-delete): Fix file deletion logic. | ||
| 4 | |||
| 5 | 2013-08-19 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 6 | |||
| 7 | * mm-util.el (mm-coding-system-priorities): Exclude iso-2022-jp-2 and | ||
| 8 | shift_jis from the default value set for Japanese users. | ||
| 9 | |||
| 10 | 2013-08-13 Glenn Morris <rgm@gnu.org> | ||
| 11 | |||
| 12 | * gnus-icalendar.el (gnus-icalendar-org-capture-file): Fix type. | ||
| 13 | |||
| 14 | * gnus.el (gnus-valid-select-methods): Fix type. | ||
| 15 | |||
| 16 | * nnimap.el (nnimap-request-articles-find-limit): Fix type, version. | ||
| 17 | |||
| 18 | 2013-08-12 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 19 | |||
| 20 | * mm-decode.el (mm-display-external): Run a timer for the temp files | ||
| 21 | deletion after a viewer exits; add a deletion timer for the needsterm | ||
| 22 | case, too. | ||
| 23 | |||
| 24 | * mm-decode.el (mm-display-external): Try to delete temporary files by | ||
| 25 | using a 1-min. timer. | ||
| 26 | |||
| 27 | 2013-08-09 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 28 | |||
| 29 | * mm-decode.el (mm-temp-files-to-be-deleted, mm-temp-files-cache-file): | ||
| 30 | New internal variables. | ||
| 31 | (mm-temp-files-delete): New function; add it to gnus-exit-gnus-hook. | ||
| 32 | (mm-display-external): Use it to delete temporary files instead of | ||
| 33 | using timers. | ||
| 34 | |||
| 35 | 2013-08-06 Jan Tatarik <jan.tatarik@gmail.com> | ||
| 36 | |||
| 37 | * gnus-icalendar.el (gnus-icalendar-event-from-ical): Replace pcase | ||
| 38 | with cond for backwards compatability. | ||
| 39 | |||
| 40 | 2013-08-06 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 41 | |||
| 42 | * mm-decode.el (mm-display-external): Bind process-connection-type to | ||
| 43 | nil; don't delete a temp file immediately even if a viewer finishes, | ||
| 44 | since it may be a shell script, like xdg-open, that launches a real | ||
| 45 | viewer program belatedly. | ||
| 46 | |||
| 47 | 2013-08-05 Dave Abrahams <dave@boostpro.com> | ||
| 48 | |||
| 49 | * gnus-int.el (gnus-warp-to-article): Allow warping in all groups so | ||
| 50 | that we can create nndoc groups that excerpt other groups. | ||
| 51 | |||
| 1 | 2013-08-02 Lars Magne Ingebrigtsen <larsi@gnus.org> | 52 | 2013-08-02 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 53 | ||
| 3 | * gnus-delay.el (gnus-delay-article): Fix typo. | 54 | * gnus-delay.el (gnus-delay-article): Fix typo. |
diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el index 0286fd5dd89..a946a586033 100644 --- a/lisp/gnus/gnus-icalendar.el +++ b/lisp/gnus/gnus-icalendar.el | |||
| @@ -183,11 +183,11 @@ | |||
| 183 | :end (gnus-icalendar-event--decode-datefield event 'DTEND zone-map) | 183 | :end (gnus-icalendar-event--decode-datefield event 'DTEND zone-map) |
| 184 | :rsvp (string= (plist-get (cadr attendee) 'RSVP) | 184 | :rsvp (string= (plist-get (cadr attendee) 'RSVP) |
| 185 | "TRUE"))) | 185 | "TRUE"))) |
| 186 | (event-class (pcase method | 186 | (event-class (cond |
| 187 | ("REQUEST" 'gnus-icalendar-event-request) | 187 | ((string= method "REQUEST") 'gnus-icalendar-event-request) |
| 188 | ("CANCEL" 'gnus-icalendar-event-cancel) | 188 | ((string= method "CANCEL") 'gnus-icalendar-event-cancel) |
| 189 | ("REPLY" 'gnus-icalendar-event-reply) | 189 | ((string= method "REPLY") 'gnus-icalendar-event-reply) |
| 190 | (_ 'gnus-icalendar-event)))) | 190 | (t 'gnus-icalendar-event)))) |
| 191 | 191 | ||
| 192 | (labels ((map-property (prop) | 192 | (labels ((map-property (prop) |
| 193 | (let ((value (icalendar--get-event-property event prop))) | 193 | (let ((value (icalendar--get-event-property event prop))) |
| @@ -252,14 +252,15 @@ status will be retrieved from the first matching attendee record." | |||
| 252 | ;; NOTE: not all of the below fields are mandatory, | 252 | ;; NOTE: not all of the below fields are mandatory, |
| 253 | ;; but they are often present in other clients' | 253 | ;; but they are often present in other clients' |
| 254 | ;; replies. Can be helpful for debugging, too. | 254 | ;; replies. Can be helpful for debugging, too. |
| 255 | (new-line (pcase key | 255 | (new-line |
| 256 | ("ATTENDEE" (update-attendee-status line)) | 256 | (cond |
| 257 | ("SUMMARY" (update-summary line)) | 257 | ((string= key "ATTENDEE") (update-attendee-status line)) |
| 258 | ("DTSTAMP" (update-dtstamp)) | 258 | ((string= key "SUMMARY") (update-summary line)) |
| 259 | ((or "ORGANIZER" "DTSTART" "DTEND" | 259 | ((string= key "DTSTAMP") (update-dtstamp)) |
| 260 | "LOCATION" "DURATION" "SEQUENCE" | 260 | ((find key '("ORGANIZER" "DTSTART" "DTEND" |
| 261 | "RECURRENCE-ID" "UID") line) | 261 | "LOCATION" "DURATION" "SEQUENCE" |
| 262 | (_ nil)))) | 262 | "RECURRENCE-ID" "UID")) line) |
| 263 | (t nil)))) | ||
| 263 | (when new-line | 264 | (when new-line |
| 264 | (push new-line reply-event-lines)))))) | 265 | (push new-line reply-event-lines)))))) |
| 265 | 266 | ||
| @@ -322,7 +323,7 @@ on the IDENTITIES list." | |||
| 322 | 323 | ||
| 323 | (defcustom gnus-icalendar-org-capture-file nil | 324 | (defcustom gnus-icalendar-org-capture-file nil |
| 324 | "Target Org file for storing captured calendar events." | 325 | "Target Org file for storing captured calendar events." |
| 325 | :type 'file | 326 | :type '(choice (const nil) file) |
| 326 | :group 'gnus-icalendar-org) | 327 | :group 'gnus-icalendar-org) |
| 327 | 328 | ||
| 328 | (defcustom gnus-icalendar-org-capture-headline nil | 329 | (defcustom gnus-icalendar-org-capture-headline nil |
| @@ -405,7 +406,8 @@ Return nil for non-recurring EVENT." | |||
| 405 | 406 | ||
| 406 | (defun gnus-icalendar--deactivate-org-timestamp (ts) | 407 | (defun gnus-icalendar--deactivate-org-timestamp (ts) |
| 407 | (replace-regexp-in-string "[<>]" | 408 | (replace-regexp-in-string "[<>]" |
| 408 | (lambda (m) (pcase m ("<" "[") (">" "]"))) | 409 | (lambda (m) (cond ((string= m "<") "[") |
| 410 | ((string= m ">") "]"))) | ||
| 409 | ts)) | 411 | ts)) |
| 410 | 412 | ||
| 411 | (defun gnus-icalendar-find-org-event-file (event &optional org-file) | 413 | (defun gnus-icalendar-find-org-event-file (event &optional org-file) |
diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index 6aa874f0347..f0cf0daed01 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el | |||
| @@ -582,18 +582,18 @@ This is the string that Gnus uses to identify the group." | |||
| 582 | (gnus-group-method group))) | 582 | (gnus-group-method group))) |
| 583 | 583 | ||
| 584 | (defun gnus-warp-to-article () | 584 | (defun gnus-warp-to-article () |
| 585 | "Jump from an article in a virtual group to the article in its real group. | 585 | "Look up the current article in the group where it originated. |
| 586 | Does nothing in a real group." | 586 | This command only makes sense for groups shows articles gathered |
| 587 | from other groups -- for instance, search results and the like." | ||
| 587 | (interactive) | 588 | (interactive) |
| 588 | (when (gnus-virtual-group-p gnus-newsgroup-name) | 589 | (let ((gnus-command-method |
| 589 | (let ((gnus-command-method | 590 | (gnus-find-method-for-group gnus-newsgroup-name))) |
| 590 | (gnus-find-method-for-group gnus-newsgroup-name))) | 591 | (or |
| 591 | (or | 592 | (when (gnus-check-backend-function |
| 592 | (when (gnus-check-backend-function | 593 | 'warp-to-article (car gnus-command-method)) |
| 593 | 'warp-to-article (car gnus-command-method)) | 594 | (funcall (gnus-get-function gnus-command-method 'warp-to-article))) |
| 594 | (funcall (gnus-get-function gnus-command-method 'warp-to-article))) | 595 | (and (bound-and-true-p gnus-registry-enabled) |
| 595 | (and (bound-and-true-p gnus-registry-enabled) | 596 | (gnus-try-warping-via-registry))))) |
| 596 | (gnus-try-warping-via-registry)))))) | ||
| 597 | 597 | ||
| 598 | (defun gnus-request-head (article group) | 598 | (defun gnus-request-head (article group) |
| 599 | "Request the head of ARTICLE in GROUP." | 599 | "Request the head of ARTICLE in GROUP." |
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 409b1cc6255..266ee0fe7cb 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el | |||
| @@ -1649,6 +1649,7 @@ this variable. I think." | |||
| 1649 | (const post-mail)) | 1649 | (const post-mail)) |
| 1650 | (checklist :inline t :greedy t | 1650 | (checklist :inline t :greedy t |
| 1651 | (const :format "%v " address) | 1651 | (const :format "%v " address) |
| 1652 | (const global) | ||
| 1652 | (const :format "%v " prompt-address) | 1653 | (const :format "%v " prompt-address) |
| 1653 | (const :format "%v " physical-address) | 1654 | (const :format "%v " physical-address) |
| 1654 | (const virtual) | 1655 | (const virtual) |
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 7274708f014..28d930b55f7 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el | |||
| @@ -47,6 +47,7 @@ | |||
| 47 | (defvar gnus-current-window-configuration) | 47 | (defvar gnus-current-window-configuration) |
| 48 | 48 | ||
| 49 | (add-hook 'gnus-exit-gnus-hook 'mm-destroy-postponed-undisplay-list) | 49 | (add-hook 'gnus-exit-gnus-hook 'mm-destroy-postponed-undisplay-list) |
| 50 | (add-hook 'gnus-exit-gnus-hook 'mm-temp-files-delete) | ||
| 50 | 51 | ||
| 51 | (defgroup mime-display () | 52 | (defgroup mime-display () |
| 52 | "Display of MIME in mail and news articles." | 53 | "Display of MIME in mail and news articles." |
| @@ -470,6 +471,11 @@ If not set, `default-directory' will be used." | |||
| 470 | (defvar mm-content-id-alist nil) | 471 | (defvar mm-content-id-alist nil) |
| 471 | (defvar mm-postponed-undisplay-list nil) | 472 | (defvar mm-postponed-undisplay-list nil) |
| 472 | (defvar mm-inhibit-auto-detect-attachment nil) | 473 | (defvar mm-inhibit-auto-detect-attachment nil) |
| 474 | (defvar mm-temp-files-to-be-deleted nil | ||
| 475 | "List of temporary files scheduled to be deleted.") | ||
| 476 | (defvar mm-temp-files-cache-file (concat ".mm-temp-files-" (user-login-name)) | ||
| 477 | "Name of a file that caches a list of temporary files to be deleted. | ||
| 478 | The file will be saved in the directory `mm-tmp-directory'.") | ||
| 473 | 479 | ||
| 474 | ;; According to RFC2046, in particular, in a digest, the default | 480 | ;; According to RFC2046, in particular, in a digest, the default |
| 475 | ;; Content-Type value for a body part is changed from "text/plain" to | 481 | ;; Content-Type value for a body part is changed from "text/plain" to |
| @@ -586,6 +592,46 @@ Postpone undisplaying of viewers for types in | |||
| 586 | (message "Destroying external MIME viewers") | 592 | (message "Destroying external MIME viewers") |
| 587 | (mm-destroy-parts mm-postponed-undisplay-list))) | 593 | (mm-destroy-parts mm-postponed-undisplay-list))) |
| 588 | 594 | ||
| 595 | (defun mm-temp-files-delete () | ||
| 596 | "Delete temporary files and those parent directories. | ||
| 597 | Note that the deletion may fail if a program is catching hold of a file | ||
| 598 | under Windows or Cygwin. In that case, it schedules the deletion of | ||
| 599 | files left at the next time." | ||
| 600 | (let* ((coding-system-for-read mm-universal-coding-system) | ||
| 601 | (coding-system-for-write mm-universal-coding-system) | ||
| 602 | (cache-file (expand-file-name mm-temp-files-cache-file | ||
| 603 | mm-tmp-directory)) | ||
| 604 | (cache (when (file-exists-p cache-file) | ||
| 605 | (mm-with-multibyte-buffer | ||
| 606 | (insert-file-contents cache-file) | ||
| 607 | (split-string (buffer-string) "\n" t)))) | ||
| 608 | fails) | ||
| 609 | (dolist (temp (append cache mm-temp-files-to-be-deleted)) | ||
| 610 | (when (and (file-exists-p temp) | ||
| 611 | (if (file-directory-p temp) | ||
| 612 | ;; A parent directory left at the previous time. | ||
| 613 | (progn | ||
| 614 | (ignore-errors (delete-directory temp)) | ||
| 615 | (file-exists-p temp)) | ||
| 616 | ;; Delete a temporary file and its parent directory. | ||
| 617 | (ignore-errors (delete-file temp)) | ||
| 618 | (or (file-exists-p temp) | ||
| 619 | (progn | ||
| 620 | (setq temp (file-name-directory temp)) | ||
| 621 | (ignore-errors (delete-directory temp)) | ||
| 622 | (file-exists-p temp))))) | ||
| 623 | (push temp fails))) | ||
| 624 | (if fails | ||
| 625 | ;; Schedule the deletion of the files left at the next time. | ||
| 626 | (progn | ||
| 627 | (write-region (concat (mapconcat 'identity (nreverse fails) "\n") | ||
| 628 | "\n") | ||
| 629 | nil cache-file nil 'silent) | ||
| 630 | (set-file-modes cache-file #o600)) | ||
| 631 | (when (file-exists-p cache-file) | ||
| 632 | (ignore-errors (delete-file cache-file)))) | ||
| 633 | (setq mm-temp-files-to-be-deleted nil))) | ||
| 634 | |||
| 589 | (autoload 'message-fetch-field "message") | 635 | (autoload 'message-fetch-field "message") |
| 590 | 636 | ||
| 591 | (defun mm-dissect-buffer (&optional no-strict-mime loose-mime from) | 637 | (defun mm-dissect-buffer (&optional no-strict-mime loose-mime from) |
| @@ -908,10 +954,20 @@ external if displayed external." | |||
| 908 | method file (mm-handle-type handle)))) | 954 | method file (mm-handle-type handle)))) |
| 909 | (unwind-protect | 955 | (unwind-protect |
| 910 | (if window-system | 956 | (if window-system |
| 911 | (start-process "*display*" nil | 957 | (set-process-sentinel |
| 912 | mm-external-terminal-program | 958 | (start-process "*display*" nil |
| 913 | "-e" shell-file-name | 959 | mm-external-terminal-program |
| 914 | shell-command-switch command) | 960 | "-e" shell-file-name |
| 961 | shell-command-switch command) | ||
| 962 | `(lambda (process state) | ||
| 963 | (if (eq 'exit (process-status process)) | ||
| 964 | (run-at-time | ||
| 965 | 60.0 nil | ||
| 966 | (lambda () | ||
| 967 | (ignore-errors (delete-file ,file)) | ||
| 968 | (ignore-errors (delete-directory | ||
| 969 | ,(file-name-directory | ||
| 970 | file)))))))) | ||
| 915 | (require 'term) | 971 | (require 'term) |
| 916 | (require 'gnus-win) | 972 | (require 'gnus-win) |
| 917 | (set-buffer | 973 | (set-buffer |
| @@ -925,11 +981,15 @@ external if displayed external." | |||
| 925 | (set-process-sentinel | 981 | (set-process-sentinel |
| 926 | (get-buffer-process buffer) | 982 | (get-buffer-process buffer) |
| 927 | `(lambda (process state) | 983 | `(lambda (process state) |
| 928 | (if (eq 'exit (process-status process)) | 984 | (when (eq 'exit (process-status process)) |
| 929 | (gnus-configure-windows | 985 | (ignore-errors (delete-file ,file)) |
| 930 | ',gnus-current-window-configuration)))) | 986 | (ignore-errors |
| 987 | (delete-directory ,(file-name-directory file))) | ||
| 988 | (gnus-configure-windows | ||
| 989 | ',gnus-current-window-configuration)))) | ||
| 931 | (gnus-configure-windows 'display-term)) | 990 | (gnus-configure-windows 'display-term)) |
| 932 | (mm-handle-set-external-undisplayer handle (cons file buffer))) | 991 | (mm-handle-set-external-undisplayer handle (cons file buffer)) |
| 992 | (add-to-list 'mm-temp-files-to-be-deleted file t)) | ||
| 933 | (message "Displaying %s..." command)) | 993 | (message "Displaying %s..." command)) |
| 934 | 'external) | 994 | 'external) |
| 935 | (copiousoutput | 995 | (copiousoutput |
| @@ -962,7 +1022,7 @@ external if displayed external." | |||
| 962 | (let ((command (mm-mailcap-command | 1022 | (let ((command (mm-mailcap-command |
| 963 | method file (mm-handle-type handle)))) | 1023 | method file (mm-handle-type handle)))) |
| 964 | (unwind-protect | 1024 | (unwind-protect |
| 965 | (progn | 1025 | (let ((process-connection-type nil)) |
| 966 | (start-process "*display*" | 1026 | (start-process "*display*" |
| 967 | (setq buffer | 1027 | (setq buffer |
| 968 | (generate-new-buffer " *mm*")) | 1028 | (generate-new-buffer " *mm*")) |
| @@ -975,21 +1035,14 @@ external if displayed external." | |||
| 975 | (buffer buffer) | 1035 | (buffer buffer) |
| 976 | (command command) | 1036 | (command command) |
| 977 | (handle handle)) | 1037 | (handle handle)) |
| 978 | (run-at-time | ||
| 979 | 30.0 nil | ||
| 980 | (lambda () | ||
| 981 | (ignore-errors | ||
| 982 | (delete-file file)) | ||
| 983 | (ignore-errors | ||
| 984 | (delete-directory (file-name-directory file))))) | ||
| 985 | (lambda (process state) | 1038 | (lambda (process state) |
| 986 | (when (eq (process-status process) 'exit) | 1039 | (when (eq (process-status process) 'exit) |
| 987 | (condition-case nil | 1040 | (run-at-time |
| 988 | (delete-file file) | 1041 | 60.0 nil |
| 989 | (error)) | 1042 | (lambda () |
| 990 | (condition-case nil | 1043 | (ignore-errors (delete-file file)) |
| 991 | (delete-directory (file-name-directory file)) | 1044 | (ignore-errors (delete-directory |
| 992 | (error)) | 1045 | (file-name-directory file))))) |
| 993 | (when (buffer-live-p outbuf) | 1046 | (when (buffer-live-p outbuf) |
| 994 | (with-current-buffer outbuf | 1047 | (with-current-buffer outbuf |
| 995 | (let ((buffer-read-only nil) | 1048 | (let ((buffer-read-only nil) |
| @@ -1006,7 +1059,8 @@ external if displayed external." | |||
| 1006 | (kill-buffer buffer))) | 1059 | (kill-buffer buffer))) |
| 1007 | (message "Displaying %s...done" command))))) | 1060 | (message "Displaying %s...done" command))))) |
| 1008 | (mm-handle-set-external-undisplayer | 1061 | (mm-handle-set-external-undisplayer |
| 1009 | handle (cons file buffer))) | 1062 | handle (cons file buffer)) |
| 1063 | (add-to-list 'mm-temp-files-to-be-deleted file t)) | ||
| 1010 | (message "Displaying %s..." command)) | 1064 | (message "Displaying %s..." command)) |
| 1011 | 'external))))))) | 1065 | 'external))))))) |
| 1012 | 1066 | ||
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index 209c2949ea9..9c2f0df5f59 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el | |||
| @@ -845,17 +845,17 @@ Valid elements include: | |||
| 845 | (not lang) nil) | 845 | (not lang) nil) |
| 846 | ;; In XEmacs 21.5 it may be the one like "Japanese (UTF-8)". | 846 | ;; In XEmacs 21.5 it may be the one like "Japanese (UTF-8)". |
| 847 | ((string-match "\\`Japanese" lang) | 847 | ((string-match "\\`Japanese" lang) |
| 848 | ;; Japanese users prefer iso-2022-jp to euc-japan or | 848 | ;; Japanese users prefer iso-2022-jp to others usually used |
| 849 | ;; shift_jis, however iso-8859-1 should be used when | 849 | ;; for `buffer-file-coding-system', however iso-8859-1 should |
| 850 | ;; there are only ASCII text and Latin-1 characters. | 850 | ;; be used when there are only ASCII and Latin-1 characters. |
| 851 | '(iso-8859-1 iso-2022-jp iso-2022-jp-2 shift_jis utf-8)))) | 851 | '(iso-8859-1 iso-2022-jp utf-8)))) |
| 852 | "Preferred coding systems for encoding outgoing messages. | 852 | "Preferred coding systems for encoding outgoing messages. |
| 853 | 853 | ||
| 854 | More than one suitable coding system may be found for some text. | 854 | More than one suitable coding system may be found for some text. |
| 855 | By default, the coding system with the highest priority is used | 855 | By default, the coding system with the highest priority is used |
| 856 | to encode outgoing messages (see `sort-coding-systems'). If this | 856 | to encode outgoing messages (see `sort-coding-systems'). If this |
| 857 | variable is set, it overrides the default priority." | 857 | variable is set, it overrides the default priority." |
| 858 | :version "21.2" | 858 | :version "24.4" |
| 859 | :type '(repeat (symbol :tag "Coding system")) | 859 | :type '(repeat (symbol :tag "Coding system")) |
| 860 | :group 'mime) | 860 | :group 'mime) |
| 861 | 861 | ||
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 4d9320b995f..f8c2b24cc9f 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el | |||
| @@ -130,8 +130,8 @@ textual parts.") | |||
| 130 | 130 | ||
| 131 | (defcustom nnimap-request-articles-find-limit nil | 131 | (defcustom nnimap-request-articles-find-limit nil |
| 132 | "Limit the number of articles to look for after moving an article." | 132 | "Limit the number of articles to look for after moving an article." |
| 133 | :type 'integer | 133 | :type '(choice (const nil) integer) |
| 134 | :version "24.3" | 134 | :version "24.4" |
| 135 | :group 'nnimap) | 135 | :group 'nnimap) |
| 136 | 136 | ||
| 137 | (defvar nnimap-process nil) | 137 | (defvar nnimap-process nil) |
diff --git a/lisp/help-macro.el b/lisp/help-macro.el index 566f1597596..f0fda357705 100644 --- a/lisp/help-macro.el +++ b/lisp/help-macro.el | |||
| @@ -136,9 +136,9 @@ and then returns." | |||
| 136 | (setq config (current-window-configuration)) | 136 | (setq config (current-window-configuration)) |
| 137 | (pop-to-buffer " *Metahelp*" nil t) | 137 | (pop-to-buffer " *Metahelp*" nil t) |
| 138 | (and (fboundp 'make-frame) | 138 | (and (fboundp 'make-frame) |
| 139 | (not (eq (window-frame (selected-window)) | 139 | (not (eq (window-frame) |
| 140 | prev-frame)) | 140 | prev-frame)) |
| 141 | (setq new-frame (window-frame (selected-window)) | 141 | (setq new-frame (window-frame) |
| 142 | config nil)) | 142 | config nil)) |
| 143 | (setq buffer-read-only nil) | 143 | (setq buffer-read-only nil) |
| 144 | (let ((inhibit-read-only t)) | 144 | (let ((inhibit-read-only t)) |
diff --git a/lisp/help-mode.el b/lisp/help-mode.el index b56adc2a4a9..5553556e03c 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el | |||
| @@ -268,7 +268,7 @@ The format is (FUNCTION ARGS...).") | |||
| 268 | 268 | ||
| 269 | (define-button-type 'help-dir-local-var-def | 269 | (define-button-type 'help-dir-local-var-def |
| 270 | :supertype 'help-xref | 270 | :supertype 'help-xref |
| 271 | 'help-function (lambda (var &optional file) | 271 | 'help-function (lambda (_var &optional file) |
| 272 | ;; FIXME: this should go to the point where the | 272 | ;; FIXME: this should go to the point where the |
| 273 | ;; local variable was defined. | 273 | ;; local variable was defined. |
| 274 | (find-file file)) | 274 | (find-file file)) |
| @@ -541,7 +541,7 @@ that." | |||
| 541 | (while | 541 | (while |
| 542 | (and (not (eobp)) | 542 | (and (not (eobp)) |
| 543 | ;; Stop at a pair of blank lines. | 543 | ;; Stop at a pair of blank lines. |
| 544 | (not (looking-at "\n\\s-*\n"))) | 544 | (not (looking-at-p "\n\\s-*\n"))) |
| 545 | ;; Skip a single blank line. | 545 | ;; Skip a single blank line. |
| 546 | (and (eolp) (forward-line)) | 546 | (and (eolp) (forward-line)) |
| 547 | (end-of-line) | 547 | (end-of-line) |
| @@ -605,26 +605,25 @@ See `help-make-xrefs'." | |||
| 605 | (save-restriction | 605 | (save-restriction |
| 606 | (narrow-to-region from to) | 606 | (narrow-to-region from to) |
| 607 | (goto-char (point-min)) | 607 | (goto-char (point-min)) |
| 608 | (condition-case nil | 608 | (ignore-errors |
| 609 | (while (not (eobp)) | 609 | (while (not (eobp)) |
| 610 | (cond | 610 | (cond |
| 611 | ((looking-at "\"") (forward-sexp 1)) | 611 | ((looking-at-p "\"") (forward-sexp 1)) |
| 612 | ((looking-at "#<") (search-forward ">" nil 'move)) | 612 | ((looking-at-p "#<") (search-forward ">" nil 'move)) |
| 613 | ((looking-at "\\(\\(\\sw\\|\\s_\\)+\\)") | 613 | ((looking-at "\\(\\(\\sw\\|\\s_\\)+\\)") |
| 614 | (let* ((sym (intern-soft (match-string 1))) | 614 | (let* ((sym (intern-soft (match-string 1))) |
| 615 | (type (cond ((fboundp sym) 'help-function) | 615 | (type (cond ((fboundp sym) 'help-function) |
| 616 | ((or (memq sym '(t nil)) | 616 | ((or (memq sym '(t nil)) |
| 617 | (keywordp sym)) | 617 | (keywordp sym)) |
| 618 | nil) | 618 | nil) |
| 619 | ((and sym | 619 | ((and sym |
| 620 | (or (boundp sym) | 620 | (or (boundp sym) |
| 621 | (get sym | 621 | (get sym |
| 622 | 'variable-documentation))) | 622 | 'variable-documentation))) |
| 623 | 'help-variable)))) | 623 | 'help-variable)))) |
| 624 | (when type (help-xref-button 1 type sym))) | 624 | (when type (help-xref-button 1 type sym))) |
| 625 | (goto-char (match-end 1))) | 625 | (goto-char (match-end 1))) |
| 626 | (t (forward-char 1)))) | 626 | (t (forward-char 1)))))))))) |
| 627 | (error nil))))))) | ||
| 628 | 627 | ||
| 629 | 628 | ||
| 630 | ;; Additional functions for (re-)creating types of help buffers. | 629 | ;; Additional functions for (re-)creating types of help buffers. |
diff --git a/lisp/help.el b/lisp/help.el index 25bc9c4b7c6..4ec0b99a593 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -1018,27 +1018,26 @@ smaller than `window-min-height'. Do nothing if WINDOW is not | |||
| 1018 | vertically combined, some of its contents are scrolled out of | 1018 | vertically combined, some of its contents are scrolled out of |
| 1019 | view, or WINDOW was not created by `display-buffer'." | 1019 | view, or WINDOW was not created by `display-buffer'." |
| 1020 | (setq window (window-normalize-window window t)) | 1020 | (setq window (window-normalize-window window t)) |
| 1021 | (let ((buffer-name (buffer-name (window-buffer window)))) | 1021 | (let ((height (if (functionp temp-buffer-max-height) |
| 1022 | (let ((height (if (functionp temp-buffer-max-height) | 1022 | (with-selected-window window |
| 1023 | (with-selected-window window | 1023 | (funcall temp-buffer-max-height (window-buffer))) |
| 1024 | (funcall temp-buffer-max-height (window-buffer))) | 1024 | temp-buffer-max-height)) |
| 1025 | temp-buffer-max-height)) | 1025 | (quit-cadr (cadr (window-parameter window 'quit-restore)))) |
| 1026 | (quit-cadr (cadr (window-parameter window 'quit-restore)))) | 1026 | (cond |
| 1027 | (cond | 1027 | ;; Resize WINDOW iff it was split off by `display-buffer'. |
| 1028 | ;; Resize WINDOW iff it was split off by `display-buffer'. | 1028 | ((and (eq quit-cadr 'window) |
| 1029 | ((and (eq quit-cadr 'window) | 1029 | (pos-visible-in-window-p (point-min) window) |
| 1030 | (pos-visible-in-window-p (point-min) window) | 1030 | (window-combined-p window)) |
| 1031 | (window-combined-p window)) | 1031 | (fit-window-to-buffer window height)) |
| 1032 | (fit-window-to-buffer window height)) | 1032 | ;; Resize FRAME iff it was created by `display-buffer'. |
| 1033 | ;; Resize FRAME iff it was created by `display-buffer'. | 1033 | ((and fit-frame-to-buffer |
| 1034 | ((and fit-frame-to-buffer | 1034 | (eq quit-cadr 'frame) |
| 1035 | (eq quit-cadr 'frame) | 1035 | (eq window (frame-root-window window))) |
| 1036 | (eq window (frame-root-window window))) | 1036 | (let ((frame (window-frame window))) |
| 1037 | (let ((frame (window-frame window))) | 1037 | (fit-frame-to-buffer |
| 1038 | (fit-frame-to-buffer | 1038 | frame (+ (frame-height frame) |
| 1039 | frame (+ (frame-height frame) | 1039 | (- (window-total-size window)) |
| 1040 | (- (window-total-size window)) | 1040 | height))))))) |
| 1041 | height)))))))) | ||
| 1042 | 1041 | ||
| 1043 | ;;; Help windows. | 1042 | ;;; Help windows. |
| 1044 | (defcustom help-window-select 'other | 1043 | (defcustom help-window-select 'other |
diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el index 17b91245d60..1da3d68e131 100644 --- a/lisp/hilit-chg.el +++ b/lisp/hilit-chg.el | |||
| @@ -860,7 +860,7 @@ changes are made, so \\[highlight-changes-next-change] and | |||
| 860 | (get-buffer (read-buffer "buffer-a " (current-buffer) t)) | 860 | (get-buffer (read-buffer "buffer-a " (current-buffer) t)) |
| 861 | (get-buffer | 861 | (get-buffer |
| 862 | (read-buffer "buffer-b " | 862 | (read-buffer "buffer-b " |
| 863 | (window-buffer (next-window (selected-window))) t)))) | 863 | (window-buffer (next-window)) t)))) |
| 864 | (let ((file-a (buffer-file-name buf-a)) | 864 | (let ((file-a (buffer-file-name buf-a)) |
| 865 | (file-b (buffer-file-name buf-b))) | 865 | (file-b (buffer-file-name buf-b))) |
| 866 | (highlight-markup-buffers buf-a file-a buf-b file-b) | 866 | (highlight-markup-buffers buf-a file-a buf-b file-b) |
diff --git a/lisp/hippie-exp.el b/lisp/hippie-exp.el index 7d14d780e2e..ad233b2a507 100644 --- a/lisp/hippie-exp.el +++ b/lisp/hippie-exp.el | |||
| @@ -296,7 +296,7 @@ undoes the expansion." | |||
| 296 | (message "No further expansions found")) | 296 | (message "No further expansions found")) |
| 297 | (ding)) | 297 | (ding)) |
| 298 | (if (and hippie-expand-verbose | 298 | (if (and hippie-expand-verbose |
| 299 | (not (window-minibuffer-p (selected-window)))) | 299 | (not (window-minibuffer-p))) |
| 300 | (message "Using %s" | 300 | (message "Using %s" |
| 301 | (nth he-num hippie-expand-try-functions-list))))) | 301 | (nth he-num hippie-expand-try-functions-list))))) |
| 302 | (if (and (>= he-num 0) | 302 | (if (and (>= he-num 0) |
| @@ -305,7 +305,7 @@ undoes the expansion." | |||
| 305 | (setq he-num -1) | 305 | (setq he-num -1) |
| 306 | (he-reset-string) | 306 | (he-reset-string) |
| 307 | (if (and hippie-expand-verbose | 307 | (if (and hippie-expand-verbose |
| 308 | (not (window-minibuffer-p (selected-window)))) | 308 | (not (window-minibuffer-p))) |
| 309 | (message "Undoing expansions")))))) | 309 | (message "Undoing expansions")))))) |
| 310 | 310 | ||
| 311 | ;; Initializes the region to expand (to between BEG and END). | 311 | ;; Initializes the region to expand (to between BEG and END). |
| @@ -978,7 +978,7 @@ The argument OLD has to be nil the first call of this function, and t | |||
| 978 | for subsequent calls (for further possible expansions of the same | 978 | for subsequent calls (for further possible expansions of the same |
| 979 | string). It returns t if a new expansion is found, nil otherwise." | 979 | string). It returns t if a new expansion is found, nil otherwise." |
| 980 | (let ((expansion ()) | 980 | (let ((expansion ()) |
| 981 | (flag (if (frame-visible-p (window-frame (selected-window))) | 981 | (flag (if (frame-visible-p (window-frame)) |
| 982 | 'visible t))) | 982 | 'visible t))) |
| 983 | (unless old | 983 | (unless old |
| 984 | (he-init-string (he-dabbrev-beg) (point)) | 984 | (he-init-string (he-dabbrev-beg) (point)) |
diff --git a/lisp/hl-line.el b/lisp/hl-line.el index 1ed17b4cd8e..e2171a27f5c 100644 --- a/lisp/hl-line.el +++ b/lisp/hl-line.el | |||
| @@ -198,7 +198,7 @@ Global-Hl-Line mode uses the functions `global-hl-line-unhighlight' and | |||
| 198 | (defun global-hl-line-highlight () | 198 | (defun global-hl-line-highlight () |
| 199 | "Highlight the current line in the current window." | 199 | "Highlight the current line in the current window." |
| 200 | (when global-hl-line-mode ; Might be changed outside the mode function. | 200 | (when global-hl-line-mode ; Might be changed outside the mode function. |
| 201 | (unless (window-minibuffer-p (selected-window)) | 201 | (unless (window-minibuffer-p) |
| 202 | (unless global-hl-line-overlay | 202 | (unless global-hl-line-overlay |
| 203 | (setq global-hl-line-overlay (make-overlay 1 1)) ; to be moved | 203 | (setq global-hl-line-overlay (make-overlay 1 1)) ; to be moved |
| 204 | (overlay-put global-hl-line-overlay 'face hl-line-face)) | 204 | (overlay-put global-hl-line-overlay 'face hl-line-face)) |
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 09d7c143346..ce29505d6f2 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el | |||
| @@ -53,6 +53,8 @@ | |||
| 53 | (defvar ibuffer-tmp-hide-regexps) | 53 | (defvar ibuffer-tmp-hide-regexps) |
| 54 | (defvar ibuffer-tmp-show-regexps) | 54 | (defvar ibuffer-tmp-show-regexps) |
| 55 | 55 | ||
| 56 | (declare-function ibuffer-ext-visible-p "ibuf-ext" | ||
| 57 | (buf all &optional ibuffer-buf)) | ||
| 56 | (declare-function ibuffer-mark-on-buffer "ibuf-ext" | 58 | (declare-function ibuffer-mark-on-buffer "ibuf-ext" |
| 57 | (func &optional ibuffer-mark-on-buffer-mark group)) | 59 | (func &optional ibuffer-mark-on-buffer-mark group)) |
| 58 | (declare-function ibuffer-generate-filter-groups "ibuf-ext" | 60 | (declare-function ibuffer-generate-filter-groups "ibuf-ext" |
| @@ -1198,7 +1200,7 @@ a new window in the current frame, splitting vertically." | |||
| 1198 | (and (stringp (cadr err)) | 1200 | (and (stringp (cadr err)) |
| 1199 | ;; This definitely falls in the | 1201 | ;; This definitely falls in the |
| 1200 | ;; ghetto hack category... | 1202 | ;; ghetto hack category... |
| 1201 | (not (string-match "too small" (cadr err))))) | 1203 | (not (string-match-p "too small" (cadr err))))) |
| 1202 | (signal (car err) (cdr err)) | 1204 | (signal (car err) (cdr err)) |
| 1203 | (enlarge-window 3)))))) | 1205 | (enlarge-window 3)))))) |
| 1204 | (select-window (next-window)) | 1206 | (select-window (next-window)) |
diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 73049df097d..104e3363831 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el | |||
| @@ -221,7 +221,7 @@ Conditions are: | |||
| 221 | indicate some non-standard, non-simple completion mechanism, | 221 | indicate some non-standard, non-simple completion mechanism, |
| 222 | like file-name and other custom-func completions)." | 222 | like file-name and other custom-func completions)." |
| 223 | 223 | ||
| 224 | (and (window-minibuffer-p (selected-window)) | 224 | (and (window-minibuffer-p) |
| 225 | (not executing-kbd-macro) | 225 | (not executing-kbd-macro) |
| 226 | minibuffer-completion-table | 226 | minibuffer-completion-table |
| 227 | (or (not (functionp minibuffer-completion-table)) | 227 | (or (not (functionp minibuffer-completion-table)) |
diff --git a/lisp/ido.el b/lisp/ido.el index d3c0e0f09f7..39ad3137bc9 100644 --- a/lisp/ido.el +++ b/lisp/ido.el | |||
| @@ -523,8 +523,8 @@ window with completion alternatives, or `ido-next-match' or | |||
| 523 | 523 | ||
| 524 | 524 | ||
| 525 | (defcustom ido-record-commands t | 525 | (defcustom ido-record-commands t |
| 526 | "Non-nil means that `ido' will record commands in command history. | 526 | "Non-nil means that Ido will record commands in command history. |
| 527 | Note that the non-ido equivalent command is recorded." | 527 | Note that the non-Ido equivalent command is recorded." |
| 528 | :type 'boolean | 528 | :type 'boolean |
| 529 | :group 'ido) | 529 | :group 'ido) |
| 530 | 530 | ||
| @@ -1789,10 +1789,10 @@ This function also adds a hook to the minibuffer." | |||
| 1789 | (ido-set-current-directory (expand-file-name (or dir "~/")))) | 1789 | (ido-set-current-directory (expand-file-name (or dir "~/")))) |
| 1790 | 1790 | ||
| 1791 | (defun ido-record-command (command arg) | 1791 | (defun ido-record-command (command arg) |
| 1792 | ;; Add (command arg) to command-history if ido-record-commands is t | 1792 | "Add (COMMAND ARG) to `command-history' if `ido-record-commands' is non-nil." |
| 1793 | (if ido-record-commands | 1793 | (if ido-record-commands ; FIXME: use `when' instead of `if'? |
| 1794 | (let ((cmd (list command arg))) | 1794 | (let ((cmd (list command arg))) |
| 1795 | (if (or (not command-history) | 1795 | (if (or (not command-history) ; FIXME: ditto |
| 1796 | (not (equal cmd (car command-history)))) | 1796 | (not (equal cmd (car command-history)))) |
| 1797 | (setq command-history (cons cmd command-history)))))) | 1797 | (setq command-history (cons cmd command-history)))))) |
| 1798 | 1798 | ||
| @@ -3972,12 +3972,11 @@ If `ido-change-word-sub' cannot be found in WORD, return nil." | |||
| 3972 | (if (featurep 'xemacs) | 3972 | (if (featurep 'xemacs) |
| 3973 | ;; XEmacs extents are put on by default, doesn't seem to be | 3973 | ;; XEmacs extents are put on by default, doesn't seem to be |
| 3974 | ;; any way of switching them off. | 3974 | ;; any way of switching them off. |
| 3975 | ;; This obscure code avoids a byte compiler warning in Emacs. | 3975 | (display-completion-list |
| 3976 | (let ((f 'display-completion-list)) | 3976 | completion-list |
| 3977 | (funcall f completion-list | 3977 | :help-string "ido " |
| 3978 | :help-string "ido " | 3978 | :activate-callback |
| 3979 | :activate-callback | 3979 | (lambda (&rest _) (message "Doesn't work yet, sorry!"))) |
| 3980 | (lambda (x y z) (message "Doesn't work yet, sorry!")))) | ||
| 3981 | ;; else running Emacs | 3980 | ;; else running Emacs |
| 3982 | ;;(add-hook 'completion-setup-hook 'completion-setup-function) | 3981 | ;;(add-hook 'completion-setup-hook 'completion-setup-function) |
| 3983 | (display-completion-list completion-list))))))) | 3982 | (display-completion-list completion-list))))))) |
diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 30dfd045b46..f9bbbcdb1ab 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el | |||
| @@ -354,6 +354,10 @@ call." | |||
| 354 | (define-key map "b" 'image-previous-frame) | 354 | (define-key map "b" 'image-previous-frame) |
| 355 | (define-key map "n" 'image-next-file) | 355 | (define-key map "n" 'image-next-file) |
| 356 | (define-key map "p" 'image-previous-file) | 356 | (define-key map "p" 'image-previous-file) |
| 357 | (define-key map "a+" 'image-increase-speed) | ||
| 358 | (define-key map "a-" 'image-decrease-speed) | ||
| 359 | (define-key map "a0" 'image-reset-speed) | ||
| 360 | (define-key map "ar" 'image-reverse-speed) | ||
| 357 | (define-key map [remap forward-char] 'image-forward-hscroll) | 361 | (define-key map [remap forward-char] 'image-forward-hscroll) |
| 358 | (define-key map [remap backward-char] 'image-backward-hscroll) | 362 | (define-key map [remap backward-char] 'image-backward-hscroll) |
| 359 | (define-key map [remap right-char] 'image-forward-hscroll) | 363 | (define-key map [remap right-char] 'image-forward-hscroll) |
| @@ -412,7 +416,23 @@ call." | |||
| 412 | (image-toggle-animation))) | 416 | (image-toggle-animation))) |
| 413 | :style toggle :selected image-animate-loop | 417 | :style toggle :selected image-animate-loop |
| 414 | :active image-multi-frame | 418 | :active image-multi-frame |
| 415 | :help "Animate images once, or forever?"] | 419 | :help "Animate images once, or forever?"] |
| 420 | ["Reverse Animation" image-reverse-speed | ||
| 421 | :style toggle :selected (let ((image (image-get-display-property))) | ||
| 422 | (and image (< | ||
| 423 | (image-animate-get-speed image) | ||
| 424 | 0))) | ||
| 425 | :active image-multi-frame | ||
| 426 | :help "Reverse direction of this image's animation?"] | ||
| 427 | ["Speed Up Animation" image-increase-speed | ||
| 428 | :active image-multi-frame | ||
| 429 | :help "Speed up this image's animation"] | ||
| 430 | ["Slow Down Animation" image-decrease-speed | ||
| 431 | :active image-multi-frame | ||
| 432 | :help "Slow down this image's animation"] | ||
| 433 | ["Reset Animation Speed" image-reset-speed | ||
| 434 | :active image-multi-frame | ||
| 435 | :help "Reset the speed of this image's animation"] | ||
| 416 | ["Next Frame" image-next-frame :active image-multi-frame | 436 | ["Next Frame" image-next-frame :active image-multi-frame |
| 417 | :help "Show the next frame of this image"] | 437 | :help "Show the next frame of this image"] |
| 418 | ["Previous Frame" image-previous-frame :active image-multi-frame | 438 | ["Previous Frame" image-previous-frame :active image-multi-frame |
| @@ -437,7 +457,10 @@ call." | |||
| 437 | (defun image-mode () | 457 | (defun image-mode () |
| 438 | "Major mode for image files. | 458 | "Major mode for image files. |
| 439 | You can use \\<image-mode-map>\\[image-toggle-display] | 459 | You can use \\<image-mode-map>\\[image-toggle-display] |
| 440 | to toggle between display as an image and display as text." | 460 | to toggle between display as an image and display as text. |
| 461 | |||
| 462 | Key bindings: | ||
| 463 | \\{image-mode-map}" | ||
| 441 | (interactive) | 464 | (interactive) |
| 442 | (condition-case err | 465 | (condition-case err |
| 443 | (progn | 466 | (progn |
| @@ -703,6 +726,48 @@ Otherwise it plays once, then stops." | |||
| 703 | (image-animate image index | 726 | (image-animate image index |
| 704 | (if image-animate-loop t))))))))) | 727 | (if image-animate-loop t))))))))) |
| 705 | 728 | ||
| 729 | (defun image--set-speed (speed &optional multiply) | ||
| 730 | "Set speed of an animated image to SPEED. | ||
| 731 | If MULTIPLY is non-nil, treat SPEED as a multiplication factor. | ||
| 732 | If SPEED is `reset', reset the magnitude of the speed to 1." | ||
| 733 | (let ((image (image-get-display-property))) | ||
| 734 | (cond | ||
| 735 | ((null image) | ||
| 736 | (error "No image is present")) | ||
| 737 | ((null image-multi-frame) | ||
| 738 | (message "No image animation.")) | ||
| 739 | (t | ||
| 740 | (if (eq speed 'reset) | ||
| 741 | (setq speed (if (< (image-animate-get-speed image) 0) | ||
| 742 | -1 1) | ||
| 743 | multiply nil)) | ||
| 744 | (image-animate-set-speed image speed multiply) | ||
| 745 | ;; FIXME Hack to refresh an active image. | ||
| 746 | (when (image-animate-timer image) | ||
| 747 | (image-toggle-animation) | ||
| 748 | (image-toggle-animation)) | ||
| 749 | (message "Image speed is now %s" (image-animate-get-speed image)))))) | ||
| 750 | |||
| 751 | (defun image-increase-speed () | ||
| 752 | "Increase the speed of current animated image by a factor of 2." | ||
| 753 | (interactive) | ||
| 754 | (image--set-speed 2 t)) | ||
| 755 | |||
| 756 | (defun image-decrease-speed () | ||
| 757 | "Decrease the speed of current animated image by a factor of 2." | ||
| 758 | (interactive) | ||
| 759 | (image--set-speed 0.5 t)) | ||
| 760 | |||
| 761 | (defun image-reverse-speed () | ||
| 762 | "Reverse the animation of the current image." | ||
| 763 | (interactive) | ||
| 764 | (image--set-speed -1 t)) | ||
| 765 | |||
| 766 | (defun image-reset-speed () | ||
| 767 | "Reset the animation speed of the current image." | ||
| 768 | (interactive) | ||
| 769 | (image--set-speed 'reset)) | ||
| 770 | |||
| 706 | (defun image-goto-frame (n &optional relative) | 771 | (defun image-goto-frame (n &optional relative) |
| 707 | "Show frame N of a multi-frame image. | 772 | "Show frame N of a multi-frame image. |
| 708 | Optional argument OFFSET non-nil means interpret N as relative to the | 773 | Optional argument OFFSET non-nil means interpret N as relative to the |
diff --git a/lisp/image.el b/lisp/image.el index 804dc3af5ea..6c15a7d0b96 100644 --- a/lisp/image.el +++ b/lisp/image.el | |||
| @@ -99,6 +99,14 @@ AUTODETECT can be | |||
| 99 | - maybe auto-detect only if the image type is available | 99 | - maybe auto-detect only if the image type is available |
| 100 | (see `image-type-available-p').") | 100 | (see `image-type-available-p').") |
| 101 | 101 | ||
| 102 | (defvar image-format-suffixes | ||
| 103 | '((image/x-icon "ico")) | ||
| 104 | "Alist of MIME Content-Type headers to file name suffixes. | ||
| 105 | This is used as a hint by the ImageMagick library when detecting | ||
| 106 | image types. If `create-image' is called with a :format | ||
| 107 | matching found in this alist, the ImageMagick library will be | ||
| 108 | told that the data would have this suffix if saved to a file.") | ||
| 109 | |||
| 102 | (defcustom image-load-path | 110 | (defcustom image-load-path |
| 103 | (list (file-name-as-directory (expand-file-name "images" data-directory)) | 111 | (list (file-name-as-directory (expand-file-name "images" data-directory)) |
| 104 | 'data-directory 'load-path) | 112 | 'data-directory 'load-path) |
| @@ -679,6 +687,19 @@ do not check N is within the range of frames present in the image." | |||
| 679 | (plist-put (cdr image) :index n) | 687 | (plist-put (cdr image) :index n) |
| 680 | (force-window-update)) | 688 | (force-window-update)) |
| 681 | 689 | ||
| 690 | (defun image-animate-get-speed (image) | ||
| 691 | "Return the speed factor for animating IMAGE." | ||
| 692 | (or (plist-get (cdr image) :speed) 1)) | ||
| 693 | |||
| 694 | (defun image-animate-set-speed (image value &optional multiply) | ||
| 695 | "Set the speed factor for animating IMAGE to VALUE. | ||
| 696 | With optional argument MULTIPLY non-nil, treat VALUE as a | ||
| 697 | multiplication factor for the current value." | ||
| 698 | (plist-put (cdr image) :speed | ||
| 699 | (if multiply | ||
| 700 | (* value (image-animate-get-speed image)) | ||
| 701 | value))) | ||
| 702 | |||
| 682 | ;; FIXME? The delay may not be the same for different sub-images, | 703 | ;; FIXME? The delay may not be the same for different sub-images, |
| 683 | ;; hence we need to call image-multi-frame-p to return it. | 704 | ;; hence we need to call image-multi-frame-p to return it. |
| 684 | ;; But it also returns count, so why do we bother passing that as an | 705 | ;; But it also returns count, so why do we bother passing that as an |
| @@ -692,21 +713,28 @@ TIME-ELAPSED is the total time that has elapsed since | |||
| 692 | LIMIT determines when to stop. If t, loop forever. If nil, stop | 713 | LIMIT determines when to stop. If t, loop forever. If nil, stop |
| 693 | after displaying the last animation frame. Otherwise, stop | 714 | after displaying the last animation frame. Otherwise, stop |
| 694 | after LIMIT seconds have elapsed. | 715 | after LIMIT seconds have elapsed. |
| 695 | The minimum delay between successive frames is `image-minimum-frame-delay'." | 716 | The minimum delay between successive frames is `image-minimum-frame-delay'. |
| 717 | |||
| 718 | If the image has a non-nil :speed property, it acts as a multiplier | ||
| 719 | for the animation speed. A negative value means to animate in reverse." | ||
| 696 | (image-show-frame image n t) | 720 | (image-show-frame image n t) |
| 697 | (setq n (1+ n)) | 721 | (let* ((speed (image-animate-get-speed image)) |
| 698 | (let* ((time (float-time)) | 722 | (time (float-time)) |
| 699 | (animation (image-multi-frame-p image)) | 723 | (animation (image-multi-frame-p image)) |
| 700 | ;; Subtract off the time we took to load the image from the | 724 | ;; Subtract off the time we took to load the image from the |
| 701 | ;; stated delay time. | 725 | ;; stated delay time. |
| 702 | (delay (max (+ (or (cdr animation) image-default-frame-delay) | 726 | (delay (max (+ (* (or (cdr animation) image-default-frame-delay) |
| 727 | (/ 1 (abs speed))) | ||
| 703 | time (- (float-time))) | 728 | time (- (float-time))) |
| 704 | image-minimum-frame-delay)) | 729 | image-minimum-frame-delay)) |
| 705 | done) | 730 | done) |
| 706 | (if (>= n count) | 731 | (setq n (if (< speed 0) |
| 707 | (if limit | 732 | (1- n) |
| 708 | (setq n 0) | 733 | (1+ n))) |
| 709 | (setq done t))) | 734 | (if limit |
| 735 | (cond ((>= n count) (setq n 0)) | ||
| 736 | ((< n 0) (setq n (1- count)))) | ||
| 737 | (and (or (>= n count) (< n 0)) (setq done t))) | ||
| 710 | (setq time-elapsed (+ delay time-elapsed)) | 738 | (setq time-elapsed (+ delay time-elapsed)) |
| 711 | (if (numberp limit) | 739 | (if (numberp limit) |
| 712 | (setq done (>= time-elapsed limit))) | 740 | (setq done (>= time-elapsed limit))) |
diff --git a/lisp/info.el b/lisp/info.el index 0e0a11753ba..182ad8563aa 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -1905,6 +1905,30 @@ the Top node in FILENAME." | |||
| 1905 | (defvar Info-search-case-fold nil | 1905 | (defvar Info-search-case-fold nil |
| 1906 | "The value of `case-fold-search' from previous `Info-search' command.") | 1906 | "The value of `case-fold-search' from previous `Info-search' command.") |
| 1907 | 1907 | ||
| 1908 | (defun Info--search-loop (regexp bound backward) | ||
| 1909 | (when backward | ||
| 1910 | ;; Hide Info file header for backward search. | ||
| 1911 | (narrow-to-region (save-excursion | ||
| 1912 | (goto-char (point-min)) | ||
| 1913 | (search-forward "\n\^_") | ||
| 1914 | (1- (point))) | ||
| 1915 | (point-max))) | ||
| 1916 | (let ((give-up nil) | ||
| 1917 | (found nil) | ||
| 1918 | (beg-found nil)) | ||
| 1919 | (while (not (or give-up | ||
| 1920 | (and found | ||
| 1921 | (funcall isearch-filter-predicate | ||
| 1922 | beg-found found)))) | ||
| 1923 | (let ((search-spaces-regexp Info-search-whitespace-regexp)) | ||
| 1924 | (if (funcall | ||
| 1925 | (if backward #'re-search-backward #'re-search-forward) | ||
| 1926 | regexp bound t) | ||
| 1927 | (setq found (point) beg-found (if backward (match-end 0) | ||
| 1928 | (match-beginning 0))) | ||
| 1929 | (setq give-up t found nil)))) | ||
| 1930 | found)) | ||
| 1931 | |||
| 1908 | (defun Info-search (regexp &optional bound _noerror _count direction) | 1932 | (defun Info-search (regexp &optional bound _noerror _count direction) |
| 1909 | "Search for REGEXP, starting from point, and select node it's found in. | 1933 | "Search for REGEXP, starting from point, and select node it's found in. |
| 1910 | If DIRECTION is `backward', search in the reverse direction." | 1934 | If DIRECTION is `backward', search in the reverse direction." |
| @@ -1920,55 +1944,35 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 1920 | (when (equal regexp "") | 1944 | (when (equal regexp "") |
| 1921 | (setq regexp (car Info-search-history))) | 1945 | (setq regexp (car Info-search-history))) |
| 1922 | (when regexp | 1946 | (when regexp |
| 1923 | (let (found beg-found give-up | 1947 | (setq Info-search-case-fold case-fold-search) |
| 1924 | (backward (eq direction 'backward)) | 1948 | (let* ((backward (eq direction 'backward)) |
| 1925 | (onode Info-current-node) | 1949 | (onode Info-current-node) |
| 1926 | (ofile Info-current-file) | 1950 | (ofile Info-current-file) |
| 1927 | (opoint (point)) | 1951 | (opoint (point)) |
| 1928 | (opoint-min (point-min)) | 1952 | (opoint-min (point-min)) |
| 1929 | (opoint-max (point-max)) | 1953 | (opoint-max (point-max)) |
| 1930 | (ostart (window-start)) | 1954 | (ostart (window-start)) |
| 1931 | (osubfile Info-current-subfile)) | 1955 | (osubfile Info-current-subfile) |
| 1932 | (setq Info-search-case-fold case-fold-search) | 1956 | (found |
| 1933 | (save-excursion | 1957 | (save-excursion |
| 1934 | (save-restriction | 1958 | (save-restriction |
| 1935 | (widen) | 1959 | (widen) |
| 1936 | (when backward | 1960 | (Info--search-loop regexp bound backward))))) |
| 1937 | ;; Hide Info file header for backward search | 1961 | |
| 1938 | (narrow-to-region (save-excursion | 1962 | (unless (or (not isearch-mode) (not Info-isearch-search) |
| 1939 | (goto-char (point-min)) | 1963 | Info-isearch-initial-node |
| 1940 | (search-forward "\n\^_") | 1964 | bound |
| 1941 | (1- (point))) | 1965 | (and found (> found opoint-min) (< found opoint-max))) |
| 1942 | (point-max))) | ||
| 1943 | (while (and (not give-up) | ||
| 1944 | (or (null found) | ||
| 1945 | (not (run-hook-with-args-until-failure | ||
| 1946 | 'isearch-filter-predicates beg-found found)))) | ||
| 1947 | (let ((search-spaces-regexp Info-search-whitespace-regexp)) | ||
| 1948 | (if (if backward | ||
| 1949 | (re-search-backward regexp bound t) | ||
| 1950 | (re-search-forward regexp bound t)) | ||
| 1951 | (setq found (point) beg-found (if backward (match-end 0) | ||
| 1952 | (match-beginning 0))) | ||
| 1953 | (setq give-up t)))))) | ||
| 1954 | |||
| 1955 | (when (and isearch-mode Info-isearch-search | ||
| 1956 | (not Info-isearch-initial-node) | ||
| 1957 | (not bound) | ||
| 1958 | (or give-up (and found (not (and (> found opoint-min) | ||
| 1959 | (< found opoint-max)))))) | ||
| 1960 | (signal 'search-failed (list regexp "end of node"))) | 1966 | (signal 'search-failed (list regexp "end of node"))) |
| 1961 | 1967 | ||
| 1962 | ;; If no subfiles, give error now. | 1968 | ;; If no subfiles, give error now. |
| 1963 | (if give-up | 1969 | (unless (or found Info-current-subfile) |
| 1964 | (if (null Info-current-subfile) | 1970 | (if isearch-mode |
| 1965 | (if isearch-mode | 1971 | (signal 'search-failed (list regexp "end of manual")) |
| 1966 | (signal 'search-failed (list regexp "end of manual")) | 1972 | (let ((search-spaces-regexp Info-search-whitespace-regexp)) |
| 1967 | (let ((search-spaces-regexp Info-search-whitespace-regexp)) | 1973 | (if backward |
| 1968 | (if backward | 1974 | (re-search-backward regexp) |
| 1969 | (re-search-backward regexp) | 1975 | (re-search-forward regexp))))) |
| 1970 | (re-search-forward regexp)))) | ||
| 1971 | (setq found nil))) | ||
| 1972 | 1976 | ||
| 1973 | (if (and bound (not found)) | 1977 | (if (and bound (not found)) |
| 1974 | (signal 'search-failed (list regexp))) | 1978 | (signal 'search-failed (list regexp))) |
| @@ -2009,29 +2013,9 @@ If DIRECTION is `backward', search in the reverse direction." | |||
| 2009 | (while list | 2013 | (while list |
| 2010 | (message "Searching subfile %s..." (cdr (car list))) | 2014 | (message "Searching subfile %s..." (cdr (car list))) |
| 2011 | (Info-read-subfile (car (car list))) | 2015 | (Info-read-subfile (car (car list))) |
| 2012 | (when backward | 2016 | (when backward (goto-char (point-max))) |
| 2013 | ;; Hide Info file header for backward search | ||
| 2014 | (narrow-to-region (save-excursion | ||
| 2015 | (goto-char (point-min)) | ||
| 2016 | (search-forward "\n\^_") | ||
| 2017 | (1- (point))) | ||
| 2018 | (point-max)) | ||
| 2019 | (goto-char (point-max))) | ||
| 2020 | (setq list (cdr list)) | 2017 | (setq list (cdr list)) |
| 2021 | (setq give-up nil found nil) | 2018 | (setq found (Info--search-loop regexp nil backward)) |
| 2022 | (while (and (not give-up) | ||
| 2023 | (or (null found) | ||
| 2024 | (not (run-hook-with-args-until-failure | ||
| 2025 | 'isearch-filter-predicates beg-found found)))) | ||
| 2026 | (let ((search-spaces-regexp Info-search-whitespace-regexp)) | ||
| 2027 | (if (if backward | ||
| 2028 | (re-search-backward regexp nil t) | ||
| 2029 | (re-search-forward regexp nil t)) | ||
| 2030 | (setq found (point) beg-found (if backward (match-end 0) | ||
| 2031 | (match-beginning 0))) | ||
| 2032 | (setq give-up t)))) | ||
| 2033 | (if give-up | ||
| 2034 | (setq found nil)) | ||
| 2035 | (if found | 2019 | (if found |
| 2036 | (setq list nil))) | 2020 | (setq list nil))) |
| 2037 | (if found | 2021 | (if found |
| @@ -4288,8 +4272,7 @@ Advanced commands: | |||
| 4288 | 'Info-isearch-wrap) | 4272 | 'Info-isearch-wrap) |
| 4289 | (set (make-local-variable 'isearch-push-state-function) | 4273 | (set (make-local-variable 'isearch-push-state-function) |
| 4290 | 'Info-isearch-push-state) | 4274 | 'Info-isearch-push-state) |
| 4291 | (set (make-local-variable 'isearch-filter-predicates) | 4275 | (set (make-local-variable 'isearch-filter-predicate) #'Info-isearch-filter) |
| 4292 | '(Info-isearch-filter)) | ||
| 4293 | (set (make-local-variable 'revert-buffer-function) | 4276 | (set (make-local-variable 'revert-buffer-function) |
| 4294 | 'Info-revert-buffer-function) | 4277 | 'Info-revert-buffer-function) |
| 4295 | (Info-set-mode-line) | 4278 | (Info-set-mode-line) |
diff --git a/lisp/international/characters.el b/lisp/international/characters.el index 9f56b1c8b7d..ce6256c1e47 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el | |||
| @@ -1078,10 +1078,10 @@ with L, LRE, or LRO Unicode bidi character type.") | |||
| 1078 | ;; (lambda (range ignore) (set-char-table-range char-width-table range 2)) | 1078 | ;; (lambda (range ignore) (set-char-table-range char-width-table range 2)) |
| 1079 | ;; 'tibetan) | 1079 | ;; 'tibetan) |
| 1080 | (map-charset-chars | 1080 | (map-charset-chars |
| 1081 | (lambda (range ignore) (set-char-table-range char-width-table range 2)) | 1081 | (lambda (range _ignore) (set-char-table-range char-width-table range 2)) |
| 1082 | 'indian-2-column) | 1082 | 'indian-2-column) |
| 1083 | (map-charset-chars | 1083 | (map-charset-chars |
| 1084 | (lambda (range ignore) (set-char-table-range char-width-table range 2)) | 1084 | (lambda (range _ignore) (set-char-table-range char-width-table range 2)) |
| 1085 | 'arabic-2-column) | 1085 | 'arabic-2-column) |
| 1086 | 1086 | ||
| 1087 | ;; Internal use only. | 1087 | ;; Internal use only. |
| @@ -1110,8 +1110,7 @@ with L, LRE, or LRO Unicode bidi character type.") | |||
| 1110 | (defun use-cjk-char-width-table (locale-name) | 1110 | (defun use-cjk-char-width-table (locale-name) |
| 1111 | (while (char-table-parent char-width-table) | 1111 | (while (char-table-parent char-width-table) |
| 1112 | (setq char-width-table (char-table-parent char-width-table))) | 1112 | (setq char-width-table (char-table-parent char-width-table))) |
| 1113 | (let ((slot (assq locale-name cjk-char-width-table-list)) | 1113 | (let ((slot (assq locale-name cjk-char-width-table-list))) |
| 1114 | table) | ||
| 1115 | (or slot (error "Unknown locale for CJK language environment: %s" | 1114 | (or slot (error "Unknown locale for CJK language environment: %s" |
| 1116 | locale-name)) | 1115 | locale-name)) |
| 1117 | (unless (nth 1 slot) | 1116 | (unless (nth 1 slot) |
| @@ -1119,7 +1118,7 @@ with L, LRE, or LRO Unicode bidi character type.") | |||
| 1119 | (dolist (charset-info (nthcdr 2 slot)) | 1118 | (dolist (charset-info (nthcdr 2 slot)) |
| 1120 | (let ((charset (car charset-info))) | 1119 | (let ((charset (car charset-info))) |
| 1121 | (dolist (code-range (cdr charset-info)) | 1120 | (dolist (code-range (cdr charset-info)) |
| 1122 | (map-charset-chars #'(lambda (range arg) | 1121 | (map-charset-chars #'(lambda (range _arg) |
| 1123 | (set-char-table-range table range 2)) | 1122 | (set-char-table-range table range 2)) |
| 1124 | charset nil | 1123 | charset nil |
| 1125 | (car code-range) (cdr code-range))))) | 1124 | (car code-range) (cdr code-range))))) |
| @@ -1326,7 +1325,7 @@ Setup char-width-table appropriate for non-CJK language environment." | |||
| 1326 | (set-char-table-extra-slot char-script-table 0 (nreverse script-list))) | 1325 | (set-char-table-extra-slot char-script-table 0 (nreverse script-list))) |
| 1327 | 1326 | ||
| 1328 | (map-charset-chars | 1327 | (map-charset-chars |
| 1329 | #'(lambda (range ignore) | 1328 | #'(lambda (range _ignore) |
| 1330 | (set-char-table-range char-script-table range 'tibetan)) | 1329 | (set-char-table-range char-script-table range 'tibetan)) |
| 1331 | 'tibetan) | 1330 | 'tibetan) |
| 1332 | 1331 | ||
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index c2bbb171241..324d615c581 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el | |||
| @@ -357,7 +357,7 @@ | |||
| 357 | (dolist (elt cjk) | 357 | (dolist (elt cjk) |
| 358 | (let ((mask (lsh 1 i))) | 358 | (let ((mask (lsh 1 i))) |
| 359 | (map-charset-chars | 359 | (map-charset-chars |
| 360 | #'(lambda (range arg) | 360 | #'(lambda (range _arg) |
| 361 | (let ((from (car range)) (to (cdr range))) | 361 | (let ((from (car range)) (to (cdr range))) |
| 362 | (if (< to #x110000) | 362 | (if (< to #x110000) |
| 363 | (while (<= from to) | 363 | (while (<= from to) |
| @@ -876,7 +876,7 @@ Return nil if PATTERN doesn't conform to XLFD." | |||
| 876 | (aset xlfd-fields i nil))) | 876 | (aset xlfd-fields i nil))) |
| 877 | xlfd-fields))) | 877 | xlfd-fields))) |
| 878 | 878 | ||
| 879 | (defun x-compose-font-name (fields &optional reduce) | 879 | (defun x-compose-font-name (fields &optional _reduce) |
| 880 | "Compose X fontname from FIELDS. | 880 | "Compose X fontname from FIELDS. |
| 881 | FIELDS is a vector of XLFD fields, of length 12. | 881 | FIELDS is a vector of XLFD fields, of length 12. |
| 882 | If a field is nil, wild-card letter `*' is embedded. | 882 | If a field is nil, wild-card letter `*' is embedded. |
| @@ -954,7 +954,7 @@ Done when `mouse-set-font' is called." | |||
| 954 | (let ((family (aref xlfd-fields xlfd-regexp-family-subnum)) | 954 | (let ((family (aref xlfd-fields xlfd-regexp-family-subnum)) |
| 955 | (weight (aref xlfd-fields xlfd-regexp-weight-subnum)) | 955 | (weight (aref xlfd-fields xlfd-regexp-weight-subnum)) |
| 956 | (slant (aref xlfd-fields xlfd-regexp-slant-subnum)) | 956 | (slant (aref xlfd-fields xlfd-regexp-slant-subnum)) |
| 957 | (swidth (aref xlfd-fields xlfd-regexp-swidth-subnum)) | 957 | ;(swidth (aref xlfd-fields xlfd-regexp-swidth-subnum)) |
| 958 | (size (aref xlfd-fields xlfd-regexp-pixelsize-subnum)) | 958 | (size (aref xlfd-fields xlfd-regexp-pixelsize-subnum)) |
| 959 | (nickname (aref xlfd-fields xlfd-regexp-registry-subnum)) | 959 | (nickname (aref xlfd-fields xlfd-regexp-registry-subnum)) |
| 960 | name) | 960 | name) |
| @@ -1039,7 +1039,7 @@ This alist is used by the function `create-fontset-from-fontset-spec' | |||
| 1039 | to map charsets to scripts.") | 1039 | to map charsets to scripts.") |
| 1040 | 1040 | ||
| 1041 | (defun create-fontset-from-fontset-spec (fontset-spec | 1041 | (defun create-fontset-from-fontset-spec (fontset-spec |
| 1042 | &optional style-variant noerror) | 1042 | &optional _style-variant _noerror) |
| 1043 | "Create a fontset from fontset specification string FONTSET-SPEC. | 1043 | "Create a fontset from fontset specification string FONTSET-SPEC. |
| 1044 | FONTSET-SPEC is a string of the format: | 1044 | FONTSET-SPEC is a string of the format: |
| 1045 | FONTSET-NAME,SCRIPT-NAME0:FONT-NAME0,SCRIPT-NAME1:FONT-NAME1, ... | 1045 | FONTSET-NAME,SCRIPT-NAME0:FONT-NAME0,SCRIPT-NAME1:FONT-NAME1, ... |
diff --git a/lisp/international/kkc.el b/lisp/international/kkc.el index a7d3ac5d017..13833fad66b 100644 --- a/lisp/international/kkc.el +++ b/lisp/international/kkc.el | |||
| @@ -207,7 +207,7 @@ area while indicating the current selection by `<N>'." | |||
| 207 | kkc-current-conversions-width nil | 207 | kkc-current-conversions-width nil |
| 208 | kkc-current-conversions (cons 0 nil))))))) | 208 | kkc-current-conversions (cons 0 nil))))))) |
| 209 | 209 | ||
| 210 | (put 'kkc-error 'error-conditions '(kkc-error error)) | 210 | (define-error 'kkc-error nil) |
| 211 | (defun kkc-error (&rest args) | 211 | (defun kkc-error (&rest args) |
| 212 | (signal 'kkc-error (apply 'format args))) | 212 | (signal 'kkc-error (apply 'format args))) |
| 213 | 213 | ||
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 62b96720771..34b1576d23e 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el | |||
| @@ -1739,8 +1739,8 @@ This hook is mainly used for canceling the effect of | |||
| 1739 | This variable should be set only with \\[customize], which is equivalent | 1739 | This variable should be set only with \\[customize], which is equivalent |
| 1740 | to using the function `set-language-environment'." | 1740 | to using the function `set-language-environment'." |
| 1741 | :link '(custom-manual "(emacs)Language Environments") | 1741 | :link '(custom-manual "(emacs)Language Environments") |
| 1742 | :set (lambda (symbol value) (set-language-environment value)) | 1742 | :set (lambda (_symbol value) (set-language-environment value)) |
| 1743 | :get (lambda (x) | 1743 | :get (lambda (_x) |
| 1744 | (or (car-safe (assoc-string | 1744 | (or (car-safe (assoc-string |
| 1745 | (if (symbolp current-language-environment) | 1745 | (if (symbolp current-language-environment) |
| 1746 | (symbol-name current-language-environment) | 1746 | (symbol-name current-language-environment) |
diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el index 15a7dc10f65..21e09593187 100644 --- a/lisp/international/mule-util.el +++ b/lisp/international/mule-util.el | |||
| @@ -125,59 +125,6 @@ defaults to \"...\"." | |||
| 125 | (concat head-padding (substring str from-idx idx) | 125 | (concat head-padding (substring str from-idx idx) |
| 126 | tail-padding ellipsis)))) | 126 | tail-padding ellipsis)))) |
| 127 | 127 | ||
| 128 | ;;; Test suite for truncate-string-to-width | ||
| 129 | ;; (dolist (test '((("" 0) . "") | ||
| 130 | ;; (("x" 1) . "x") | ||
| 131 | ;; (("xy" 1) . "x") | ||
| 132 | ;; (("xy" 2 1) . "y") | ||
| 133 | ;; (("xy" 0) . "") | ||
| 134 | ;; (("xy" 3) . "xy") | ||
| 135 | ;; (("中" 0) . "") | ||
| 136 | ;; (("中" 1) . "") | ||
| 137 | ;; (("中" 2) . "中") | ||
| 138 | ;; (("中" 1 nil ? ) . " ") | ||
| 139 | ;; (("中文" 3 1 ? ) . " ") | ||
| 140 | ;; (("x中x" 2) . "x") | ||
| 141 | ;; (("x中x" 3) . "x中") | ||
| 142 | ;; (("x中x" 3) . "x中") | ||
| 143 | ;; (("x中x" 4 1) . "中x") | ||
| 144 | ;; (("kor한e글an" 8 1 ? ) . "or한e글") | ||
| 145 | ;; (("kor한e글an" 7 2 ? ) . "r한e ") | ||
| 146 | ;; (("" 0 nil nil "...") . "") | ||
| 147 | ;; (("x" 3 nil nil "...") . "x") | ||
| 148 | ;; (("中" 3 nil nil "...") . "中") | ||
| 149 | ;; (("foo" 3 nil nil "...") . "foo") | ||
| 150 | ;; (("foo" 2 nil nil "...") . "fo") ;; XEmacs failure? | ||
| 151 | ;; (("foobar" 6 0 nil "...") . "foobar") | ||
| 152 | ;; (("foobarbaz" 6 nil nil "...") . "foo...") | ||
| 153 | ;; (("foobarbaz" 7 2 nil "...") . "ob...") | ||
| 154 | ;; (("foobarbaz" 9 3 nil "...") . "barbaz") | ||
| 155 | ;; (("こhんeにlちlはo" 15 1 ? t) . " hんeにlちlはo") | ||
| 156 | ;; (("こhんeにlちlはo" 14 1 ? t) . " hんeにlち...") | ||
| 157 | ;; (("x" 3 nil nil "粵語") . "x") | ||
| 158 | ;; (("中" 2 nil nil "粵語") . "中") | ||
| 159 | ;; (("中" 1 nil ?x "粵語") . "x") ;; XEmacs error | ||
| 160 | ;; (("中文" 3 nil ? "粵語") . "中 ") ;; XEmacs error | ||
| 161 | ;; (("foobarbaz" 4 nil nil "粵語") . "粵語") | ||
| 162 | ;; (("foobarbaz" 5 nil nil "粵語") . "f粵語") | ||
| 163 | ;; (("foobarbaz" 6 nil nil "粵語") . "fo粵語") | ||
| 164 | ;; (("foobarbaz" 8 3 nil "粵語") . "b粵語") | ||
| 165 | ;; (("こhんeにlちlはo" 14 4 ?x "日本語") . "xeに日本語") | ||
| 166 | ;; (("こhんeにlちlはo" 13 4 ?x "日本語") . "xex日本語") | ||
| 167 | ;; )) | ||
| 168 | ;; (let (ret) | ||
| 169 | ;; (condition-case e | ||
| 170 | ;; (setq ret (apply #'truncate-string-to-width (car test))) | ||
| 171 | ;; (error (setq ret e))) | ||
| 172 | ;; (unless (equal ret (cdr test)) | ||
| 173 | ;; (error "%s: expected %s, got %s" | ||
| 174 | ;; (prin1-to-string (cons 'truncate-string-to-width (car test))) | ||
| 175 | ;; (prin1-to-string (cdr test)) | ||
| 176 | ;; (if (consp ret) | ||
| 177 | ;; (format "error: %s: %s" (car ret) | ||
| 178 | ;; (prin1-to-string (cdr ret))) | ||
| 179 | ;; (prin1-to-string ret)))))) | ||
| 180 | |||
| 181 | 128 | ||
| 182 | ;;; Nested alist handler. Nested alist is alist whose elements are | 129 | ;;; Nested alist handler. Nested alist is alist whose elements are |
| 183 | ;;; also nested alist. | 130 | ;;; also nested alist. |
diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 11c4db5977d..9af6bc369a4 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el | |||
| @@ -407,12 +407,12 @@ PLIST (property list) may contain any type of information a user | |||
| 407 | ;; because that makes a bootstrapping problem | 407 | ;; because that makes a bootstrapping problem |
| 408 | ;; if you need to recompile all the Lisp files using interpreted code. | 408 | ;; if you need to recompile all the Lisp files using interpreted code. |
| 409 | 409 | ||
| 410 | (defun charset-id (charset) | 410 | (defun charset-id (_charset) |
| 411 | "Always return 0. This is provided for backward compatibility." | 411 | "Always return 0. This is provided for backward compatibility." |
| 412 | (declare (obsolete nil "23.1")) | 412 | (declare (obsolete nil "23.1")) |
| 413 | 0) | 413 | 0) |
| 414 | 414 | ||
| 415 | (defmacro charset-bytes (charset) | 415 | (defmacro charset-bytes (_charset) |
| 416 | "Always return 0. This is provided for backward compatibility." | 416 | "Always return 0. This is provided for backward compatibility." |
| 417 | (declare (obsolete nil "23.1")) | 417 | (declare (obsolete nil "23.1")) |
| 418 | 0) | 418 | 0) |
| @@ -471,7 +471,7 @@ Return -1 if charset isn't an ISO 2022 one." | |||
| 471 | ;;; CHARACTER | 471 | ;;; CHARACTER |
| 472 | (define-obsolete-function-alias 'char-valid-p 'characterp "23.1") | 472 | (define-obsolete-function-alias 'char-valid-p 'characterp "23.1") |
| 473 | 473 | ||
| 474 | (defun generic-char-p (char) | 474 | (defun generic-char-p (_char) |
| 475 | "Always return nil. This is provided for backward compatibility." | 475 | "Always return nil. This is provided for backward compatibility." |
| 476 | (declare (obsolete nil "23.1")) | 476 | (declare (obsolete nil "23.1")) |
| 477 | nil) | 477 | nil) |
| @@ -1346,7 +1346,7 @@ graphical terminals." | |||
| 1346 | (if coding-system | 1346 | (if coding-system |
| 1347 | (setq default-terminal-coding-system coding-system)) | 1347 | (setq default-terminal-coding-system coding-system)) |
| 1348 | (set-terminal-coding-system-internal coding-system terminal) | 1348 | (set-terminal-coding-system-internal coding-system terminal) |
| 1349 | (redraw-frame (selected-frame))) | 1349 | (redraw-frame)) |
| 1350 | 1350 | ||
| 1351 | (defvar default-keyboard-coding-system nil | 1351 | (defvar default-keyboard-coding-system nil |
| 1352 | "Default value of the keyboard coding system. | 1352 | "Default value of the keyboard coding system. |
| @@ -1429,7 +1429,7 @@ use either \\[customize] or \\[set-keyboard-coding-system]." | |||
| 1429 | :type '(coding-system :tag "Coding system") | 1429 | :type '(coding-system :tag "Coding system") |
| 1430 | :link '(info-link "(emacs)Terminal Coding") | 1430 | :link '(info-link "(emacs)Terminal Coding") |
| 1431 | :link '(info-link "(emacs)Unibyte Mode") | 1431 | :link '(info-link "(emacs)Unibyte Mode") |
| 1432 | :set (lambda (symbol value) | 1432 | :set (lambda (_symbol value) |
| 1433 | ;; Don't load encoded-kb unnecessarily. | 1433 | ;; Don't load encoded-kb unnecessarily. |
| 1434 | (if (or value (boundp 'encoded-kbd-setup-display)) | 1434 | (if (or value (boundp 'encoded-kbd-setup-display)) |
| 1435 | (set-keyboard-coding-system value) | 1435 | (set-keyboard-coding-system value) |
| @@ -1850,7 +1850,7 @@ If nothing is specified, the return value is nil." | |||
| 1850 | (head-end (+ head-start (min size 1024))) | 1850 | (head-end (+ head-start (min size 1024))) |
| 1851 | (tail-start (+ head-start (max (- size 3072) 0))) | 1851 | (tail-start (+ head-start (max (- size 3072) 0))) |
| 1852 | (tail-end (+ head-start size)) | 1852 | (tail-end (+ head-start size)) |
| 1853 | coding-system head-found tail-found pos char-trans) | 1853 | coding-system head-found tail-found char-trans) |
| 1854 | ;; Try a short cut by searching for the string "coding:" | 1854 | ;; Try a short cut by searching for the string "coding:" |
| 1855 | ;; and for "unibyte:" at the head and tail of SIZE bytes. | 1855 | ;; and for "unibyte:" at the head and tail of SIZE bytes. |
| 1856 | (setq head-found (or (search-forward "coding:" head-end t) | 1856 | (setq head-found (or (search-forward "coding:" head-end t) |
| @@ -1960,11 +1960,10 @@ use \"coding: 'raw-text\" instead." :warning) | |||
| 1960 | (let ((funcs auto-coding-functions) | 1960 | (let ((funcs auto-coding-functions) |
| 1961 | (coding-system nil)) | 1961 | (coding-system nil)) |
| 1962 | (while (and funcs (not coding-system)) | 1962 | (while (and funcs (not coding-system)) |
| 1963 | (setq coding-system (condition-case e | 1963 | (setq coding-system (ignore-errors |
| 1964 | (save-excursion | 1964 | (save-excursion |
| 1965 | (goto-char (point-min)) | 1965 | (goto-char (point-min)) |
| 1966 | (funcall (pop funcs) size)) | 1966 | (funcall (pop funcs) size))))) |
| 1967 | (error nil)))) | ||
| 1968 | (if coding-system | 1967 | (if coding-system |
| 1969 | (cons coding-system 'auto-coding-functions))))) | 1968 | (cons coding-system 'auto-coding-functions))))) |
| 1970 | 1969 | ||
diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 68fffc0e817..245f7975d91 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el | |||
| @@ -1301,7 +1301,7 @@ The returned value is a Quail map specific to KEY." | |||
| 1301 | (setcdr map (funcall (cdr map) key len))) | 1301 | (setcdr map (funcall (cdr map) key len))) |
| 1302 | map)) | 1302 | map)) |
| 1303 | 1303 | ||
| 1304 | (put 'quail-error 'error-conditions '(quail-error error)) | 1304 | (define-error 'quail-error nil) |
| 1305 | (defun quail-error (&rest args) | 1305 | (defun quail-error (&rest args) |
| 1306 | (signal 'quail-error (apply 'format args))) | 1306 | (signal 'quail-error (apply 'format args))) |
| 1307 | 1307 | ||
diff --git a/lisp/isearch.el b/lisp/isearch.el index ec4f32aecca..131ab5893d4 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -187,21 +187,15 @@ or to the end of the buffer for a backward search.") | |||
| 187 | "Function to save a function restoring the mode-specific Isearch state | 187 | "Function to save a function restoring the mode-specific Isearch state |
| 188 | to the search status stack.") | 188 | to the search status stack.") |
| 189 | 189 | ||
| 190 | (defvar isearch-filter-predicates nil | 190 | (defvar isearch-filter-predicate #'isearch-filter-visible |
| 191 | "Predicates that filter the search hits that would normally be available. | 191 | "Predicate that filter the search hits that would normally be available. |
| 192 | Search hits that dissatisfy the list of predicates are skipped. | 192 | Search hits that dissatisfy the predicate are skipped. The function |
| 193 | Each function in this list has two arguments: the positions of | 193 | has two arguments: the positions of start and end of text matched by |
| 194 | start and end of text matched by the search. | 194 | the search. If this function returns nil, continue searching without |
| 195 | The search loop uses `run-hook-with-args-until-failure' to call | 195 | stopping at this match. |
| 196 | each predicate in order, and when one of the predicates returns nil, | 196 | If you use `add-function' to modify this variable, you can use the |
| 197 | skips this match and continues searching for the next match. | 197 | `isearch-message-prefix' advice property to specify the prefix string |
| 198 | When the list of predicates is empty, `run-hook-with-args-until-failure' | 198 | displayed in the search message.") |
| 199 | returns non-nil that means that the found match is accepted. | ||
| 200 | The property `isearch-message-prefix' put on the predicate's symbol | ||
| 201 | specifies the prefix string displayed in the search message.") | ||
| 202 | (define-obsolete-variable-alias 'isearch-filter-predicate | ||
| 203 | 'isearch-filter-predicates | ||
| 204 | "24.4") | ||
| 205 | 199 | ||
| 206 | ;; Search ring. | 200 | ;; Search ring. |
| 207 | 201 | ||
| @@ -783,7 +777,7 @@ See the command `isearch-forward' for more information." | |||
| 783 | (interactive "P\np") | 777 | (interactive "P\np") |
| 784 | (isearch-mode t nil nil (not no-recursive-edit) (null not-word))) | 778 | (isearch-mode t nil nil (not no-recursive-edit) (null not-word))) |
| 785 | 779 | ||
| 786 | (defun isearch-forward-symbol (&optional not-symbol no-recursive-edit) | 780 | (defun isearch-forward-symbol (&optional _not-symbol no-recursive-edit) |
| 787 | "Do incremental search forward for a symbol. | 781 | "Do incremental search forward for a symbol. |
| 788 | The prefix argument is currently unused. | 782 | The prefix argument is currently unused. |
| 789 | Like ordinary incremental search except that your input is treated | 783 | Like ordinary incremental search except that your input is treated |
| @@ -1015,7 +1009,7 @@ NOPUSH is t and EDIT is t." | |||
| 1015 | (setq minibuffer-message-timeout isearch-original-minibuffer-message-timeout) | 1009 | (setq minibuffer-message-timeout isearch-original-minibuffer-message-timeout) |
| 1016 | (isearch-dehighlight) | 1010 | (isearch-dehighlight) |
| 1017 | (lazy-highlight-cleanup lazy-highlight-cleanup) | 1011 | (lazy-highlight-cleanup lazy-highlight-cleanup) |
| 1018 | (let ((found-start (window-start (selected-window))) | 1012 | (let ((found-start (window-start)) |
| 1019 | (found-point (point))) | 1013 | (found-point (point))) |
| 1020 | (when isearch-window-configuration | 1014 | (when isearch-window-configuration |
| 1021 | (set-window-configuration isearch-window-configuration) | 1015 | (set-window-configuration isearch-window-configuration) |
| @@ -2255,7 +2249,9 @@ the bottom." | |||
| 2255 | Return the key sequence as a string/vector." | 2249 | Return the key sequence as a string/vector." |
| 2256 | (isearch-unread-key-sequence keylist) | 2250 | (isearch-unread-key-sequence keylist) |
| 2257 | (let (overriding-terminal-local-map) | 2251 | (let (overriding-terminal-local-map) |
| 2258 | (read-key-sequence nil))) ; This will go through function-key-map, if nec. | 2252 | ;; This will go through function-key-map, if nec. |
| 2253 | ;; The arg DONT-DOWNCASE-LAST prevents premature shift-translation. | ||
| 2254 | (read-key-sequence nil nil t))) | ||
| 2259 | 2255 | ||
| 2260 | (defun isearch-lookup-scroll-key (key-seq) | 2256 | (defun isearch-lookup-scroll-key (key-seq) |
| 2261 | "If KEY-SEQ is bound to a scrolling command, return it as a symbol. | 2257 | "If KEY-SEQ is bound to a scrolling command, return it as a symbol. |
| @@ -2313,6 +2309,16 @@ Isearch mode." | |||
| 2313 | (lookup-key local-function-key-map key))) | 2309 | (lookup-key local-function-key-map key))) |
| 2314 | (while keylist | 2310 | (while keylist |
| 2315 | (setq key (car keylist)) | 2311 | (setq key (car keylist)) |
| 2312 | ;; Handle an undefined shifted printing character | ||
| 2313 | ;; by downshifting it if that makes it printing. | ||
| 2314 | ;; (As read-key-sequence would normally do, | ||
| 2315 | ;; if we didn't have a default definition.) | ||
| 2316 | (if (and (integerp key) | ||
| 2317 | (memq 'shift (event-modifiers key)) | ||
| 2318 | (>= key (+ ?\s (- ?\S-a ?a))) | ||
| 2319 | (/= key (+ 127 (- ?\S-a ?a))) | ||
| 2320 | (< key (+ 256 (- ?\S-a ?a)))) | ||
| 2321 | (setq key (- key (- ?\S-a ?a)))) | ||
| 2316 | ;; If KEY is a printing char, we handle it here | 2322 | ;; If KEY is a printing char, we handle it here |
| 2317 | ;; directly to avoid the input method and keyboard | 2323 | ;; directly to avoid the input method and keyboard |
| 2318 | ;; coding system translating it. | 2324 | ;; coding system translating it. |
| @@ -2392,6 +2398,13 @@ Isearch mode." | |||
| 2392 | (isearch-unread-key-sequence keylist) | 2398 | (isearch-unread-key-sequence keylist) |
| 2393 | (setq main-event (car unread-command-events)) | 2399 | (setq main-event (car unread-command-events)) |
| 2394 | 2400 | ||
| 2401 | ;; Don't store special commands in the keyboard macro. | ||
| 2402 | (let (overriding-terminal-local-map) | ||
| 2403 | (when (memq (key-binding key) | ||
| 2404 | '(kmacro-start-macro | ||
| 2405 | kmacro-end-macro kmacro-end-and-call-macro)) | ||
| 2406 | (cancel-kbd-macro-events))) | ||
| 2407 | |||
| 2395 | ;; If we got a mouse click event, that event contains the | 2408 | ;; If we got a mouse click event, that event contains the |
| 2396 | ;; window clicked on. maybe it was read with the buffer | 2409 | ;; window clicked on. maybe it was read with the buffer |
| 2397 | ;; it was clicked on. If so, that buffer, not the current one, | 2410 | ;; it was clicked on. If so, that buffer, not the current one, |
| @@ -2436,10 +2449,14 @@ With argument, add COUNT copies of the character." | |||
| 2436 | (if (subregexp-context-p isearch-string (length isearch-string)) | 2449 | (if (subregexp-context-p isearch-string (length isearch-string)) |
| 2437 | (isearch-process-search-string "[ ]" " ") | 2450 | (isearch-process-search-string "[ ]" " ") |
| 2438 | (isearch-process-search-char char count)) | 2451 | (isearch-process-search-char char count)) |
| 2439 | (and enable-multibyte-characters | 2452 | ;; This used to assume character codes 0240 - 0377 stand for |
| 2440 | (>= char ?\200) | 2453 | ;; characters in some single-byte character set, and converted them |
| 2441 | (<= char ?\377) | 2454 | ;; to Emacs characters. But in 23.1 this feature is deprecated |
| 2442 | (setq char (unibyte-char-to-multibyte char))) | 2455 | ;; in favor of inserting the corresponding Unicode characters. |
| 2456 | ;; (and enable-multibyte-characters | ||
| 2457 | ;; (>= char ?\200) | ||
| 2458 | ;; (<= char ?\377) | ||
| 2459 | ;; (setq char (unibyte-char-to-multibyte char))) | ||
| 2443 | (isearch-process-search-char char count)))) | 2460 | (isearch-process-search-char char count)))) |
| 2444 | 2461 | ||
| 2445 | (defun isearch-printing-char (&optional char count) | 2462 | (defun isearch-printing-char (&optional char count) |
| @@ -2614,13 +2631,13 @@ If there is no completion possible, say so and continue searching." | |||
| 2614 | (< (point) isearch-opoint))) | 2631 | (< (point) isearch-opoint))) |
| 2615 | "over") | 2632 | "over") |
| 2616 | (if isearch-wrapped "wrapped ") | 2633 | (if isearch-wrapped "wrapped ") |
| 2617 | (mapconcat (lambda (s) | 2634 | (let ((prefix "")) |
| 2618 | (and (symbolp s) | 2635 | (advice-function-mapc |
| 2619 | (get s 'isearch-message-prefix))) | 2636 | (lambda (_ props) |
| 2620 | (if (consp isearch-filter-predicates) | 2637 | (let ((np (cdr (assq 'isearch-message-prefix props)))) |
| 2621 | isearch-filter-predicates | 2638 | (if np (setq prefix (concat np prefix))))) |
| 2622 | (list isearch-filter-predicates)) | 2639 | isearch-filter-predicate) |
| 2623 | "") | 2640 | prefix) |
| 2624 | (if isearch-word | 2641 | (if isearch-word |
| 2625 | (or (and (symbolp isearch-word) | 2642 | (or (and (symbolp isearch-word) |
| 2626 | (get isearch-word 'isearch-message-prefix)) | 2643 | (get isearch-word 'isearch-message-prefix)) |
| @@ -2766,15 +2783,8 @@ update the match data, and return point." | |||
| 2766 | (if (or (not isearch-success) | 2783 | (if (or (not isearch-success) |
| 2767 | (bobp) (eobp) | 2784 | (bobp) (eobp) |
| 2768 | (= (match-beginning 0) (match-end 0)) | 2785 | (= (match-beginning 0) (match-end 0)) |
| 2769 | ;; When one of filter predicates returns nil, | 2786 | (funcall isearch-filter-predicate |
| 2770 | ;; retry the search. Otherwise, act according | 2787 | (match-beginning 0) (match-end 0))) |
| 2771 | ;; to search-invisible (open overlays, etc.) | ||
| 2772 | (and (run-hook-with-args-until-failure | ||
| 2773 | 'isearch-filter-predicates | ||
| 2774 | (match-beginning 0) (match-end 0)) | ||
| 2775 | (or (eq search-invisible t) | ||
| 2776 | (not (isearch-range-invisible | ||
| 2777 | (match-beginning 0) (match-end 0)))))) | ||
| 2778 | (setq retry nil))) | 2788 | (setq retry nil))) |
| 2779 | (setq isearch-just-started nil) | 2789 | (setq isearch-just-started nil) |
| 2780 | (if isearch-success | 2790 | (if isearch-success |
| @@ -2786,10 +2796,18 @@ update the match data, and return point." | |||
| 2786 | 2796 | ||
| 2787 | (invalid-regexp | 2797 | (invalid-regexp |
| 2788 | (setq isearch-error (car (cdr lossage))) | 2798 | (setq isearch-error (car (cdr lossage))) |
| 2789 | (if (string-match | 2799 | (cond |
| 2790 | "\\`Premature \\|\\`Unmatched \\|\\`Invalid " | 2800 | ((string-match |
| 2791 | isearch-error) | 2801 | "\\`Premature \\|\\`Unmatched \\|\\`Invalid " |
| 2792 | (setq isearch-error "incomplete input"))) | 2802 | isearch-error) |
| 2803 | (setq isearch-error "incomplete input")) | ||
| 2804 | ((and (not isearch-regexp) | ||
| 2805 | (string-match "\\`Regular expression too big" isearch-error)) | ||
| 2806 | (cond | ||
| 2807 | (isearch-word | ||
| 2808 | (setq isearch-error "Too many words")) | ||
| 2809 | ((and isearch-lax-whitespace search-whitespace-regexp) | ||
| 2810 | (setq isearch-error "Too many spaces for whitespace matching")))))) | ||
| 2793 | 2811 | ||
| 2794 | (search-failed | 2812 | (search-failed |
| 2795 | (setq isearch-success nil) | 2813 | (setq isearch-success nil) |
| @@ -2951,7 +2969,6 @@ determined by `isearch-range-invisible' unless invisible text can be | |||
| 2951 | searched too when `search-invisible' is t." | 2969 | searched too when `search-invisible' is t." |
| 2952 | (or (eq search-invisible t) | 2970 | (or (eq search-invisible t) |
| 2953 | (not (isearch-range-invisible beg end)))) | 2971 | (not (isearch-range-invisible beg end)))) |
| 2954 | (make-obsolete 'isearch-filter-visible 'isearch-invisible "24.4") | ||
| 2955 | 2972 | ||
| 2956 | 2973 | ||
| 2957 | ;; General utilities | 2974 | ;; General utilities |
| @@ -3177,11 +3194,8 @@ Attempt to do the search exactly the way the pending Isearch would." | |||
| 3177 | (if (or (not success) | 3194 | (if (or (not success) |
| 3178 | (= (point) bound) ; like (bobp) (eobp) in `isearch-search'. | 3195 | (= (point) bound) ; like (bobp) (eobp) in `isearch-search'. |
| 3179 | (= (match-beginning 0) (match-end 0)) | 3196 | (= (match-beginning 0) (match-end 0)) |
| 3180 | (and (run-hook-with-args-until-failure | 3197 | (funcall isearch-filter-predicate |
| 3181 | 'isearch-filter-predicates | 3198 | (match-beginning 0) (match-end 0))) |
| 3182 | (match-beginning 0) (match-end 0)) | ||
| 3183 | (not (isearch-range-invisible | ||
| 3184 | (match-beginning 0) (match-end 0))))) | ||
| 3185 | (setq retry nil))) | 3199 | (setq retry nil))) |
| 3186 | success) | 3200 | success) |
| 3187 | (error nil))) | 3201 | (error nil))) |
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index 9d700a5ed82..d0e88309daf 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el | |||
| @@ -482,7 +482,7 @@ non-nil in a repeated invocation of this function." | |||
| 482 | (cancel-timer jit-lock-stealth-repeat-timer)) | 482 | (cancel-timer jit-lock-stealth-repeat-timer)) |
| 483 | (unless (or executing-kbd-macro | 483 | (unless (or executing-kbd-macro |
| 484 | memory-full | 484 | memory-full |
| 485 | (window-minibuffer-p (selected-window)) | 485 | (window-minibuffer-p) |
| 486 | ;; For first invocation set up `jit-lock-stealth-buffers'. | 486 | ;; For first invocation set up `jit-lock-stealth-buffers'. |
| 487 | ;; In repeated invocations it's already been set up. | 487 | ;; In repeated invocations it's already been set up. |
| 488 | (null (if repeat | 488 | (null (if repeat |
diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el index 5664a890cb1..7266dc9ec80 100644 --- a/lisp/jka-compr.el +++ b/lisp/jka-compr.el | |||
| @@ -109,8 +109,7 @@ data appears to be compressed already.") | |||
| 109 | (put 'jka-compr-really-do-compress 'permanent-local t) | 109 | (put 'jka-compr-really-do-compress 'permanent-local t) |
| 110 | 110 | ||
| 111 | 111 | ||
| 112 | (put 'compression-error 'error-conditions '(compression-error file-error error)) | 112 | (define-error 'compression-error nil 'file-error) |
| 113 | |||
| 114 | 113 | ||
| 115 | (defvar jka-compr-acceptable-retval-list '(0 2 141)) | 114 | (defvar jka-compr-acceptable-retval-list '(0 2 141)) |
| 116 | 115 | ||
diff --git a/lisp/json.el b/lisp/json.el index 29beaedebe9..aaa7bb0c499 100644 --- a/lisp/json.el +++ b/lisp/json.el | |||
| @@ -177,36 +177,14 @@ without indentation.") | |||
| 177 | 177 | ||
| 178 | ;; Error conditions | 178 | ;; Error conditions |
| 179 | 179 | ||
| 180 | (put 'json-error 'error-message "Unknown JSON error") | 180 | (define-error 'json-error "Unknown JSON error") |
| 181 | (put 'json-error 'error-conditions '(json-error error)) | 181 | (define-error 'json-readtable-error "JSON readtable error" 'json-error) |
| 182 | 182 | (define-error 'json-unknown-keyword "Unrecognized keyword" 'json-error) | |
| 183 | (put 'json-readtable-error 'error-message "JSON readtable error") | 183 | (define-error 'json-number-format "Invalid number format" 'json-error) |
| 184 | (put 'json-readtable-error 'error-conditions | 184 | (define-error 'json-string-escape "Bad Unicode escape" 'json-error) |
| 185 | '(json-readtable-error json-error error)) | 185 | (define-error 'json-string-format "Bad string format" 'json-error) |
| 186 | 186 | (define-error 'json-key-format "Bad JSON object key" 'json-error) | |
| 187 | (put 'json-unknown-keyword 'error-message "Unrecognized keyword") | 187 | (define-error 'json-object-format "Bad JSON object" 'json-error) |
| 188 | (put 'json-unknown-keyword 'error-conditions | ||
| 189 | '(json-unknown-keyword json-error error)) | ||
| 190 | |||
| 191 | (put 'json-number-format 'error-message "Invalid number format") | ||
| 192 | (put 'json-number-format 'error-conditions | ||
| 193 | '(json-number-format json-error error)) | ||
| 194 | |||
| 195 | (put 'json-string-escape 'error-message "Bad Unicode escape") | ||
| 196 | (put 'json-string-escape 'error-conditions | ||
| 197 | '(json-string-escape json-error error)) | ||
| 198 | |||
| 199 | (put 'json-string-format 'error-message "Bad string format") | ||
| 200 | (put 'json-string-format 'error-conditions | ||
| 201 | '(json-string-format json-error error)) | ||
| 202 | |||
| 203 | (put 'json-key-format 'error-message "Bad JSON object key") | ||
| 204 | (put 'json-key-format 'error-conditions | ||
| 205 | '(json-key-format json-error error)) | ||
| 206 | |||
| 207 | (put 'json-object-format 'error-message "Bad JSON object") | ||
| 208 | (put 'json-object-format 'error-conditions | ||
| 209 | '(json-object-format json-error error)) | ||
| 210 | 188 | ||
| 211 | 189 | ||
| 212 | 190 | ||
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 2c99f2bde2e..26268f5924c 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el | |||
| @@ -65,8 +65,8 @@ should return a grid vector array that is the new solution. | |||
| 65 | 65 | ||
| 66 | ;;;*** | 66 | ;;;*** |
| 67 | 67 | ||
| 68 | ;;;### (autoloads nil "ada-mode" "progmodes/ada-mode.el" (20874 62962 | 68 | ;;;### (autoloads nil "ada-mode" "progmodes/ada-mode.el" (20998 4934 |
| 69 | ;;;;;; 290468 0)) | 69 | ;;;;;; 952905 0)) |
| 70 | ;;; Generated autoloads from progmodes/ada-mode.el | 70 | ;;; Generated autoloads from progmodes/ada-mode.el |
| 71 | 71 | ||
| 72 | (autoload 'ada-add-extensions "ada-mode" "\ | 72 | (autoload 'ada-add-extensions "ada-mode" "\ |
| @@ -96,8 +96,8 @@ Insert a descriptive header at the top of the file. | |||
| 96 | 96 | ||
| 97 | ;;;*** | 97 | ;;;*** |
| 98 | 98 | ||
| 99 | ;;;### (autoloads nil "ada-xref" "progmodes/ada-xref.el" (20709 26818 | 99 | ;;;### (autoloads nil "ada-xref" "progmodes/ada-xref.el" (21024 28968 |
| 100 | ;;;;;; 907104 0)) | 100 | ;;;;;; 738399 0)) |
| 101 | ;;; Generated autoloads from progmodes/ada-xref.el | 101 | ;;; Generated autoloads from progmodes/ada-xref.el |
| 102 | 102 | ||
| 103 | (autoload 'ada-find-file "ada-xref" "\ | 103 | (autoload 'ada-find-file "ada-xref" "\ |
| @@ -108,7 +108,7 @@ Completion is available. | |||
| 108 | 108 | ||
| 109 | ;;;*** | 109 | ;;;*** |
| 110 | 110 | ||
| 111 | ;;;### (autoloads nil "add-log" "vc/add-log.el" (20709 26818 907104 | 111 | ;;;### (autoloads nil "add-log" "vc/add-log.el" (20992 52525 458637 |
| 112 | ;;;;;; 0)) | 112 | ;;;;;; 0)) |
| 113 | ;;; Generated autoloads from vc/add-log.el | 113 | ;;; Generated autoloads from vc/add-log.el |
| 114 | 114 | ||
| @@ -238,8 +238,8 @@ old-style time formats for entries are supported. | |||
| 238 | 238 | ||
| 239 | ;;;*** | 239 | ;;;*** |
| 240 | 240 | ||
| 241 | ;;;### (autoloads nil "advice" "emacs-lisp/advice.el" (20725 15032 | 241 | ;;;### (autoloads nil "advice" "emacs-lisp/advice.el" (20991 31656 |
| 242 | ;;;;;; 264919 0)) | 242 | ;;;;;; 363459 0)) |
| 243 | ;;; Generated autoloads from emacs-lisp/advice.el | 243 | ;;; Generated autoloads from emacs-lisp/advice.el |
| 244 | 244 | ||
| 245 | (defvar ad-redefinition-action 'warn "\ | 245 | (defvar ad-redefinition-action 'warn "\ |
| @@ -375,7 +375,7 @@ usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...) | |||
| 375 | 375 | ||
| 376 | ;;;*** | 376 | ;;;*** |
| 377 | 377 | ||
| 378 | ;;;### (autoloads nil "align" "align.el" (20709 26818 907104 0)) | 378 | ;;;### (autoloads nil "align" "align.el" (21012 37798 962028 0)) |
| 379 | ;;; Generated autoloads from align.el | 379 | ;;; Generated autoloads from align.el |
| 380 | 380 | ||
| 381 | (autoload 'align "align" "\ | 381 | (autoload 'align "align" "\ |
| @@ -399,15 +399,8 @@ on the format of these lists. | |||
| 399 | 399 | ||
| 400 | (autoload 'align-regexp "align" "\ | 400 | (autoload 'align-regexp "align" "\ |
| 401 | Align the current region using an ad-hoc rule read from the minibuffer. | 401 | Align the current region using an ad-hoc rule read from the minibuffer. |
| 402 | BEG and END mark the limits of the region. This function will prompt | 402 | BEG and END mark the limits of the region. Interactively, this function |
| 403 | for the REGEXP to align with. If no prefix arg was specified, you | 403 | prompts for the regular expression REGEXP to align with. |
| 404 | only need to supply the characters to be lined up and any preceding | ||
| 405 | whitespace is replaced. If a prefix arg was specified, the full | ||
| 406 | regexp with parenthesized whitespace should be supplied; it will also | ||
| 407 | prompt for which parenthesis GROUP within REGEXP to modify, the amount | ||
| 408 | of SPACING to use, and whether or not to REPEAT the rule throughout | ||
| 409 | the line. See `align-rules-list' for more information about these | ||
| 410 | options. | ||
| 411 | 404 | ||
| 412 | For example, let's say you had a list of phone numbers, and wanted to | 405 | For example, let's say you had a list of phone numbers, and wanted to |
| 413 | align them so that the opening parentheses would line up: | 406 | align them so that the opening parentheses would line up: |
| @@ -418,8 +411,29 @@ align them so that the opening parentheses would line up: | |||
| 418 | Joe (123) 456-7890 | 411 | Joe (123) 456-7890 |
| 419 | 412 | ||
| 420 | There is no predefined rule to handle this, but you could easily do it | 413 | There is no predefined rule to handle this, but you could easily do it |
| 421 | using a REGEXP like \"(\". All you would have to do is to mark the | 414 | using a REGEXP like \"(\". Interactively, all you would have to do is |
| 422 | region, call `align-regexp' and type in that regular expression. | 415 | to mark the region, call `align-regexp' and enter that regular expression. |
| 416 | |||
| 417 | REGEXP must contain at least one parenthesized subexpression, typically | ||
| 418 | whitespace of the form \"\\\\(\\\\s-*\\\\)\". In normal interactive use, | ||
| 419 | this is automatically added to the start of your regular expression after | ||
| 420 | you enter it. You only need to supply the characters to be lined up, and | ||
| 421 | any preceding whitespace is replaced. | ||
| 422 | |||
| 423 | If you specify a prefix argument (or use this function non-interactively), | ||
| 424 | you must enter the full regular expression, including the subexpression. | ||
| 425 | The function also then prompts for which subexpression parenthesis GROUP | ||
| 426 | \(default 1) within REGEXP to modify, the amount of SPACING (default | ||
| 427 | `align-default-spacing') to use, and whether or not to REPEAT the rule | ||
| 428 | throughout the line. | ||
| 429 | |||
| 430 | See `align-rules-list' for more information about these options. | ||
| 431 | |||
| 432 | The non-interactive form of the previous example would look something like: | ||
| 433 | (align-regexp (point-min) (point-max) \"\\\\(\\\\s-*\\\\)(\") | ||
| 434 | |||
| 435 | This function is a nothing more than a small wrapper that helps you | ||
| 436 | construct a rule to pass to `align-region', which does the real work. | ||
| 423 | 437 | ||
| 424 | \(fn BEG END REGEXP &optional GROUP SPACING REPEAT)" t nil) | 438 | \(fn BEG END REGEXP &optional GROUP SPACING REPEAT)" t nil) |
| 425 | 439 | ||
| @@ -464,9 +478,9 @@ A replacement function for `newline-and-indent', aligning as it goes. | |||
| 464 | 478 | ||
| 465 | ;;;*** | 479 | ;;;*** |
| 466 | 480 | ||
| 467 | ;;;### (autoloads nil "allout" "allout.el" (20932 10282 564846 0)) | 481 | ;;;### (autoloads nil "allout" "allout.el" (20996 49577 892030 0)) |
| 468 | ;;; Generated autoloads from allout.el | 482 | ;;; Generated autoloads from allout.el |
| 469 | (push (purecopy (quote (allout 2 3))) package--builtin-versions) | 483 | (push (purecopy '(allout 2 3)) package--builtin-versions) |
| 470 | (autoload 'allout-auto-activation-helper "allout" "\ | 484 | (autoload 'allout-auto-activation-helper "allout" "\ |
| 471 | Institute `allout-auto-activation'. | 485 | Institute `allout-auto-activation'. |
| 472 | 486 | ||
| @@ -823,10 +837,10 @@ for details on preparing Emacs for automatic allout activation. | |||
| 823 | 837 | ||
| 824 | ;;;*** | 838 | ;;;*** |
| 825 | 839 | ||
| 826 | ;;;### (autoloads nil "allout-widgets" "allout-widgets.el" (20932 | 840 | ;;;### (autoloads nil "allout-widgets" "allout-widgets.el" (20996 |
| 827 | ;;;;;; 61699 522706 0)) | 841 | ;;;;;; 49577 892030 0)) |
| 828 | ;;; Generated autoloads from allout-widgets.el | 842 | ;;; Generated autoloads from allout-widgets.el |
| 829 | (push (purecopy (quote (allout-widgets 1 0))) package--builtin-versions) | 843 | (push (purecopy '(allout-widgets 1 0)) package--builtin-versions) |
| 830 | (let ((loads (get 'allout-widgets 'custom-loads))) (if (member '"allout-widgets" loads) nil (put 'allout-widgets 'custom-loads (cons '"allout-widgets" loads)))) | 844 | (let ((loads (get 'allout-widgets 'custom-loads))) (if (member '"allout-widgets" loads) nil (put 'allout-widgets 'custom-loads (cons '"allout-widgets" loads)))) |
| 831 | 845 | ||
| 832 | (autoload 'allout-widgets-setup "allout-widgets" "\ | 846 | (autoload 'allout-widgets-setup "allout-widgets" "\ |
| @@ -883,7 +897,7 @@ outline hot-spot navigation (see `allout-mode'). | |||
| 883 | 897 | ||
| 884 | ;;;*** | 898 | ;;;*** |
| 885 | 899 | ||
| 886 | ;;;### (autoloads nil "ange-ftp" "net/ange-ftp.el" (20843 54187 671468 | 900 | ;;;### (autoloads nil "ange-ftp" "net/ange-ftp.el" (21005 64551 555603 |
| 887 | ;;;;;; 0)) | 901 | ;;;;;; 0)) |
| 888 | ;;; Generated autoloads from net/ange-ftp.el | 902 | ;;; Generated autoloads from net/ange-ftp.el |
| 889 | 903 | ||
| @@ -938,10 +952,10 @@ the buffer *Birthday-Present-for-Name*. | |||
| 938 | 952 | ||
| 939 | ;;;*** | 953 | ;;;*** |
| 940 | 954 | ||
| 941 | ;;;### (autoloads nil "ansi-color" "ansi-color.el" (20930 54950 26050 | 955 | ;;;### (autoloads nil "ansi-color" "ansi-color.el" (20975 43430 521692 |
| 942 | ;;;;;; 0)) | 956 | ;;;;;; 0)) |
| 943 | ;;; Generated autoloads from ansi-color.el | 957 | ;;; Generated autoloads from ansi-color.el |
| 944 | (push (purecopy (quote (ansi-color 3 4 2))) package--builtin-versions) | 958 | (push (purecopy '(ansi-color 3 4 2)) package--builtin-versions) |
| 945 | (autoload 'ansi-color-for-comint-mode-on "ansi-color" "\ | 959 | (autoload 'ansi-color-for-comint-mode-on "ansi-color" "\ |
| 946 | Set `ansi-color-for-comint-mode' to t. | 960 | Set `ansi-color-for-comint-mode' to t. |
| 947 | 961 | ||
| @@ -964,10 +978,10 @@ This is a good function to put in `comint-output-filter-functions'. | |||
| 964 | 978 | ||
| 965 | ;;;*** | 979 | ;;;*** |
| 966 | 980 | ||
| 967 | ;;;### (autoloads nil "antlr-mode" "progmodes/antlr-mode.el" (20709 | 981 | ;;;### (autoloads nil "antlr-mode" "progmodes/antlr-mode.el" (21022 |
| 968 | ;;;;;; 26818 907104 0)) | 982 | ;;;;;; 34805 522289 827000)) |
| 969 | ;;; Generated autoloads from progmodes/antlr-mode.el | 983 | ;;; Generated autoloads from progmodes/antlr-mode.el |
| 970 | (push (purecopy (quote (antlr-mode 2 2 3))) package--builtin-versions) | 984 | (push (purecopy '(antlr-mode 2 2 3)) package--builtin-versions) |
| 971 | (autoload 'antlr-show-makefile-rules "antlr-mode" "\ | 985 | (autoload 'antlr-show-makefile-rules "antlr-mode" "\ |
| 972 | Show Makefile rules for all grammar files in the current directory. | 986 | Show Makefile rules for all grammar files in the current directory. |
| 973 | If the `major-mode' of the current buffer has the value `makefile-mode', | 987 | If the `major-mode' of the current buffer has the value `makefile-mode', |
| @@ -1000,7 +1014,7 @@ Used in `antlr-mode'. Also a useful function in `java-mode-hook'. | |||
| 1000 | 1014 | ||
| 1001 | ;;;*** | 1015 | ;;;*** |
| 1002 | 1016 | ||
| 1003 | ;;;### (autoloads nil "appt" "calendar/appt.el" (20709 26818 907104 | 1017 | ;;;### (autoloads nil "appt" "calendar/appt.el" (20992 52525 458637 |
| 1004 | ;;;;;; 0)) | 1018 | ;;;;;; 0)) |
| 1005 | ;;; Generated autoloads from calendar/appt.el | 1019 | ;;; Generated autoloads from calendar/appt.el |
| 1006 | 1020 | ||
| @@ -1022,7 +1036,8 @@ ARG is positive, otherwise off. | |||
| 1022 | 1036 | ||
| 1023 | ;;;*** | 1037 | ;;;*** |
| 1024 | 1038 | ||
| 1025 | ;;;### (autoloads nil "apropos" "apropos.el" (20716 56 356960 0)) | 1039 | ;;;### (autoloads nil "apropos" "apropos.el" (20991 31656 363459 |
| 1040 | ;;;;;; 0)) | ||
| 1026 | ;;; Generated autoloads from apropos.el | 1041 | ;;; Generated autoloads from apropos.el |
| 1027 | 1042 | ||
| 1028 | (autoload 'apropos-read-pattern "apropos" "\ | 1043 | (autoload 'apropos-read-pattern "apropos" "\ |
| @@ -1232,7 +1247,7 @@ Entering array mode calls the function `array-mode-hook'. | |||
| 1232 | ;;;### (autoloads nil "artist" "textmodes/artist.el" (20891 18859 | 1247 | ;;;### (autoloads nil "artist" "textmodes/artist.el" (20891 18859 |
| 1233 | ;;;;;; 893295 0)) | 1248 | ;;;;;; 893295 0)) |
| 1234 | ;;; Generated autoloads from textmodes/artist.el | 1249 | ;;; Generated autoloads from textmodes/artist.el |
| 1235 | (push (purecopy (quote (artist 1 2 6))) package--builtin-versions) | 1250 | (push (purecopy '(artist 1 2 6)) package--builtin-versions) |
| 1236 | (autoload 'artist-mode "artist" "\ | 1251 | (autoload 'artist-mode "artist" "\ |
| 1237 | Toggle Artist mode. | 1252 | Toggle Artist mode. |
| 1238 | With argument ARG, turn Artist mode on if ARG is positive. | 1253 | With argument ARG, turn Artist mode on if ARG is positive. |
| @@ -1463,8 +1478,8 @@ Special commands: | |||
| 1463 | 1478 | ||
| 1464 | ;;;*** | 1479 | ;;;*** |
| 1465 | 1480 | ||
| 1466 | ;;;### (autoloads nil "auth-source" "gnus/auth-source.el" (20929 | 1481 | ;;;### (autoloads nil "auth-source" "gnus/auth-source.el" (20953 |
| 1467 | ;;;;;; 34089 117790 0)) | 1482 | ;;;;;; 16424 151515 0)) |
| 1468 | ;;; Generated autoloads from gnus/auth-source.el | 1483 | ;;; Generated autoloads from gnus/auth-source.el |
| 1469 | 1484 | ||
| 1470 | (defvar auth-source-cache-expiry 7200 "\ | 1485 | (defvar auth-source-cache-expiry 7200 "\ |
| @@ -1548,7 +1563,7 @@ Major mode for editing Autoconf configure.ac files. | |||
| 1548 | 1563 | ||
| 1549 | ;;;*** | 1564 | ;;;*** |
| 1550 | 1565 | ||
| 1551 | ;;;### (autoloads nil "autoinsert" "autoinsert.el" (20709 26818 907104 | 1566 | ;;;### (autoloads nil "autoinsert" "autoinsert.el" (20950 40231 187426 |
| 1552 | ;;;;;; 0)) | 1567 | ;;;;;; 0)) |
| 1553 | ;;; Generated autoloads from autoinsert.el | 1568 | ;;; Generated autoloads from autoinsert.el |
| 1554 | 1569 | ||
| @@ -1587,8 +1602,8 @@ insert a template for the file depending on the mode of the buffer. | |||
| 1587 | 1602 | ||
| 1588 | ;;;*** | 1603 | ;;;*** |
| 1589 | 1604 | ||
| 1590 | ;;;### (autoloads nil "autoload" "emacs-lisp/autoload.el" (20925 | 1605 | ;;;### (autoloads nil "autoload" "emacs-lisp/autoload.el" (20974 |
| 1591 | ;;;;;; 37032 237257 0)) | 1606 | ;;;;;; 22577 548213 0)) |
| 1592 | ;;; Generated autoloads from emacs-lisp/autoload.el | 1607 | ;;; Generated autoloads from emacs-lisp/autoload.el |
| 1593 | 1608 | ||
| 1594 | (put 'generated-autoload-file 'safe-local-variable 'stringp) | 1609 | (put 'generated-autoload-file 'safe-local-variable 'stringp) |
| @@ -1637,7 +1652,7 @@ should be non-nil). | |||
| 1637 | 1652 | ||
| 1638 | ;;;*** | 1653 | ;;;*** |
| 1639 | 1654 | ||
| 1640 | ;;;### (autoloads nil "autorevert" "autorevert.el" (20912 25000 802412 | 1655 | ;;;### (autoloads nil "autorevert" "autorevert.el" (20987 34598 970563 |
| 1641 | ;;;;;; 0)) | 1656 | ;;;;;; 0)) |
| 1642 | ;;; Generated autoloads from autorevert.el | 1657 | ;;; Generated autoloads from autorevert.el |
| 1643 | 1658 | ||
| @@ -1726,7 +1741,7 @@ specifies in the mode line. | |||
| 1726 | 1741 | ||
| 1727 | ;;;*** | 1742 | ;;;*** |
| 1728 | 1743 | ||
| 1729 | ;;;### (autoloads nil "avoid" "avoid.el" (20709 26818 907104 0)) | 1744 | ;;;### (autoloads nil "avoid" "avoid.el" (21024 28968 738399 0)) |
| 1730 | ;;; Generated autoloads from avoid.el | 1745 | ;;; Generated autoloads from avoid.el |
| 1731 | 1746 | ||
| 1732 | (defvar mouse-avoidance-mode nil "\ | 1747 | (defvar mouse-avoidance-mode nil "\ |
| @@ -1766,6 +1781,25 @@ definition of \"random distance\".) | |||
| 1766 | 1781 | ||
| 1767 | ;;;*** | 1782 | ;;;*** |
| 1768 | 1783 | ||
| 1784 | ;;;### (autoloads nil "bat-mode" "progmodes/bat-mode.el" (21024 28968 | ||
| 1785 | ;;;;;; 738399 0)) | ||
| 1786 | ;;; Generated autoloads from progmodes/bat-mode.el | ||
| 1787 | |||
| 1788 | (add-to-list 'auto-mode-alist '("\\.\\(bat\\|cmd\\)\\'" . bat-mode)) | ||
| 1789 | |||
| 1790 | (autoload 'bat-mode "bat-mode" "\ | ||
| 1791 | Major mode for editing DOS/Windows batch files. | ||
| 1792 | |||
| 1793 | Start a new script from `bat-template'. Read help pages for DOS commands | ||
| 1794 | with `bat-cmd-help'. Navigate between sections using `imenu'. | ||
| 1795 | Run script using `bat-run' and `bat-run-args'. | ||
| 1796 | |||
| 1797 | \\{bat-mode-map} | ||
| 1798 | |||
| 1799 | \(fn)" t nil) | ||
| 1800 | |||
| 1801 | ;;;*** | ||
| 1802 | |||
| 1769 | ;;;### (autoloads nil "battery" "battery.el" (20791 9657 561026 0)) | 1803 | ;;;### (autoloads nil "battery" "battery.el" (20791 9657 561026 0)) |
| 1770 | ;;; Generated autoloads from battery.el | 1804 | ;;; Generated autoloads from battery.el |
| 1771 | (put 'battery-mode-line-string 'risky-local-variable t) | 1805 | (put 'battery-mode-line-string 'risky-local-variable t) |
| @@ -2086,8 +2120,8 @@ a reflection. | |||
| 2086 | 2120 | ||
| 2087 | ;;;*** | 2121 | ;;;*** |
| 2088 | 2122 | ||
| 2089 | ;;;### (autoloads nil "bookmark" "bookmark.el" (20874 65006 176325 | 2123 | ;;;### (autoloads nil "bookmark" "bookmark.el" (20998 4934 952905 |
| 2090 | ;;;;;; 548000)) | 2124 | ;;;;;; 0)) |
| 2091 | ;;; Generated autoloads from bookmark.el | 2125 | ;;; Generated autoloads from bookmark.el |
| 2092 | (define-key ctl-x-r-map "b" 'bookmark-jump) | 2126 | (define-key ctl-x-r-map "b" 'bookmark-jump) |
| 2093 | (define-key ctl-x-r-map "m" 'bookmark-set) | 2127 | (define-key ctl-x-r-map "m" 'bookmark-set) |
| @@ -2280,8 +2314,8 @@ Incremental search of bookmarks, hiding the non-matches as we go. | |||
| 2280 | 2314 | ||
| 2281 | ;;;*** | 2315 | ;;;*** |
| 2282 | 2316 | ||
| 2283 | ;;;### (autoloads nil "browse-url" "net/browse-url.el" (20929 34089 | 2317 | ;;;### (autoloads nil "browse-url" "net/browse-url.el" (20984 58408 |
| 2284 | ;;;;;; 117790 0)) | 2318 | ;;;;;; 354075 0)) |
| 2285 | ;;; Generated autoloads from net/browse-url.el | 2319 | ;;; Generated autoloads from net/browse-url.el |
| 2286 | 2320 | ||
| 2287 | (defvar browse-url-browser-function 'browse-url-default-browser "\ | 2321 | (defvar browse-url-browser-function 'browse-url-default-browser "\ |
| @@ -2596,9 +2630,9 @@ from `browse-url-elinks-wrapper'. | |||
| 2596 | 2630 | ||
| 2597 | ;;;*** | 2631 | ;;;*** |
| 2598 | 2632 | ||
| 2599 | ;;;### (autoloads nil "bs" "bs.el" (20933 31141 450159 0)) | 2633 | ;;;### (autoloads nil "bs" "bs.el" (20992 52525 458637 0)) |
| 2600 | ;;; Generated autoloads from bs.el | 2634 | ;;; Generated autoloads from bs.el |
| 2601 | (push (purecopy (quote (bs 1 17))) package--builtin-versions) | 2635 | (push (purecopy '(bs 1 17)) package--builtin-versions) |
| 2602 | (autoload 'bs-cycle-next "bs" "\ | 2636 | (autoload 'bs-cycle-next "bs" "\ |
| 2603 | Select next buffer defined by buffer cycling. | 2637 | Select next buffer defined by buffer cycling. |
| 2604 | The buffers taking part in buffer cycling are defined | 2638 | The buffers taking part in buffer cycling are defined |
| @@ -2679,8 +2713,8 @@ Like `bug-reference-mode', but only buttonize in comments and strings. | |||
| 2679 | 2713 | ||
| 2680 | ;;;*** | 2714 | ;;;*** |
| 2681 | 2715 | ||
| 2682 | ;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (20929 | 2716 | ;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (21024 |
| 2683 | ;;;;;; 34089 117790 0)) | 2717 | ;;;;;; 55496 462544 366000)) |
| 2684 | ;;; Generated autoloads from emacs-lisp/bytecomp.el | 2718 | ;;; Generated autoloads from emacs-lisp/bytecomp.el |
| 2685 | (put 'byte-compile-dynamic 'safe-local-variable 'booleanp) | 2719 | (put 'byte-compile-dynamic 'safe-local-variable 'booleanp) |
| 2686 | (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp) | 2720 | (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp) |
| @@ -2800,8 +2834,8 @@ and corresponding effects. | |||
| 2800 | 2834 | ||
| 2801 | ;;;*** | 2835 | ;;;*** |
| 2802 | 2836 | ||
| 2803 | ;;;### (autoloads nil "cal-china" "calendar/cal-china.el" (20709 | 2837 | ;;;### (autoloads nil "cal-china" "calendar/cal-china.el" (21023 |
| 2804 | ;;;;;; 26818 907104 0)) | 2838 | ;;;;;; 8104 618865 0)) |
| 2805 | ;;; Generated autoloads from calendar/cal-china.el | 2839 | ;;; Generated autoloads from calendar/cal-china.el |
| 2806 | 2840 | ||
| 2807 | (put 'calendar-chinese-time-zone 'risky-local-variable t) | 2841 | (put 'calendar-chinese-time-zone 'risky-local-variable t) |
| @@ -2837,7 +2871,7 @@ from the cursor position. | |||
| 2837 | 2871 | ||
| 2838 | ;;;*** | 2872 | ;;;*** |
| 2839 | 2873 | ||
| 2840 | ;;;### (autoloads nil "calc" "calc/calc.el" (20932 10282 564846 0)) | 2874 | ;;;### (autoloads nil "calc" "calc/calc.el" (20998 4934 952905 0)) |
| 2841 | ;;; Generated autoloads from calc/calc.el | 2875 | ;;; Generated autoloads from calc/calc.el |
| 2842 | (define-key ctl-x-map "*" 'calc-dispatch) | 2876 | (define-key ctl-x-map "*" 'calc-dispatch) |
| 2843 | 2877 | ||
| @@ -2932,7 +2966,7 @@ See Info node `(calc)Defining Functions'. | |||
| 2932 | 2966 | ||
| 2933 | ;;;*** | 2967 | ;;;*** |
| 2934 | 2968 | ||
| 2935 | ;;;### (autoloads nil "calculator" "calculator.el" (20891 18859 893295 | 2969 | ;;;### (autoloads nil "calculator" "calculator.el" (21024 28968 738399 |
| 2936 | ;;;;;; 0)) | 2970 | ;;;;;; 0)) |
| 2937 | ;;; Generated autoloads from calculator.el | 2971 | ;;; Generated autoloads from calculator.el |
| 2938 | 2972 | ||
| @@ -2944,8 +2978,8 @@ See the documentation for `calculator-mode' for more information. | |||
| 2944 | 2978 | ||
| 2945 | ;;;*** | 2979 | ;;;*** |
| 2946 | 2980 | ||
| 2947 | ;;;### (autoloads nil "calendar" "calendar/calendar.el" (20762 9398 | 2981 | ;;;### (autoloads nil "calendar" "calendar/calendar.el" (20993 36675 |
| 2948 | ;;;;;; 526093 0)) | 2982 | ;;;;;; 840108 928000)) |
| 2949 | ;;; Generated autoloads from calendar/calendar.el | 2983 | ;;; Generated autoloads from calendar/calendar.el |
| 2950 | 2984 | ||
| 2951 | (autoload 'calendar "calendar" "\ | 2985 | (autoload 'calendar "calendar" "\ |
| @@ -3053,8 +3087,8 @@ Obsoletes `c-forward-into-nomenclature'. | |||
| 3053 | 3087 | ||
| 3054 | ;;;*** | 3088 | ;;;*** |
| 3055 | 3089 | ||
| 3056 | ;;;### (autoloads nil "cc-engine" "progmodes/cc-engine.el" (20911 | 3090 | ;;;### (autoloads nil "cc-engine" "progmodes/cc-engine.el" (21023 |
| 3057 | ;;;;;; 4138 279475 0)) | 3091 | ;;;;;; 33771 640838 743000)) |
| 3058 | ;;; Generated autoloads from progmodes/cc-engine.el | 3092 | ;;; Generated autoloads from progmodes/cc-engine.el |
| 3059 | 3093 | ||
| 3060 | (autoload 'c-guess-basic-syntax "cc-engine" "\ | 3094 | (autoload 'c-guess-basic-syntax "cc-engine" "\ |
| @@ -3163,8 +3197,8 @@ the absolute file name of the file if STYLE-NAME is nil. | |||
| 3163 | 3197 | ||
| 3164 | ;;;*** | 3198 | ;;;*** |
| 3165 | 3199 | ||
| 3166 | ;;;### (autoloads nil "cc-mode" "progmodes/cc-mode.el" (20907 7082 | 3200 | ;;;### (autoloads nil "cc-mode" "progmodes/cc-mode.el" (21022 34805 |
| 3167 | ;;;;;; 901087 0)) | 3201 | ;;;;;; 23711 194000)) |
| 3168 | ;;; Generated autoloads from progmodes/cc-mode.el | 3202 | ;;; Generated autoloads from progmodes/cc-mode.el |
| 3169 | 3203 | ||
| 3170 | (autoload 'c-initialize-cc-mode "cc-mode" "\ | 3204 | (autoload 'c-initialize-cc-mode "cc-mode" "\ |
| @@ -3176,9 +3210,6 @@ only some basic setup is done, and a call to `c-init-language-vars' or | |||
| 3176 | control). See \"cc-mode.el\" for more info. | 3210 | control). See \"cc-mode.el\" for more info. |
| 3177 | 3211 | ||
| 3178 | \(fn &optional NEW-STYLE-INIT)" nil nil) | 3212 | \(fn &optional NEW-STYLE-INIT)" nil nil) |
| 3179 | |||
| 3180 | (defvar c-mode-syntax-table nil "\ | ||
| 3181 | Syntax table used in c-mode buffers.") | ||
| 3182 | (add-to-list 'auto-mode-alist '("\\.\\(cc\\|hh\\)\\'" . c++-mode)) | 3213 | (add-to-list 'auto-mode-alist '("\\.\\(cc\\|hh\\)\\'" . c++-mode)) |
| 3183 | (add-to-list 'auto-mode-alist '("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode)) | 3214 | (add-to-list 'auto-mode-alist '("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode)) |
| 3184 | (add-to-list 'auto-mode-alist '("\\.\\(CC?\\|HH?\\)\\'" . c++-mode)) | 3215 | (add-to-list 'auto-mode-alist '("\\.\\(CC?\\|HH?\\)\\'" . c++-mode)) |
| @@ -3205,9 +3236,6 @@ Key bindings: | |||
| 3205 | 3236 | ||
| 3206 | \(fn)" t nil) | 3237 | \(fn)" t nil) |
| 3207 | 3238 | ||
| 3208 | (defvar c++-mode-syntax-table nil "\ | ||
| 3209 | Syntax table used in c++-mode buffers.") | ||
| 3210 | |||
| 3211 | (autoload 'c++-mode "cc-mode" "\ | 3239 | (autoload 'c++-mode "cc-mode" "\ |
| 3212 | Major mode for editing C++ code. | 3240 | Major mode for editing C++ code. |
| 3213 | To submit a problem report, enter `\\[c-submit-bug-report]' from a | 3241 | To submit a problem report, enter `\\[c-submit-bug-report]' from a |
| @@ -3225,9 +3253,6 @@ Key bindings: | |||
| 3225 | \\{c++-mode-map} | 3253 | \\{c++-mode-map} |
| 3226 | 3254 | ||
| 3227 | \(fn)" t nil) | 3255 | \(fn)" t nil) |
| 3228 | |||
| 3229 | (defvar objc-mode-syntax-table nil "\ | ||
| 3230 | Syntax table used in objc-mode buffers.") | ||
| 3231 | (add-to-list 'auto-mode-alist '("\\.m\\'" . objc-mode)) | 3256 | (add-to-list 'auto-mode-alist '("\\.m\\'" . objc-mode)) |
| 3232 | 3257 | ||
| 3233 | (autoload 'objc-mode "cc-mode" "\ | 3258 | (autoload 'objc-mode "cc-mode" "\ |
| @@ -3247,9 +3272,6 @@ Key bindings: | |||
| 3247 | \\{objc-mode-map} | 3272 | \\{objc-mode-map} |
| 3248 | 3273 | ||
| 3249 | \(fn)" t nil) | 3274 | \(fn)" t nil) |
| 3250 | |||
| 3251 | (defvar java-mode-syntax-table nil "\ | ||
| 3252 | Syntax table used in java-mode buffers.") | ||
| 3253 | (add-to-list 'auto-mode-alist '("\\.java\\'" . java-mode)) | 3275 | (add-to-list 'auto-mode-alist '("\\.java\\'" . java-mode)) |
| 3254 | 3276 | ||
| 3255 | (autoload 'java-mode "cc-mode" "\ | 3277 | (autoload 'java-mode "cc-mode" "\ |
| @@ -3269,9 +3291,6 @@ Key bindings: | |||
| 3269 | \\{java-mode-map} | 3291 | \\{java-mode-map} |
| 3270 | 3292 | ||
| 3271 | \(fn)" t nil) | 3293 | \(fn)" t nil) |
| 3272 | |||
| 3273 | (defvar idl-mode-syntax-table nil "\ | ||
| 3274 | Syntax table used in idl-mode buffers.") | ||
| 3275 | (add-to-list 'auto-mode-alist '("\\.idl\\'" . idl-mode)) | 3294 | (add-to-list 'auto-mode-alist '("\\.idl\\'" . idl-mode)) |
| 3276 | 3295 | ||
| 3277 | (autoload 'idl-mode "cc-mode" "\ | 3296 | (autoload 'idl-mode "cc-mode" "\ |
| @@ -3291,9 +3310,6 @@ Key bindings: | |||
| 3291 | \\{idl-mode-map} | 3310 | \\{idl-mode-map} |
| 3292 | 3311 | ||
| 3293 | \(fn)" t nil) | 3312 | \(fn)" t nil) |
| 3294 | |||
| 3295 | (defvar pike-mode-syntax-table nil "\ | ||
| 3296 | Syntax table used in pike-mode buffers.") | ||
| 3297 | (add-to-list 'auto-mode-alist '("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mode)) | 3313 | (add-to-list 'auto-mode-alist '("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mode)) |
| 3298 | (add-to-list 'interpreter-mode-alist '("pike" . pike-mode)) | 3314 | (add-to-list 'interpreter-mode-alist '("pike" . pike-mode)) |
| 3299 | 3315 | ||
| @@ -3662,8 +3678,8 @@ See the documentation of `define-ccl-program' for the detail of CCL program. | |||
| 3662 | 3678 | ||
| 3663 | ;;;*** | 3679 | ;;;*** |
| 3664 | 3680 | ||
| 3665 | ;;;### (autoloads nil "cconv" "emacs-lisp/cconv.el" (20922 60838 | 3681 | ;;;### (autoloads nil "cconv" "emacs-lisp/cconv.el" (21021 52778 |
| 3666 | ;;;;;; 997229 0)) | 3682 | ;;;;;; 175609 0)) |
| 3667 | ;;; Generated autoloads from emacs-lisp/cconv.el | 3683 | ;;; Generated autoloads from emacs-lisp/cconv.el |
| 3668 | 3684 | ||
| 3669 | (autoload 'cconv-closure-convert "cconv" "\ | 3685 | (autoload 'cconv-closure-convert "cconv" "\ |
| @@ -3682,16 +3698,16 @@ Add the warnings that closure conversion would encounter. | |||
| 3682 | 3698 | ||
| 3683 | ;;;*** | 3699 | ;;;*** |
| 3684 | 3700 | ||
| 3685 | ;;;### (autoloads nil "cedet" "cedet/cedet.el" (20748 62911 684442 | 3701 | ;;;### (autoloads nil "cedet" "cedet/cedet.el" (20983 37555 279226 |
| 3686 | ;;;;;; 0)) | 3702 | ;;;;;; 0)) |
| 3687 | ;;; Generated autoloads from cedet/cedet.el | 3703 | ;;; Generated autoloads from cedet/cedet.el |
| 3688 | (push (purecopy (quote (cedet 2 0))) package--builtin-versions) | 3704 | (push (purecopy '(cedet 2 0)) package--builtin-versions) |
| 3689 | ;;;*** | 3705 | ;;;*** |
| 3690 | 3706 | ||
| 3691 | ;;;### (autoloads nil "cfengine" "progmodes/cfengine.el" (20929 34089 | 3707 | ;;;### (autoloads nil "cfengine" "progmodes/cfengine.el" (20958 34345 |
| 3692 | ;;;;;; 117790 0)) | 3708 | ;;;;;; 952538 0)) |
| 3693 | ;;; Generated autoloads from progmodes/cfengine.el | 3709 | ;;; Generated autoloads from progmodes/cfengine.el |
| 3694 | (push (purecopy (quote (cfengine 1 2))) package--builtin-versions) | 3710 | (push (purecopy '(cfengine 1 2)) package--builtin-versions) |
| 3695 | (autoload 'cfengine3-mode "cfengine" "\ | 3711 | (autoload 'cfengine3-mode "cfengine" "\ |
| 3696 | Major mode for editing CFEngine3 input. | 3712 | Major mode for editing CFEngine3 input. |
| 3697 | There are no special keybindings by default. | 3713 | There are no special keybindings by default. |
| @@ -3721,7 +3737,7 @@ on the buffer contents | |||
| 3721 | ;;;### (autoloads nil "chart" "emacs-lisp/chart.el" (20895 15912 | 3737 | ;;;### (autoloads nil "chart" "emacs-lisp/chart.el" (20895 15912 |
| 3722 | ;;;;;; 444844 0)) | 3738 | ;;;;;; 444844 0)) |
| 3723 | ;;; Generated autoloads from emacs-lisp/chart.el | 3739 | ;;; Generated autoloads from emacs-lisp/chart.el |
| 3724 | (push (purecopy (quote (chart 0 2))) package--builtin-versions) | 3740 | (push (purecopy '(chart 0 2)) package--builtin-versions) |
| 3725 | ;;;*** | 3741 | ;;;*** |
| 3726 | 3742 | ||
| 3727 | ;;;### (autoloads nil "check-declare" "emacs-lisp/check-declare.el" | 3743 | ;;;### (autoloads nil "check-declare" "emacs-lisp/check-declare.el" |
| @@ -3742,19 +3758,24 @@ Returns non-nil if any false statements are found. | |||
| 3742 | 3758 | ||
| 3743 | ;;;*** | 3759 | ;;;*** |
| 3744 | 3760 | ||
| 3745 | ;;;### (autoloads nil "checkdoc" "emacs-lisp/checkdoc.el" (20893 | 3761 | ;;;### (autoloads nil "checkdoc" "emacs-lisp/checkdoc.el" (20996 |
| 3746 | ;;;;;; 60586 188550 0)) | 3762 | ;;;;;; 49577 892030 0)) |
| 3747 | ;;; Generated autoloads from emacs-lisp/checkdoc.el | 3763 | ;;; Generated autoloads from emacs-lisp/checkdoc.el |
| 3748 | (push (purecopy (quote (checkdoc 0 6 2))) package--builtin-versions)(put 'checkdoc-force-docstrings-flag 'safe-local-variable 'booleanp) | 3764 | (push (purecopy '(checkdoc 0 6 2)) package--builtin-versions)(put 'checkdoc-force-docstrings-flag 'safe-local-variable #'booleanp) |
| 3749 | (put 'checkdoc-force-history-flag 'safe-local-variable 'booleanp) | 3765 | (put 'checkdoc-force-history-flag 'safe-local-variable #'booleanp) |
| 3750 | (put 'checkdoc-permit-comma-termination-flag 'safe-local-variable 'booleanp) | 3766 | (put 'checkdoc-permit-comma-termination-flag 'safe-local-variable #'booleanp) |
| 3751 | (put 'checkdoc-arguments-in-order-flag 'safe-local-variable 'booleanp) | 3767 | (put 'checkdoc-spellcheck-documentation-flag 'safe-local-variable #'booleanp) |
| 3752 | (put 'checkdoc-symbol-words 'safe-local-variable 'checkdoc-list-of-strings-p) | 3768 | (put 'checkdoc-ispell-list-words 'safe-local-variable #'checkdoc-list-of-strings-p) |
| 3769 | (put 'checkdoc-arguments-in-order-flag 'safe-local-variable #'booleanp) | ||
| 3770 | (put 'checkdoc-verb-check-experimental-flag 'safe-local-variable #'booleanp) | ||
| 3771 | (put 'checkdoc-symbol-words 'safe-local-variable #'checkdoc-list-of-strings-p) | ||
| 3753 | 3772 | ||
| 3754 | (autoload 'checkdoc-list-of-strings-p "checkdoc" "\ | 3773 | (autoload 'checkdoc-list-of-strings-p "checkdoc" "\ |
| 3755 | 3774 | ||
| 3756 | 3775 | ||
| 3757 | \(fn OBJ)" nil nil) | 3776 | \(fn OBJ)" nil nil) |
| 3777 | (put 'checkdoc-proper-noun-regexp 'safe-local-variable 'stringp) | ||
| 3778 | (put 'checkdoc-common-verbs-regexp 'safe-local-variable 'stringp) | ||
| 3758 | 3779 | ||
| 3759 | (autoload 'checkdoc "checkdoc" "\ | 3780 | (autoload 'checkdoc "checkdoc" "\ |
| 3760 | Interactively check the entire buffer for style errors. | 3781 | Interactively check the entire buffer for style errors. |
| @@ -3861,65 +3882,65 @@ space at the end of each line. | |||
| 3861 | (autoload 'checkdoc-ispell "checkdoc" "\ | 3882 | (autoload 'checkdoc-ispell "checkdoc" "\ |
| 3862 | Check the style and spelling of everything interactively. | 3883 | Check the style and spelling of everything interactively. |
| 3863 | Calls `checkdoc' with spell-checking turned on. | 3884 | Calls `checkdoc' with spell-checking turned on. |
| 3864 | Prefix argument TAKE-NOTES is the same as for `checkdoc' | 3885 | Prefix argument is the same as for `checkdoc' |
| 3865 | 3886 | ||
| 3866 | \(fn &optional TAKE-NOTES)" t nil) | 3887 | \(fn)" t nil) |
| 3867 | 3888 | ||
| 3868 | (autoload 'checkdoc-ispell-current-buffer "checkdoc" "\ | 3889 | (autoload 'checkdoc-ispell-current-buffer "checkdoc" "\ |
| 3869 | Check the style and spelling of the current buffer. | 3890 | Check the style and spelling of the current buffer. |
| 3870 | Calls `checkdoc-current-buffer' with spell-checking turned on. | 3891 | Calls `checkdoc-current-buffer' with spell-checking turned on. |
| 3871 | Prefix argument TAKE-NOTES is the same as for `checkdoc-current-buffer' | 3892 | Prefix argument is the same as for `checkdoc-current-buffer' |
| 3872 | 3893 | ||
| 3873 | \(fn &optional TAKE-NOTES)" t nil) | 3894 | \(fn)" t nil) |
| 3874 | 3895 | ||
| 3875 | (autoload 'checkdoc-ispell-interactive "checkdoc" "\ | 3896 | (autoload 'checkdoc-ispell-interactive "checkdoc" "\ |
| 3876 | Check the style and spelling of the current buffer interactively. | 3897 | Check the style and spelling of the current buffer interactively. |
| 3877 | Calls `checkdoc-interactive' with spell-checking turned on. | 3898 | Calls `checkdoc-interactive' with spell-checking turned on. |
| 3878 | Prefix argument TAKE-NOTES is the same as for `checkdoc-interactive' | 3899 | Prefix argument is the same as for `checkdoc-interactive' |
| 3879 | 3900 | ||
| 3880 | \(fn &optional TAKE-NOTES)" t nil) | 3901 | \(fn)" t nil) |
| 3881 | 3902 | ||
| 3882 | (autoload 'checkdoc-ispell-message-interactive "checkdoc" "\ | 3903 | (autoload 'checkdoc-ispell-message-interactive "checkdoc" "\ |
| 3883 | Check the style and spelling of message text interactively. | 3904 | Check the style and spelling of message text interactively. |
| 3884 | Calls `checkdoc-message-interactive' with spell-checking turned on. | 3905 | Calls `checkdoc-message-interactive' with spell-checking turned on. |
| 3885 | Prefix argument TAKE-NOTES is the same as for `checkdoc-message-interactive' | 3906 | Prefix argument is the same as for `checkdoc-message-interactive' |
| 3886 | 3907 | ||
| 3887 | \(fn &optional TAKE-NOTES)" t nil) | 3908 | \(fn)" t nil) |
| 3888 | 3909 | ||
| 3889 | (autoload 'checkdoc-ispell-message-text "checkdoc" "\ | 3910 | (autoload 'checkdoc-ispell-message-text "checkdoc" "\ |
| 3890 | Check the style and spelling of message text interactively. | 3911 | Check the style and spelling of message text interactively. |
| 3891 | Calls `checkdoc-message-text' with spell-checking turned on. | 3912 | Calls `checkdoc-message-text' with spell-checking turned on. |
| 3892 | Prefix argument TAKE-NOTES is the same as for `checkdoc-message-text' | 3913 | Prefix argument is the same as for `checkdoc-message-text' |
| 3893 | 3914 | ||
| 3894 | \(fn &optional TAKE-NOTES)" t nil) | 3915 | \(fn)" t nil) |
| 3895 | 3916 | ||
| 3896 | (autoload 'checkdoc-ispell-start "checkdoc" "\ | 3917 | (autoload 'checkdoc-ispell-start "checkdoc" "\ |
| 3897 | Check the style and spelling of the current buffer. | 3918 | Check the style and spelling of the current buffer. |
| 3898 | Calls `checkdoc-start' with spell-checking turned on. | 3919 | Calls `checkdoc-start' with spell-checking turned on. |
| 3899 | Prefix argument TAKE-NOTES is the same as for `checkdoc-start' | 3920 | Prefix argument is the same as for `checkdoc-start' |
| 3900 | 3921 | ||
| 3901 | \(fn &optional TAKE-NOTES)" t nil) | 3922 | \(fn)" t nil) |
| 3902 | 3923 | ||
| 3903 | (autoload 'checkdoc-ispell-continue "checkdoc" "\ | 3924 | (autoload 'checkdoc-ispell-continue "checkdoc" "\ |
| 3904 | Check the style and spelling of the current buffer after point. | 3925 | Check the style and spelling of the current buffer after point. |
| 3905 | Calls `checkdoc-continue' with spell-checking turned on. | 3926 | Calls `checkdoc-continue' with spell-checking turned on. |
| 3906 | Prefix argument TAKE-NOTES is the same as for `checkdoc-continue' | 3927 | Prefix argument is the same as for `checkdoc-continue' |
| 3907 | 3928 | ||
| 3908 | \(fn &optional TAKE-NOTES)" t nil) | 3929 | \(fn)" t nil) |
| 3909 | 3930 | ||
| 3910 | (autoload 'checkdoc-ispell-comments "checkdoc" "\ | 3931 | (autoload 'checkdoc-ispell-comments "checkdoc" "\ |
| 3911 | Check the style and spelling of the current buffer's comments. | 3932 | Check the style and spelling of the current buffer's comments. |
| 3912 | Calls `checkdoc-comments' with spell-checking turned on. | 3933 | Calls `checkdoc-comments' with spell-checking turned on. |
| 3913 | Prefix argument TAKE-NOTES is the same as for `checkdoc-comments' | 3934 | Prefix argument is the same as for `checkdoc-comments' |
| 3914 | 3935 | ||
| 3915 | \(fn &optional TAKE-NOTES)" t nil) | 3936 | \(fn)" t nil) |
| 3916 | 3937 | ||
| 3917 | (autoload 'checkdoc-ispell-defun "checkdoc" "\ | 3938 | (autoload 'checkdoc-ispell-defun "checkdoc" "\ |
| 3918 | Check the style and spelling of the current defun with Ispell. | 3939 | Check the style and spelling of the current defun with Ispell. |
| 3919 | Calls `checkdoc-defun' with spell-checking turned on. | 3940 | Calls `checkdoc-defun' with spell-checking turned on. |
| 3920 | Prefix argument TAKE-NOTES is the same as for `checkdoc-defun' | 3941 | Prefix argument is the same as for `checkdoc-defun' |
| 3921 | 3942 | ||
| 3922 | \(fn &optional TAKE-NOTES)" t nil) | 3943 | \(fn)" t nil) |
| 3923 | 3944 | ||
| 3924 | (autoload 'checkdoc-minor-mode "checkdoc" "\ | 3945 | (autoload 'checkdoc-minor-mode "checkdoc" "\ |
| 3925 | Toggle automatic docstring checking (Checkdoc minor mode). | 3946 | Toggle automatic docstring checking (Checkdoc minor mode). |
| @@ -4094,10 +4115,10 @@ For example, the function `case' has an indent property | |||
| 4094 | 4115 | ||
| 4095 | ;;;*** | 4116 | ;;;*** |
| 4096 | 4117 | ||
| 4097 | ;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (20932 10282 | 4118 | ;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (20998 4934 |
| 4098 | ;;;;;; 564846 0)) | 4119 | ;;;;;; 952905 0)) |
| 4099 | ;;; Generated autoloads from emacs-lisp/cl-lib.el | 4120 | ;;; Generated autoloads from emacs-lisp/cl-lib.el |
| 4100 | (push (purecopy (quote (cl-lib 1 0))) package--builtin-versions) | 4121 | (push (purecopy '(cl-lib 1 0)) package--builtin-versions) |
| 4101 | (define-obsolete-variable-alias 'custom-print-functions 'cl-custom-print-functions "24.3") | 4122 | (define-obsolete-variable-alias 'custom-print-functions 'cl-custom-print-functions "24.3") |
| 4102 | 4123 | ||
| 4103 | (defvar cl-custom-print-functions nil "\ | 4124 | (defvar cl-custom-print-functions nil "\ |
| @@ -4110,6 +4131,8 @@ printer proceeds to the next function on the list. | |||
| 4110 | This variable is not used at present, but it is defined in hopes that | 4131 | This variable is not used at present, but it is defined in hopes that |
| 4111 | a future Emacs interpreter will be able to use it.") | 4132 | a future Emacs interpreter will be able to use it.") |
| 4112 | 4133 | ||
| 4134 | (define-error 'cl-assertion-failed (purecopy "Assertion failed")) | ||
| 4135 | |||
| 4113 | (autoload 'cl--defsubst-expand "cl-macs") | 4136 | (autoload 'cl--defsubst-expand "cl-macs") |
| 4114 | 4137 | ||
| 4115 | (put 'cl-defun 'doc-string-elt 3) | 4138 | (put 'cl-defun 'doc-string-elt 3) |
| @@ -4183,7 +4206,7 @@ If FRAME cannot display COLOR, return nil. | |||
| 4183 | 4206 | ||
| 4184 | ;;;*** | 4207 | ;;;*** |
| 4185 | 4208 | ||
| 4186 | ;;;### (autoloads nil "comint" "comint.el" (20932 10282 564846 0)) | 4209 | ;;;### (autoloads nil "comint" "comint.el" (21024 28968 738399 0)) |
| 4187 | ;;; Generated autoloads from comint.el | 4210 | ;;; Generated autoloads from comint.el |
| 4188 | 4211 | ||
| 4189 | (defvar comint-output-filter-functions '(ansi-color-process-output comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) "\ | 4212 | (defvar comint-output-filter-functions '(ansi-color-process-output comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) "\ |
| @@ -4282,8 +4305,8 @@ REGEXP-GROUP is the regular expression group in REGEXP to use. | |||
| 4282 | 4305 | ||
| 4283 | ;;;*** | 4306 | ;;;*** |
| 4284 | 4307 | ||
| 4285 | ;;;### (autoloads nil "compare-w" "vc/compare-w.el" (20871 33574 | 4308 | ;;;### (autoloads nil "compare-w" "vc/compare-w.el" (20992 52525 |
| 4286 | ;;;;;; 214287 0)) | 4309 | ;;;;;; 458637 0)) |
| 4287 | ;;; Generated autoloads from vc/compare-w.el | 4310 | ;;; Generated autoloads from vc/compare-w.el |
| 4288 | 4311 | ||
| 4289 | (autoload 'compare-windows "compare-w" "\ | 4312 | (autoload 'compare-windows "compare-w" "\ |
| @@ -4316,8 +4339,8 @@ on third call it again advances points to the next difference and so on. | |||
| 4316 | 4339 | ||
| 4317 | ;;;*** | 4340 | ;;;*** |
| 4318 | 4341 | ||
| 4319 | ;;;### (autoloads nil "compile" "progmodes/compile.el" (20911 4138 | 4342 | ;;;### (autoloads nil "compile" "progmodes/compile.el" (21002 1963 |
| 4320 | ;;;;;; 279475 0)) | 4343 | ;;;;;; 769129 0)) |
| 4321 | ;;; Generated autoloads from progmodes/compile.el | 4344 | ;;; Generated autoloads from progmodes/compile.el |
| 4322 | 4345 | ||
| 4323 | (defvar compilation-mode-hook nil "\ | 4346 | (defvar compilation-mode-hook nil "\ |
| @@ -4385,7 +4408,9 @@ You might also use mode hooks to specify it in certain modes, like this: | |||
| 4385 | (file-exists-p \"Makefile\")) | 4408 | (file-exists-p \"Makefile\")) |
| 4386 | (set (make-local-variable 'compile-command) | 4409 | (set (make-local-variable 'compile-command) |
| 4387 | (concat \"make -k \" | 4410 | (concat \"make -k \" |
| 4388 | (file-name-sans-extension buffer-file-name))))))") | 4411 | (if buffer-file-name |
| 4412 | (shell-quote-argument | ||
| 4413 | (file-name-sans-extension buffer-file-name))))))))") | ||
| 4389 | 4414 | ||
| 4390 | (custom-autoload 'compile-command "compile" t) | 4415 | (custom-autoload 'compile-command "compile" t) |
| 4391 | (put 'compile-command 'safe-local-variable (lambda (a) (and (stringp a) (or (not (boundp 'compilation-read-command)) compilation-read-command)))) | 4416 | (put 'compile-command 'safe-local-variable (lambda (a) (and (stringp a) (or (not (boundp 'compilation-read-command)) compilation-read-command)))) |
| @@ -4496,8 +4521,8 @@ This is the value of `next-error-function' in Compilation buffers. | |||
| 4496 | 4521 | ||
| 4497 | ;;;*** | 4522 | ;;;*** |
| 4498 | 4523 | ||
| 4499 | ;;;### (autoloads nil "completion" "completion.el" (20884 7264 412929 | 4524 | ;;;### (autoloads nil "completion" "completion.el" (20999 25770 522517 |
| 4500 | ;;;;;; 442000)) | 4525 | ;;;;;; 0)) |
| 4501 | ;;; Generated autoloads from completion.el | 4526 | ;;; Generated autoloads from completion.el |
| 4502 | 4527 | ||
| 4503 | (defvar dynamic-completion-mode nil "\ | 4528 | (defvar dynamic-completion-mode nil "\ |
| @@ -5024,8 +5049,8 @@ INHERIT-INPUT-METHOD. | |||
| 5024 | 5049 | ||
| 5025 | ;;;*** | 5050 | ;;;*** |
| 5026 | 5051 | ||
| 5027 | ;;;### (autoloads nil "css-mode" "textmodes/css-mode.el" (20709 26818 | 5052 | ;;;### (autoloads nil "css-mode" "textmodes/css-mode.el" (21024 28968 |
| 5028 | ;;;;;; 907104 0)) | 5053 | ;;;;;; 738399 0)) |
| 5029 | ;;; Generated autoloads from textmodes/css-mode.el | 5054 | ;;; Generated autoloads from textmodes/css-mode.el |
| 5030 | 5055 | ||
| 5031 | (autoload 'css-mode "css-mode" "\ | 5056 | (autoload 'css-mode "css-mode" "\ |
| @@ -5035,8 +5060,8 @@ Major mode to edit Cascading Style Sheets. | |||
| 5035 | 5060 | ||
| 5036 | ;;;*** | 5061 | ;;;*** |
| 5037 | 5062 | ||
| 5038 | ;;;### (autoloads nil "cua-base" "emulation/cua-base.el" (20709 26818 | 5063 | ;;;### (autoloads nil "cua-base" "emulation/cua-base.el" (20992 52525 |
| 5039 | ;;;;;; 907104 0)) | 5064 | ;;;;;; 458637 0)) |
| 5040 | ;;; Generated autoloads from emulation/cua-base.el | 5065 | ;;; Generated autoloads from emulation/cua-base.el |
| 5041 | 5066 | ||
| 5042 | (defvar cua-mode nil "\ | 5067 | (defvar cua-mode nil "\ |
| @@ -5086,7 +5111,7 @@ Enable CUA selection mode without the C-z/C-x/C-c/C-v bindings. | |||
| 5086 | 5111 | ||
| 5087 | ;;;*** | 5112 | ;;;*** |
| 5088 | 5113 | ||
| 5089 | ;;;### (autoloads nil "cus-edit" "cus-edit.el" (20932 10282 564846 | 5114 | ;;;### (autoloads nil "cus-edit" "cus-edit.el" (21024 28968 738399 |
| 5090 | ;;;;;; 0)) | 5115 | ;;;;;; 0)) |
| 5091 | ;;; Generated autoloads from cus-edit.el | 5116 | ;;; Generated autoloads from cus-edit.el |
| 5092 | 5117 | ||
| @@ -5446,7 +5471,7 @@ Mode used for cvs status output. | |||
| 5446 | ;;;### (autoloads nil "cwarn" "progmodes/cwarn.el" (20709 26818 907104 | 5471 | ;;;### (autoloads nil "cwarn" "progmodes/cwarn.el" (20709 26818 907104 |
| 5447 | ;;;;;; 0)) | 5472 | ;;;;;; 0)) |
| 5448 | ;;; Generated autoloads from progmodes/cwarn.el | 5473 | ;;; Generated autoloads from progmodes/cwarn.el |
| 5449 | (push (purecopy (quote (cwarn 1 3 1))) package--builtin-versions) | 5474 | (push (purecopy '(cwarn 1 3 1)) package--builtin-versions) |
| 5450 | (autoload 'cwarn-mode "cwarn" "\ | 5475 | (autoload 'cwarn-mode "cwarn" "\ |
| 5451 | Minor mode that highlights suspicious C and C++ constructions. | 5476 | Minor mode that highlights suspicious C and C++ constructions. |
| 5452 | 5477 | ||
| @@ -5516,7 +5541,7 @@ If the argument is nil, we return the display table to its standard state. | |||
| 5516 | 5541 | ||
| 5517 | ;;;*** | 5542 | ;;;*** |
| 5518 | 5543 | ||
| 5519 | ;;;### (autoloads nil "dabbrev" "dabbrev.el" (20709 26818 907104 | 5544 | ;;;### (autoloads nil "dabbrev" "dabbrev.el" (20992 52525 458637 |
| 5520 | ;;;;;; 0)) | 5545 | ;;;;;; 0)) |
| 5521 | ;;; Generated autoloads from dabbrev.el | 5546 | ;;; Generated autoloads from dabbrev.el |
| 5522 | (put 'dabbrev-case-fold-search 'risky-local-variable t) | 5547 | (put 'dabbrev-case-fold-search 'risky-local-variable t) |
| @@ -5714,8 +5739,8 @@ There is some minimal font-lock support (see vars | |||
| 5714 | 5739 | ||
| 5715 | ;;;*** | 5740 | ;;;*** |
| 5716 | 5741 | ||
| 5717 | ;;;### (autoloads nil "debug" "emacs-lisp/debug.el" (20709 26818 | 5742 | ;;;### (autoloads nil "debug" "emacs-lisp/debug.el" (21005 64551 |
| 5718 | ;;;;;; 907104 0)) | 5743 | ;;;;;; 555603 0)) |
| 5719 | ;;; Generated autoloads from emacs-lisp/debug.el | 5744 | ;;; Generated autoloads from emacs-lisp/debug.el |
| 5720 | 5745 | ||
| 5721 | (setq debugger 'debug) | 5746 | (setq debugger 'debug) |
| @@ -5790,7 +5815,7 @@ The most useful commands are: | |||
| 5790 | ;;;### (autoloads nil "delim-col" "delim-col.el" (20709 26818 907104 | 5815 | ;;;### (autoloads nil "delim-col" "delim-col.el" (20709 26818 907104 |
| 5791 | ;;;;;; 0)) | 5816 | ;;;;;; 0)) |
| 5792 | ;;; Generated autoloads from delim-col.el | 5817 | ;;; Generated autoloads from delim-col.el |
| 5793 | (push (purecopy (quote (delim-col 2 1))) package--builtin-versions) | 5818 | (push (purecopy '(delim-col 2 1)) package--builtin-versions) |
| 5794 | (autoload 'delimit-columns-customize "delim-col" "\ | 5819 | (autoload 'delimit-columns-customize "delim-col" "\ |
| 5795 | Customization of `columns' group. | 5820 | Customization of `columns' group. |
| 5796 | 5821 | ||
| @@ -5908,7 +5933,7 @@ the first time the mode is used. | |||
| 5908 | 5933 | ||
| 5909 | ;;;*** | 5934 | ;;;*** |
| 5910 | 5935 | ||
| 5911 | ;;;### (autoloads nil "descr-text" "descr-text.el" (20875 30633 412173 | 5936 | ;;;### (autoloads nil "descr-text" "descr-text.el" (21024 28968 738399 |
| 5912 | ;;;;;; 0)) | 5937 | ;;;;;; 0)) |
| 5913 | ;;; Generated autoloads from descr-text.el | 5938 | ;;; Generated autoloads from descr-text.el |
| 5914 | 5939 | ||
| @@ -5943,7 +5968,8 @@ relevant to POS. | |||
| 5943 | 5968 | ||
| 5944 | ;;;*** | 5969 | ;;;*** |
| 5945 | 5970 | ||
| 5946 | ;;;### (autoloads nil "desktop" "desktop.el" (20945 22315 8369 0)) | 5971 | ;;;### (autoloads nil "desktop" "desktop.el" (21005 64551 555603 |
| 5972 | ;;;;;; 0)) | ||
| 5947 | ;;; Generated autoloads from desktop.el | 5973 | ;;; Generated autoloads from desktop.el |
| 5948 | 5974 | ||
| 5949 | (defvar desktop-save-mode nil "\ | 5975 | (defvar desktop-save-mode nil "\ |
| @@ -5971,9 +5997,8 @@ modes are restored automatically; they should not be listed here.") | |||
| 5971 | 5997 | ||
| 5972 | (custom-autoload 'desktop-locals-to-save "desktop" t) | 5998 | (custom-autoload 'desktop-locals-to-save "desktop" t) |
| 5973 | 5999 | ||
| 5974 | (defvar desktop-save-buffer nil "\ | 6000 | (defvar-local desktop-save-buffer nil "\ |
| 5975 | When non-nil, save buffer status in desktop file. | 6001 | When non-nil, save buffer status in desktop file. |
| 5976 | This variable becomes buffer local when set. | ||
| 5977 | 6002 | ||
| 5978 | If the value is a function, it is called by `desktop-save' with argument | 6003 | If the value is a function, it is called by `desktop-save' with argument |
| 5979 | DESKTOP-DIRNAME to obtain auxiliary information to save in the desktop | 6004 | DESKTOP-DIRNAME to obtain auxiliary information to save in the desktop |
| @@ -6074,6 +6099,9 @@ Empty the Desktop. | |||
| 6074 | This kills all buffers except for internal ones and those with names matched by | 6099 | This kills all buffers except for internal ones and those with names matched by |
| 6075 | a regular expression in the list `desktop-clear-preserve-buffers'. | 6100 | a regular expression in the list `desktop-clear-preserve-buffers'. |
| 6076 | Furthermore, it clears the variables listed in `desktop-globals-to-clear'. | 6101 | Furthermore, it clears the variables listed in `desktop-globals-to-clear'. |
| 6102 | When called interactively and `desktop-restore-frames' is non-nil, it also | ||
| 6103 | deletes all frames except the selected one (and its minibuffer frame, | ||
| 6104 | if different). | ||
| 6077 | 6105 | ||
| 6078 | \(fn)" t nil) | 6106 | \(fn)" t nil) |
| 6079 | 6107 | ||
| @@ -6164,8 +6192,8 @@ Deuglify broken Outlook (Express) articles and redisplay. | |||
| 6164 | 6192 | ||
| 6165 | ;;;*** | 6193 | ;;;*** |
| 6166 | 6194 | ||
| 6167 | ;;;### (autoloads nil "diary-lib" "calendar/diary-lib.el" (20932 | 6195 | ;;;### (autoloads nil "diary-lib" "calendar/diary-lib.el" (20992 |
| 6168 | ;;;;;; 61699 522706 0)) | 6196 | ;;;;;; 52525 458637 0)) |
| 6169 | ;;; Generated autoloads from calendar/diary-lib.el | 6197 | ;;; Generated autoloads from calendar/diary-lib.el |
| 6170 | 6198 | ||
| 6171 | (autoload 'diary "diary-lib" "\ | 6199 | (autoload 'diary "diary-lib" "\ |
| @@ -6299,7 +6327,7 @@ Optional arguments are passed to `dig-invoke'. | |||
| 6299 | 6327 | ||
| 6300 | ;;;*** | 6328 | ;;;*** |
| 6301 | 6329 | ||
| 6302 | ;;;### (autoloads nil "dired" "dired.el" (20932 61699 522706 0)) | 6330 | ;;;### (autoloads nil "dired" "dired.el" (20999 25770 522517 0)) |
| 6303 | ;;; Generated autoloads from dired.el | 6331 | ;;; Generated autoloads from dired.el |
| 6304 | 6332 | ||
| 6305 | (defvar dired-listing-switches (purecopy "-al") "\ | 6333 | (defvar dired-listing-switches (purecopy "-al") "\ |
| @@ -6470,7 +6498,7 @@ redefine OBJECT if it is a symbol. | |||
| 6470 | 6498 | ||
| 6471 | ;;;*** | 6499 | ;;;*** |
| 6472 | 6500 | ||
| 6473 | ;;;### (autoloads nil "disp-table" "disp-table.el" (20709 26818 907104 | 6501 | ;;;### (autoloads nil "disp-table" "disp-table.el" (20992 52525 458637 |
| 6474 | ;;;;;; 0)) | 6502 | ;;;;;; 0)) |
| 6475 | ;;; Generated autoloads from disp-table.el | 6503 | ;;; Generated autoloads from disp-table.el |
| 6476 | 6504 | ||
| @@ -6653,7 +6681,7 @@ Locate SOA record and increment the serial field. | |||
| 6653 | 6681 | ||
| 6654 | ;;;*** | 6682 | ;;;*** |
| 6655 | 6683 | ||
| 6656 | ;;;### (autoloads nil "doc-view" "doc-view.el" (20899 12965 791908 | 6684 | ;;;### (autoloads nil "doc-view" "doc-view.el" (20992 52525 458637 |
| 6657 | ;;;;;; 0)) | 6685 | ;;;;;; 0)) |
| 6658 | ;;; Generated autoloads from doc-view.el | 6686 | ;;; Generated autoloads from doc-view.el |
| 6659 | 6687 | ||
| @@ -6730,7 +6758,7 @@ strings when pressed twice. See `double-map' for details. | |||
| 6730 | ;;;### (autoloads nil "dunnet" "play/dunnet.el" (20900 33838 319219 | 6758 | ;;;### (autoloads nil "dunnet" "play/dunnet.el" (20900 33838 319219 |
| 6731 | ;;;;;; 0)) | 6759 | ;;;;;; 0)) |
| 6732 | ;;; Generated autoloads from play/dunnet.el | 6760 | ;;; Generated autoloads from play/dunnet.el |
| 6733 | (push (purecopy (quote (dunnet 2 1))) package--builtin-versions) | 6761 | (push (purecopy '(dunnet 2 1)) package--builtin-versions) |
| 6734 | (autoload 'dunnet "dunnet" "\ | 6762 | (autoload 'dunnet "dunnet" "\ |
| 6735 | Switch to *dungeon* buffer and start game. | 6763 | Switch to *dungeon* buffer and start game. |
| 6736 | 6764 | ||
| @@ -6738,8 +6766,8 @@ Switch to *dungeon* buffer and start game. | |||
| 6738 | 6766 | ||
| 6739 | ;;;*** | 6767 | ;;;*** |
| 6740 | 6768 | ||
| 6741 | ;;;### (autoloads nil "easy-mmode" "emacs-lisp/easy-mmode.el" (20900 | 6769 | ;;;### (autoloads nil "easy-mmode" "emacs-lisp/easy-mmode.el" (20992 |
| 6742 | ;;;;;; 33838 319219 0)) | 6770 | ;;;;;; 52525 458637 0)) |
| 6743 | ;;; Generated autoloads from emacs-lisp/easy-mmode.el | 6771 | ;;; Generated autoloads from emacs-lisp/easy-mmode.el |
| 6744 | 6772 | ||
| 6745 | (defalias 'easy-mmode-define-minor-mode 'define-minor-mode) | 6773 | (defalias 'easy-mmode-define-minor-mode 'define-minor-mode) |
| @@ -7020,7 +7048,7 @@ To implement dynamic menus, either call this from | |||
| 7020 | ;;;### (autoloads nil "ebnf2ps" "progmodes/ebnf2ps.el" (20709 26818 | 7048 | ;;;### (autoloads nil "ebnf2ps" "progmodes/ebnf2ps.el" (20709 26818 |
| 7021 | ;;;;;; 907104 0)) | 7049 | ;;;;;; 907104 0)) |
| 7022 | ;;; Generated autoloads from progmodes/ebnf2ps.el | 7050 | ;;; Generated autoloads from progmodes/ebnf2ps.el |
| 7023 | (push (purecopy (quote (ebnf2ps 4 4))) package--builtin-versions) | 7051 | (push (purecopy '(ebnf2ps 4 4)) package--builtin-versions) |
| 7024 | (autoload 'ebnf-customize "ebnf2ps" "\ | 7052 | (autoload 'ebnf-customize "ebnf2ps" "\ |
| 7025 | Customization for ebnf group. | 7053 | Customization for ebnf group. |
| 7026 | 7054 | ||
| @@ -7282,8 +7310,8 @@ See `ebnf-style-database' documentation. | |||
| 7282 | 7310 | ||
| 7283 | ;;;*** | 7311 | ;;;*** |
| 7284 | 7312 | ||
| 7285 | ;;;### (autoloads nil "ebrowse" "progmodes/ebrowse.el" (20709 26818 | 7313 | ;;;### (autoloads nil "ebrowse" "progmodes/ebrowse.el" (20992 52525 |
| 7286 | ;;;;;; 907104 0)) | 7314 | ;;;;;; 458637 0)) |
| 7287 | ;;; Generated autoloads from progmodes/ebrowse.el | 7315 | ;;; Generated autoloads from progmodes/ebrowse.el |
| 7288 | 7316 | ||
| 7289 | (autoload 'ebrowse-tree-mode "ebrowse" "\ | 7317 | (autoload 'ebrowse-tree-mode "ebrowse" "\ |
| @@ -7431,7 +7459,7 @@ Display statistics for a class tree. | |||
| 7431 | 7459 | ||
| 7432 | ;;;*** | 7460 | ;;;*** |
| 7433 | 7461 | ||
| 7434 | ;;;### (autoloads nil "ebuff-menu" "ebuff-menu.el" (20709 26818 907104 | 7462 | ;;;### (autoloads nil "ebuff-menu" "ebuff-menu.el" (20992 52525 458637 |
| 7435 | ;;;;;; 0)) | 7463 | ;;;;;; 0)) |
| 7436 | ;;; Generated autoloads from ebuff-menu.el | 7464 | ;;; Generated autoloads from ebuff-menu.el |
| 7437 | 7465 | ||
| @@ -7489,7 +7517,7 @@ With prefix arg NOCONFIRM, execute current line as-is without editing. | |||
| 7489 | 7517 | ||
| 7490 | ;;;### (autoloads nil "ede" "cedet/ede.el" (20908 27948 216644 0)) | 7518 | ;;;### (autoloads nil "ede" "cedet/ede.el" (20908 27948 216644 0)) |
| 7491 | ;;; Generated autoloads from cedet/ede.el | 7519 | ;;; Generated autoloads from cedet/ede.el |
| 7492 | (push (purecopy (quote (ede 1 2))) package--builtin-versions) | 7520 | (push (purecopy '(ede 1 2)) package--builtin-versions) |
| 7493 | (defvar global-ede-mode nil "\ | 7521 | (defvar global-ede-mode nil "\ |
| 7494 | Non-nil if Global-Ede mode is enabled. | 7522 | Non-nil if Global-Ede mode is enabled. |
| 7495 | See the command `global-ede-mode' for a description of this minor mode. | 7523 | See the command `global-ede-mode' for a description of this minor mode. |
| @@ -7515,17 +7543,17 @@ an EDE controlled project. | |||
| 7515 | ;;;### (autoloads nil "ede/dired" "cedet/ede/dired.el" (20709 26818 | 7543 | ;;;### (autoloads nil "ede/dired" "cedet/ede/dired.el" (20709 26818 |
| 7516 | ;;;;;; 907104 0)) | 7544 | ;;;;;; 907104 0)) |
| 7517 | ;;; Generated autoloads from cedet/ede/dired.el | 7545 | ;;; Generated autoloads from cedet/ede/dired.el |
| 7518 | (push (purecopy (quote (dired 0 4))) package--builtin-versions) | 7546 | (push (purecopy '(dired 0 4)) package--builtin-versions) |
| 7519 | ;;;*** | 7547 | ;;;*** |
| 7520 | 7548 | ||
| 7521 | ;;;### (autoloads nil "ede/project-am" "cedet/ede/project-am.el" | 7549 | ;;;### (autoloads nil "ede/project-am" "cedet/ede/project-am.el" |
| 7522 | ;;;;;; (20881 10343 547564 552000)) | 7550 | ;;;;;; (20881 10343 547564 552000)) |
| 7523 | ;;; Generated autoloads from cedet/ede/project-am.el | 7551 | ;;; Generated autoloads from cedet/ede/project-am.el |
| 7524 | (push (purecopy (quote (project-am 0 0 3))) package--builtin-versions) | 7552 | (push (purecopy '(project-am 0 0 3)) package--builtin-versions) |
| 7525 | ;;;*** | 7553 | ;;;*** |
| 7526 | 7554 | ||
| 7527 | ;;;### (autoloads nil "edebug" "emacs-lisp/edebug.el" (20912 25000 | 7555 | ;;;### (autoloads nil "edebug" "emacs-lisp/edebug.el" (20996 49577 |
| 7528 | ;;;;;; 802412 0)) | 7556 | ;;;;;; 892030 0)) |
| 7529 | ;;; Generated autoloads from emacs-lisp/edebug.el | 7557 | ;;; Generated autoloads from emacs-lisp/edebug.el |
| 7530 | 7558 | ||
| 7531 | (defvar edebug-all-defs nil "\ | 7559 | (defvar edebug-all-defs nil "\ |
| @@ -7589,9 +7617,9 @@ Toggle edebugging of all forms. | |||
| 7589 | 7617 | ||
| 7590 | ;;;*** | 7618 | ;;;*** |
| 7591 | 7619 | ||
| 7592 | ;;;### (autoloads nil "ediff" "vc/ediff.el" (20893 60586 188550 0)) | 7620 | ;;;### (autoloads nil "ediff" "vc/ediff.el" (20992 52525 458637 0)) |
| 7593 | ;;; Generated autoloads from vc/ediff.el | 7621 | ;;; Generated autoloads from vc/ediff.el |
| 7594 | (push (purecopy (quote (ediff 2 81 4))) package--builtin-versions) | 7622 | (push (purecopy '(ediff 2 81 4)) package--builtin-versions) |
| 7595 | (autoload 'ediff-files "ediff" "\ | 7623 | (autoload 'ediff-files "ediff" "\ |
| 7596 | Run Ediff on a pair of files, FILE-A and FILE-B. | 7624 | Run Ediff on a pair of files, FILE-A and FILE-B. |
| 7597 | 7625 | ||
| @@ -7818,10 +7846,50 @@ With optional NODE, goes to that node. | |||
| 7818 | 7846 | ||
| 7819 | \(fn &optional NODE)" t nil) | 7847 | \(fn &optional NODE)" t nil) |
| 7820 | 7848 | ||
| 7849 | (autoload 'ediff-files-command "ediff" "\ | ||
| 7850 | |||
| 7851 | |||
| 7852 | \(fn)" nil nil) | ||
| 7853 | |||
| 7854 | (autoload 'ediff3-files-command "ediff" "\ | ||
| 7855 | |||
| 7856 | |||
| 7857 | \(fn)" nil nil) | ||
| 7858 | |||
| 7859 | (autoload 'ediff-merge-command "ediff" "\ | ||
| 7860 | |||
| 7861 | |||
| 7862 | \(fn)" nil nil) | ||
| 7863 | |||
| 7864 | (autoload 'ediff-merge-with-ancestor-command "ediff" "\ | ||
| 7865 | |||
| 7866 | |||
| 7867 | \(fn)" nil nil) | ||
| 7868 | |||
| 7869 | (autoload 'ediff-directories-command "ediff" "\ | ||
| 7870 | |||
| 7871 | |||
| 7872 | \(fn)" nil nil) | ||
| 7873 | |||
| 7874 | (autoload 'ediff-directories3-command "ediff" "\ | ||
| 7875 | |||
| 7876 | |||
| 7877 | \(fn)" nil nil) | ||
| 7878 | |||
| 7879 | (autoload 'ediff-merge-directories-command "ediff" "\ | ||
| 7880 | |||
| 7881 | |||
| 7882 | \(fn)" nil nil) | ||
| 7883 | |||
| 7884 | (autoload 'ediff-merge-directories-with-ancestor-command "ediff" "\ | ||
| 7885 | |||
| 7886 | |||
| 7887 | \(fn)" nil nil) | ||
| 7888 | |||
| 7821 | ;;;*** | 7889 | ;;;*** |
| 7822 | 7890 | ||
| 7823 | ;;;### (autoloads nil "ediff-help" "vc/ediff-help.el" (20709 26818 | 7891 | ;;;### (autoloads nil "ediff-help" "vc/ediff-help.el" (20992 52525 |
| 7824 | ;;;;;; 907104 0)) | 7892 | ;;;;;; 458637 0)) |
| 7825 | ;;; Generated autoloads from vc/ediff-help.el | 7893 | ;;; Generated autoloads from vc/ediff-help.el |
| 7826 | 7894 | ||
| 7827 | (autoload 'ediff-customize "ediff-help" "\ | 7895 | (autoload 'ediff-customize "ediff-help" "\ |
| @@ -7844,8 +7912,8 @@ Display Ediff's registry. | |||
| 7844 | 7912 | ||
| 7845 | ;;;*** | 7913 | ;;;*** |
| 7846 | 7914 | ||
| 7847 | ;;;### (autoloads nil "ediff-util" "vc/ediff-util.el" (20893 60586 | 7915 | ;;;### (autoloads nil "ediff-util" "vc/ediff-util.el" (20992 52525 |
| 7848 | ;;;;;; 188550 0)) | 7916 | ;;;;;; 458637 0)) |
| 7849 | ;;; Generated autoloads from vc/ediff-util.el | 7917 | ;;; Generated autoloads from vc/ediff-util.el |
| 7850 | 7918 | ||
| 7851 | (autoload 'ediff-toggle-multiframe "ediff-util" "\ | 7919 | (autoload 'ediff-toggle-multiframe "ediff-util" "\ |
| @@ -7864,10 +7932,10 @@ To change the default, set the variable `ediff-use-toolbar-p', which see. | |||
| 7864 | 7932 | ||
| 7865 | ;;;*** | 7933 | ;;;*** |
| 7866 | 7934 | ||
| 7867 | ;;;### (autoloads nil "edmacro" "edmacro.el" (20709 26818 907104 | 7935 | ;;;### (autoloads nil "edmacro" "edmacro.el" (20964 20753 310858 |
| 7868 | ;;;;;; 0)) | 7936 | ;;;;;; 446000)) |
| 7869 | ;;; Generated autoloads from edmacro.el | 7937 | ;;; Generated autoloads from edmacro.el |
| 7870 | (push (purecopy (quote (edmacro 2 1))) package--builtin-versions) | 7938 | (push (purecopy '(edmacro 2 1)) package--builtin-versions) |
| 7871 | (autoload 'edit-kbd-macro "edmacro" "\ | 7939 | (autoload 'edit-kbd-macro "edmacro" "\ |
| 7872 | Edit a keyboard macro. | 7940 | Edit a keyboard macro. |
| 7873 | At the prompt, type any key sequence which is bound to a keyboard macro. | 7941 | At the prompt, type any key sequence which is bound to a keyboard macro. |
| @@ -7931,7 +7999,7 @@ Turn on EDT Emulation. | |||
| 7931 | 7999 | ||
| 7932 | ;;;*** | 8000 | ;;;*** |
| 7933 | 8001 | ||
| 7934 | ;;;### (autoloads nil "ehelp" "ehelp.el" (20762 9398 526093 0)) | 8002 | ;;;### (autoloads nil "ehelp" "ehelp.el" (20992 52525 458637 0)) |
| 7935 | ;;; Generated autoloads from ehelp.el | 8003 | ;;; Generated autoloads from ehelp.el |
| 7936 | 8004 | ||
| 7937 | (autoload 'with-electric-help "ehelp" "\ | 8005 | (autoload 'with-electric-help "ehelp" "\ |
| @@ -7970,13 +8038,13 @@ BUFFER is put back into its original major mode. | |||
| 7970 | ;;;### (autoloads nil "eieio" "emacs-lisp/eieio.el" (20930 5097 423575 | 8038 | ;;;### (autoloads nil "eieio" "emacs-lisp/eieio.el" (20930 5097 423575 |
| 7971 | ;;;;;; 701000)) | 8039 | ;;;;;; 701000)) |
| 7972 | ;;; Generated autoloads from emacs-lisp/eieio.el | 8040 | ;;; Generated autoloads from emacs-lisp/eieio.el |
| 7973 | (push (purecopy (quote (eieio 1 4))) package--builtin-versions) | 8041 | (push (purecopy '(eieio 1 4)) package--builtin-versions) |
| 7974 | ;;;*** | 8042 | ;;;*** |
| 7975 | 8043 | ||
| 7976 | ;;;### (autoloads nil "eieio-core" "emacs-lisp/eieio-core.el" (20908 | 8044 | ;;;### (autoloads nil "eieio-core" "emacs-lisp/eieio-core.el" (20908 |
| 7977 | ;;;;;; 27948 216644 0)) | 8045 | ;;;;;; 27948 216644 0)) |
| 7978 | ;;; Generated autoloads from emacs-lisp/eieio-core.el | 8046 | ;;; Generated autoloads from emacs-lisp/eieio-core.el |
| 7979 | (push (purecopy (quote (eieio-core 1 4))) package--builtin-versions) | 8047 | (push (purecopy '(eieio-core 1 4)) package--builtin-versions) |
| 7980 | (autoload 'eieio-defclass-autoload "eieio-core" "\ | 8048 | (autoload 'eieio-defclass-autoload "eieio-core" "\ |
| 7981 | Create autoload symbols for the EIEIO class CNAME. | 8049 | Create autoload symbols for the EIEIO class CNAME. |
| 7982 | SUPERCLASSES are the superclasses that CNAME inherits from. | 8050 | SUPERCLASSES are the superclasses that CNAME inherits from. |
| @@ -8035,8 +8103,8 @@ Also extracts information about all methods specific to this generic. | |||
| 8035 | 8103 | ||
| 8036 | ;;;*** | 8104 | ;;;*** |
| 8037 | 8105 | ||
| 8038 | ;;;### (autoloads nil "eldoc" "emacs-lisp/eldoc.el" (20806 59818 | 8106 | ;;;### (autoloads nil "eldoc" "emacs-lisp/eldoc.el" (21024 28968 |
| 8039 | ;;;;;; 347907 0)) | 8107 | ;;;;;; 738399 0)) |
| 8040 | ;;; Generated autoloads from emacs-lisp/eldoc.el | 8108 | ;;; Generated autoloads from emacs-lisp/eldoc.el |
| 8041 | 8109 | ||
| 8042 | (defvar eldoc-minor-mode-string (purecopy " ElDoc") "\ | 8110 | (defvar eldoc-minor-mode-string (purecopy " ElDoc") "\ |
| @@ -8289,7 +8357,7 @@ Prompts for bug subject. Leaves you in a mail buffer. | |||
| 8289 | 8357 | ||
| 8290 | ;;;*** | 8358 | ;;;*** |
| 8291 | 8359 | ||
| 8292 | ;;;### (autoloads nil "emerge" "vc/emerge.el" (20576 42138 697312 | 8360 | ;;;### (autoloads nil "emerge" "vc/emerge.el" (20992 52525 458637 |
| 8293 | ;;;;;; 0)) | 8361 | ;;;;;; 0)) |
| 8294 | ;;; Generated autoloads from vc/emerge.el | 8362 | ;;; Generated autoloads from vc/emerge.el |
| 8295 | 8363 | ||
| @@ -8386,7 +8454,7 @@ Commands: | |||
| 8386 | 8454 | ||
| 8387 | ;;;*** | 8455 | ;;;*** |
| 8388 | 8456 | ||
| 8389 | ;;;### (autoloads nil "epa" "epa.el" (20917 42917 611340 0)) | 8457 | ;;;### (autoloads nil "epa" "epa.el" (20978 19624 657047 0)) |
| 8390 | ;;; Generated autoloads from epa.el | 8458 | ;;; Generated autoloads from epa.el |
| 8391 | 8459 | ||
| 8392 | (autoload 'epa-list-keys "epa" "\ | 8460 | (autoload 'epa-list-keys "epa" "\ |
| @@ -8611,7 +8679,7 @@ Encrypt marked files. | |||
| 8611 | 8679 | ||
| 8612 | ;;;*** | 8680 | ;;;*** |
| 8613 | 8681 | ||
| 8614 | ;;;### (autoloads nil "epa-mail" "epa-mail.el" (20709 26818 907104 | 8682 | ;;;### (autoloads nil "epa-mail" "epa-mail.el" (20978 19624 657047 |
| 8615 | ;;;;;; 0)) | 8683 | ;;;;;; 0)) |
| 8616 | ;;; Generated autoloads from epa-mail.el | 8684 | ;;; Generated autoloads from epa-mail.el |
| 8617 | 8685 | ||
| @@ -8648,12 +8716,19 @@ Don't use this command in Lisp programs! | |||
| 8648 | \(fn START END SIGNERS MODE)" t nil) | 8716 | \(fn START END SIGNERS MODE)" t nil) |
| 8649 | 8717 | ||
| 8650 | (autoload 'epa-mail-encrypt "epa-mail" "\ | 8718 | (autoload 'epa-mail-encrypt "epa-mail" "\ |
| 8651 | Encrypt the current buffer. | 8719 | Encrypt the outgoing mail message in the current buffer. |
| 8652 | The buffer is expected to contain a mail message. | 8720 | Takes the recipients from the text in the header in the buffer |
| 8721 | and translates them through `epa-mail-aliases'. | ||
| 8722 | With prefix argument, asks you to select among them interactively | ||
| 8723 | and also whether and how to sign. | ||
| 8653 | 8724 | ||
| 8654 | Don't use this command in Lisp programs! | 8725 | Called from Lisp, the optional argument RECIPIENTS is a list |
| 8726 | of recipient addresses, t to perform symmetric encryption, | ||
| 8727 | or nil meaning use the defaults. | ||
| 8655 | 8728 | ||
| 8656 | \(fn START END RECIPIENTS SIGN SIGNERS)" t nil) | 8729 | SIGNERS is a list of keys to sign the message with. |
| 8730 | |||
| 8731 | \(fn &optional RECIPIENTS SIGNERS)" t nil) | ||
| 8657 | 8732 | ||
| 8658 | (autoload 'epa-mail-import-keys "epa-mail" "\ | 8733 | (autoload 'epa-mail-import-keys "epa-mail" "\ |
| 8659 | Import keys in the OpenPGP armor format in the current buffer. | 8734 | Import keys in the OpenPGP armor format in the current buffer. |
| @@ -8682,9 +8757,9 @@ if ARG is omitted or nil. | |||
| 8682 | 8757 | ||
| 8683 | ;;;*** | 8758 | ;;;*** |
| 8684 | 8759 | ||
| 8685 | ;;;### (autoloads nil "epg" "epg.el" (20936 7342 261759 0)) | 8760 | ;;;### (autoloads nil "epg" "epg.el" (21022 27213 317995 0)) |
| 8686 | ;;; Generated autoloads from epg.el | 8761 | ;;; Generated autoloads from epg.el |
| 8687 | (push (purecopy (quote (epg 1 0 0))) package--builtin-versions) | 8762 | (push (purecopy '(epg 1 0 0)) package--builtin-versions) |
| 8688 | (autoload 'epg-make-context "epg" "\ | 8763 | (autoload 'epg-make-context "epg" "\ |
| 8689 | Return a context object. | 8764 | Return a context object. |
| 8690 | 8765 | ||
| @@ -8713,9 +8788,9 @@ Look at CONFIG and try to expand GROUP. | |||
| 8713 | 8788 | ||
| 8714 | ;;;*** | 8789 | ;;;*** |
| 8715 | 8790 | ||
| 8716 | ;;;### (autoloads nil "erc" "erc/erc.el" (20891 18859 893295 0)) | 8791 | ;;;### (autoloads nil "erc" "erc/erc.el" (21013 58662 278539 0)) |
| 8717 | ;;; Generated autoloads from erc/erc.el | 8792 | ;;; Generated autoloads from erc/erc.el |
| 8718 | (push (purecopy (quote (erc 5 3))) package--builtin-versions) | 8793 | (push (purecopy '(erc 5 3)) package--builtin-versions) |
| 8719 | (autoload 'erc-select-read-args "erc" "\ | 8794 | (autoload 'erc-select-read-args "erc" "\ |
| 8720 | Prompt the user for values of nick, server, port, and password. | 8795 | Prompt the user for values of nick, server, port, and password. |
| 8721 | 8796 | ||
| @@ -8768,8 +8843,8 @@ Otherwise, connect to HOST:PORT as USER and /join CHANNEL. | |||
| 8768 | 8843 | ||
| 8769 | ;;;*** | 8844 | ;;;*** |
| 8770 | 8845 | ||
| 8771 | ;;;### (autoloads nil "erc-button" "erc/erc-button.el" (20709 26818 | 8846 | ;;;### (autoloads nil "erc-button" "erc/erc-button.el" (21013 58662 |
| 8772 | ;;;;;; 907104 0)) | 8847 | ;;;;;; 278539 0)) |
| 8773 | ;;; Generated autoloads from erc/erc-button.el | 8848 | ;;; Generated autoloads from erc/erc-button.el |
| 8774 | (autoload 'erc-button-mode "erc-button" nil t) | 8849 | (autoload 'erc-button-mode "erc-button" nil t) |
| 8775 | 8850 | ||
| @@ -8945,13 +9020,13 @@ system. | |||
| 8945 | ;;;### (autoloads nil "erc-lang" "erc/erc-lang.el" (20709 26818 907104 | 9020 | ;;;### (autoloads nil "erc-lang" "erc/erc-lang.el" (20709 26818 907104 |
| 8946 | ;;;;;; 0)) | 9021 | ;;;;;; 0)) |
| 8947 | ;;; Generated autoloads from erc/erc-lang.el | 9022 | ;;; Generated autoloads from erc/erc-lang.el |
| 8948 | (push (purecopy (quote (erc-lang 1 0 0))) package--builtin-versions) | 9023 | (push (purecopy '(erc-lang 1 0 0)) package--builtin-versions) |
| 8949 | ;;;*** | 9024 | ;;;*** |
| 8950 | 9025 | ||
| 8951 | ;;;### (autoloads nil "erc-list" "erc/erc-list.el" (20884 7264 412929 | 9026 | ;;;### (autoloads nil "erc-list" "erc/erc-list.el" (21013 58662 278539 |
| 8952 | ;;;;;; 442000)) | 9027 | ;;;;;; 0)) |
| 8953 | ;;; Generated autoloads from erc/erc-list.el | 9028 | ;;; Generated autoloads from erc/erc-list.el |
| 8954 | (push (purecopy (quote (erc-list 0 1))) package--builtin-versions) (autoload 'erc-list-mode "erc-list") | 9029 | (push (purecopy '(erc-list 0 1)) package--builtin-versions) (autoload 'erc-list-mode "erc-list") |
| 8955 | 9030 | ||
| 8956 | ;;;*** | 9031 | ;;;*** |
| 8957 | 9032 | ||
| @@ -9069,8 +9144,8 @@ Interactively select a server to connect to using `erc-server-alist'. | |||
| 9069 | 9144 | ||
| 9070 | ;;;*** | 9145 | ;;;*** |
| 9071 | 9146 | ||
| 9072 | ;;;### (autoloads nil "erc-notify" "erc/erc-notify.el" (20891 18859 | 9147 | ;;;### (autoloads nil "erc-notify" "erc/erc-notify.el" (21013 58662 |
| 9073 | ;;;;;; 893295 0)) | 9148 | ;;;;;; 278539 0)) |
| 9074 | ;;; Generated autoloads from erc/erc-notify.el | 9149 | ;;; Generated autoloads from erc/erc-notify.el |
| 9075 | (autoload 'erc-notify-mode "erc-notify" nil t) | 9150 | (autoload 'erc-notify-mode "erc-notify" nil t) |
| 9076 | 9151 | ||
| @@ -9167,8 +9242,8 @@ This will add a speedbar major display mode. | |||
| 9167 | 9242 | ||
| 9168 | ;;;*** | 9243 | ;;;*** |
| 9169 | 9244 | ||
| 9170 | ;;;### (autoloads nil "erc-track" "erc/erc-track.el" (20709 26818 | 9245 | ;;;### (autoloads nil "erc-track" "erc/erc-track.el" (21013 58662 |
| 9171 | ;;;;;; 907104 0)) | 9246 | ;;;;;; 278539 0)) |
| 9172 | ;;; Generated autoloads from erc/erc-track.el | 9247 | ;;; Generated autoloads from erc/erc-track.el |
| 9173 | 9248 | ||
| 9174 | (defvar erc-track-minor-mode nil "\ | 9249 | (defvar erc-track-minor-mode nil "\ |
| @@ -9225,7 +9300,7 @@ Add a file to `erc-xdcc-files'. | |||
| 9225 | 9300 | ||
| 9226 | ;;;*** | 9301 | ;;;*** |
| 9227 | 9302 | ||
| 9228 | ;;;### (autoloads nil "ert" "emacs-lisp/ert.el" (20834 39208 838628 | 9303 | ;;;### (autoloads nil "ert" "emacs-lisp/ert.el" (20998 4934 952905 |
| 9229 | ;;;;;; 0)) | 9304 | ;;;;;; 0)) |
| 9230 | ;;; Generated autoloads from emacs-lisp/ert.el | 9305 | ;;; Generated autoloads from emacs-lisp/ert.el |
| 9231 | 9306 | ||
| @@ -9304,8 +9379,8 @@ Kill all test buffers that are still live. | |||
| 9304 | 9379 | ||
| 9305 | ;;;*** | 9380 | ;;;*** |
| 9306 | 9381 | ||
| 9307 | ;;;### (autoloads nil "esh-mode" "eshell/esh-mode.el" (20911 4138 | 9382 | ;;;### (autoloads nil "esh-mode" "eshell/esh-mode.el" (20992 52525 |
| 9308 | ;;;;;; 279475 0)) | 9383 | ;;;;;; 458637 0)) |
| 9309 | ;;; Generated autoloads from eshell/esh-mode.el | 9384 | ;;; Generated autoloads from eshell/esh-mode.el |
| 9310 | 9385 | ||
| 9311 | (autoload 'eshell-mode "esh-mode" "\ | 9386 | (autoload 'eshell-mode "esh-mode" "\ |
| @@ -9320,7 +9395,7 @@ Emacs shell interactive mode. | |||
| 9320 | ;;;### (autoloads nil "eshell" "eshell/eshell.el" (20893 60586 188550 | 9395 | ;;;### (autoloads nil "eshell" "eshell/eshell.el" (20893 60586 188550 |
| 9321 | ;;;;;; 0)) | 9396 | ;;;;;; 0)) |
| 9322 | ;;; Generated autoloads from eshell/eshell.el | 9397 | ;;; Generated autoloads from eshell/eshell.el |
| 9323 | (push (purecopy (quote (eshell 2 4 2))) package--builtin-versions) | 9398 | (push (purecopy '(eshell 2 4 2)) package--builtin-versions) |
| 9324 | (autoload 'eshell "eshell" "\ | 9399 | (autoload 'eshell "eshell" "\ |
| 9325 | Create an interactive Eshell buffer. | 9400 | Create an interactive Eshell buffer. |
| 9326 | The buffer used for Eshell sessions is determined by the value of | 9401 | The buffer used for Eshell sessions is determined by the value of |
| @@ -9352,7 +9427,7 @@ corresponding to a successful execution. | |||
| 9352 | 9427 | ||
| 9353 | ;;;*** | 9428 | ;;;*** |
| 9354 | 9429 | ||
| 9355 | ;;;### (autoloads nil "etags" "progmodes/etags.el" (20731 53823 676680 | 9430 | ;;;### (autoloads nil "etags" "progmodes/etags.el" (20992 52525 458637 |
| 9356 | ;;;;;; 0)) | 9431 | ;;;;;; 0)) |
| 9357 | ;;; Generated autoloads from progmodes/etags.el | 9432 | ;;; Generated autoloads from progmodes/etags.el |
| 9358 | 9433 | ||
| @@ -9975,7 +10050,7 @@ fourth arg NOSEP non-nil inhibits this. | |||
| 9975 | 10050 | ||
| 9976 | ;;;*** | 10051 | ;;;*** |
| 9977 | 10052 | ||
| 9978 | ;;;### (autoloads nil "eww" "net/eww.el" (20941 25255 50698 0)) | 10053 | ;;;### (autoloads nil "eww" "net/eww.el" (21022 41153 91581 355000)) |
| 9979 | ;;; Generated autoloads from net/eww.el | 10054 | ;;; Generated autoloads from net/eww.el |
| 9980 | 10055 | ||
| 9981 | (autoload 'eww "eww" "\ | 10056 | (autoload 'eww "eww" "\ |
| @@ -10088,7 +10163,7 @@ This is used only in conjunction with `expand-add-abbrevs'. | |||
| 10088 | 10163 | ||
| 10089 | ;;;*** | 10164 | ;;;*** |
| 10090 | 10165 | ||
| 10091 | ;;;### (autoloads nil "f90" "progmodes/f90.el" (20886 939 575794 | 10166 | ;;;### (autoloads nil "f90" "progmodes/f90.el" (20992 52525 458637 |
| 10092 | ;;;;;; 0)) | 10167 | ;;;;;; 0)) |
| 10093 | ;;; Generated autoloads from progmodes/f90.el | 10168 | ;;; Generated autoloads from progmodes/f90.el |
| 10094 | 10169 | ||
| @@ -10318,10 +10393,10 @@ Besides the choice of face, it is the same as `buffer-face-mode'. | |||
| 10318 | 10393 | ||
| 10319 | ;;;*** | 10394 | ;;;*** |
| 10320 | 10395 | ||
| 10321 | ;;;### (autoloads nil "feedmail" "mail/feedmail.el" (20891 18859 | 10396 | ;;;### (autoloads nil "feedmail" "mail/feedmail.el" (21002 1963 769129 |
| 10322 | ;;;;;; 893295 0)) | 10397 | ;;;;;; 0)) |
| 10323 | ;;; Generated autoloads from mail/feedmail.el | 10398 | ;;; Generated autoloads from mail/feedmail.el |
| 10324 | (push (purecopy (quote (feedmail 11))) package--builtin-versions) | 10399 | (push (purecopy '(feedmail 11)) package--builtin-versions) |
| 10325 | (autoload 'feedmail-send-it "feedmail" "\ | 10400 | (autoload 'feedmail-send-it "feedmail" "\ |
| 10326 | Send the current mail buffer using the Feedmail package. | 10401 | Send the current mail buffer using the Feedmail package. |
| 10327 | This is a suitable value for `send-mail-function'. It can be used | 10402 | This is a suitable value for `send-mail-function'. It can be used |
| @@ -10372,7 +10447,7 @@ you can set `feedmail-queue-reminder-alist' to nil. | |||
| 10372 | 10447 | ||
| 10373 | ;;;*** | 10448 | ;;;*** |
| 10374 | 10449 | ||
| 10375 | ;;;### (autoloads nil "ffap" "ffap.el" (20752 26669 524456 0)) | 10450 | ;;;### (autoloads nil "ffap" "ffap.el" (20998 4934 952905 0)) |
| 10376 | ;;; Generated autoloads from ffap.el | 10451 | ;;; Generated autoloads from ffap.el |
| 10377 | 10452 | ||
| 10378 | (autoload 'ffap-next "ffap" "\ | 10453 | (autoload 'ffap-next "ffap" "\ |
| @@ -10435,7 +10510,7 @@ Evaluate the forms in variable `ffap-bindings'. | |||
| 10435 | 10510 | ||
| 10436 | ;;;*** | 10511 | ;;;*** |
| 10437 | 10512 | ||
| 10438 | ;;;### (autoloads nil "filecache" "filecache.el" (20709 26818 907104 | 10513 | ;;;### (autoloads nil "filecache" "filecache.el" (20998 4934 952905 |
| 10439 | ;;;;;; 0)) | 10514 | ;;;;;; 0)) |
| 10440 | ;;; Generated autoloads from filecache.el | 10515 | ;;; Generated autoloads from filecache.el |
| 10441 | 10516 | ||
| @@ -10493,6 +10568,19 @@ the name is considered already unique; only the second substitution | |||
| 10493 | 10568 | ||
| 10494 | ;;;*** | 10569 | ;;;*** |
| 10495 | 10570 | ||
| 10571 | ;;;### (autoloads nil "filenotify" "filenotify.el" (20999 25770 522517 | ||
| 10572 | ;;;;;; 0)) | ||
| 10573 | ;;; Generated autoloads from filenotify.el | ||
| 10574 | |||
| 10575 | (autoload 'file-notify-handle-event "filenotify" "\ | ||
| 10576 | Handle file system monitoring event. | ||
| 10577 | If EVENT is a filewatch event, call its callback. | ||
| 10578 | Otherwise, signal a `file-notify-error'. | ||
| 10579 | |||
| 10580 | \(fn EVENT)" t nil) | ||
| 10581 | |||
| 10582 | ;;;*** | ||
| 10583 | |||
| 10496 | ;;;### (autoloads nil "files-x" "files-x.el" (20938 49065 383398 | 10584 | ;;;### (autoloads nil "files-x" "files-x.el" (20938 49065 383398 |
| 10497 | ;;;;;; 0)) | 10585 | ;;;;;; 0)) |
| 10498 | ;;; Generated autoloads from files-x.el | 10586 | ;;; Generated autoloads from files-x.el |
| @@ -10559,7 +10647,7 @@ Copy directory-local variables to the -*- line. | |||
| 10559 | 10647 | ||
| 10560 | ;;;*** | 10648 | ;;;*** |
| 10561 | 10649 | ||
| 10562 | ;;;### (autoloads nil "filesets" "filesets.el" (20791 9657 561026 | 10650 | ;;;### (autoloads nil "filesets" "filesets.el" (20999 25770 522517 |
| 10563 | ;;;;;; 0)) | 10651 | ;;;;;; 0)) |
| 10564 | ;;; Generated autoloads from filesets.el | 10652 | ;;; Generated autoloads from filesets.el |
| 10565 | 10653 | ||
| @@ -10574,7 +10662,7 @@ Set up hooks, load the cache file -- if existing -- and build the menu. | |||
| 10574 | ;;;### (autoloads nil "find-cmd" "find-cmd.el" (20709 26818 907104 | 10662 | ;;;### (autoloads nil "find-cmd" "find-cmd.el" (20709 26818 907104 |
| 10575 | ;;;;;; 0)) | 10663 | ;;;;;; 0)) |
| 10576 | ;;; Generated autoloads from find-cmd.el | 10664 | ;;; Generated autoloads from find-cmd.el |
| 10577 | (push (purecopy (quote (find-cmd 0 6))) package--builtin-versions) | 10665 | (push (purecopy '(find-cmd 0 6)) package--builtin-versions) |
| 10578 | (autoload 'find-cmd "find-cmd" "\ | 10666 | (autoload 'find-cmd "find-cmd" "\ |
| 10579 | Initiate the building of a find command. | 10667 | Initiate the building of a find command. |
| 10580 | For example: | 10668 | For example: |
| @@ -10630,7 +10718,7 @@ use in place of \"-ls\" as the final argument. | |||
| 10630 | 10718 | ||
| 10631 | ;;;*** | 10719 | ;;;*** |
| 10632 | 10720 | ||
| 10633 | ;;;### (autoloads nil "find-file" "find-file.el" (20872 54440 171355 | 10721 | ;;;### (autoloads nil "find-file" "find-file.el" (20999 25770 522517 |
| 10634 | ;;;;;; 0)) | 10722 | ;;;;;; 0)) |
| 10635 | ;;; Generated autoloads from find-file.el | 10723 | ;;; Generated autoloads from find-file.el |
| 10636 | 10724 | ||
| @@ -10880,7 +10968,7 @@ Define some key bindings for the find-function family of functions. | |||
| 10880 | 10968 | ||
| 10881 | ;;;*** | 10969 | ;;;*** |
| 10882 | 10970 | ||
| 10883 | ;;;### (autoloads nil "find-lisp" "find-lisp.el" (20709 26818 907104 | 10971 | ;;;### (autoloads nil "find-lisp" "find-lisp.el" (20993 35788 926781 |
| 10884 | ;;;;;; 0)) | 10972 | ;;;;;; 0)) |
| 10885 | ;;; Generated autoloads from find-lisp.el | 10973 | ;;; Generated autoloads from find-lisp.el |
| 10886 | 10974 | ||
| @@ -10895,7 +10983,7 @@ Find all subdirectories of DIR. | |||
| 10895 | \(fn DIR)" t nil) | 10983 | \(fn DIR)" t nil) |
| 10896 | 10984 | ||
| 10897 | (autoload 'find-lisp-find-dired-filter "find-lisp" "\ | 10985 | (autoload 'find-lisp-find-dired-filter "find-lisp" "\ |
| 10898 | Change the filter on a find-lisp-find-dired buffer to REGEXP. | 10986 | Change the filter on a `find-lisp-find-dired' buffer to REGEXP. |
| 10899 | 10987 | ||
| 10900 | \(fn REGEXP)" t nil) | 10988 | \(fn REGEXP)" t nil) |
| 10901 | 10989 | ||
| @@ -10903,7 +10991,7 @@ Change the filter on a find-lisp-find-dired buffer to REGEXP. | |||
| 10903 | 10991 | ||
| 10904 | ;;;### (autoloads nil "finder" "finder.el" (20925 37032 237257 0)) | 10992 | ;;;### (autoloads nil "finder" "finder.el" (20925 37032 237257 0)) |
| 10905 | ;;; Generated autoloads from finder.el | 10993 | ;;; Generated autoloads from finder.el |
| 10906 | (push (purecopy (quote (finder 1 0))) package--builtin-versions) | 10994 | (push (purecopy '(finder 1 0)) package--builtin-versions) |
| 10907 | (autoload 'finder-list-keywords "finder" "\ | 10995 | (autoload 'finder-list-keywords "finder" "\ |
| 10908 | Display descriptions of the keywords in the Finder buffer. | 10996 | Display descriptions of the keywords in the Finder buffer. |
| 10909 | 10997 | ||
| @@ -10960,10 +11048,10 @@ to get the effect of a C-q. | |||
| 10960 | 11048 | ||
| 10961 | ;;;*** | 11049 | ;;;*** |
| 10962 | 11050 | ||
| 10963 | ;;;### (autoloads nil "flymake" "progmodes/flymake.el" (20932 61699 | 11051 | ;;;### (autoloads nil "flymake" "progmodes/flymake.el" (21019 11047 |
| 10964 | ;;;;;; 522706 0)) | 11052 | ;;;;;; 84796 0)) |
| 10965 | ;;; Generated autoloads from progmodes/flymake.el | 11053 | ;;; Generated autoloads from progmodes/flymake.el |
| 10966 | (push (purecopy (quote (flymake 0 3))) package--builtin-versions) | 11054 | (push (purecopy '(flymake 0 3)) package--builtin-versions) |
| 10967 | (autoload 'flymake-mode "flymake" "\ | 11055 | (autoload 'flymake-mode "flymake" "\ |
| 10968 | Toggle on-the-fly syntax checking. | 11056 | Toggle on-the-fly syntax checking. |
| 10969 | With a prefix argument ARG, enable the mode if ARG is positive, | 11057 | With a prefix argument ARG, enable the mode if ARG is positive, |
| @@ -11063,10 +11151,10 @@ Flyspell whole buffer. | |||
| 11063 | ;;;### (autoloads nil "foldout" "foldout.el" (20709 26818 907104 | 11151 | ;;;### (autoloads nil "foldout" "foldout.el" (20709 26818 907104 |
| 11064 | ;;;;;; 0)) | 11152 | ;;;;;; 0)) |
| 11065 | ;;; Generated autoloads from foldout.el | 11153 | ;;; Generated autoloads from foldout.el |
| 11066 | (push (purecopy (quote (foldout 1 10))) package--builtin-versions) | 11154 | (push (purecopy '(foldout 1 10)) package--builtin-versions) |
| 11067 | ;;;*** | 11155 | ;;;*** |
| 11068 | 11156 | ||
| 11069 | ;;;### (autoloads nil "follow" "follow.el" (20709 26818 907104 0)) | 11157 | ;;;### (autoloads nil "follow" "follow.el" (21005 64551 555603 0)) |
| 11070 | ;;; Generated autoloads from follow.el | 11158 | ;;; Generated autoloads from follow.el |
| 11071 | 11159 | ||
| 11072 | (autoload 'turn-on-follow-mode "follow" "\ | 11160 | (autoload 'turn-on-follow-mode "follow" "\ |
| @@ -11137,7 +11225,7 @@ selected if the original window is the first one in the frame. | |||
| 11137 | ;;;### (autoloads nil "footnote" "mail/footnote.el" (20709 26818 | 11225 | ;;;### (autoloads nil "footnote" "mail/footnote.el" (20709 26818 |
| 11138 | ;;;;;; 907104 0)) | 11226 | ;;;;;; 907104 0)) |
| 11139 | ;;; Generated autoloads from mail/footnote.el | 11227 | ;;; Generated autoloads from mail/footnote.el |
| 11140 | (push (purecopy (quote (footnote 0 19))) package--builtin-versions) | 11228 | (push (purecopy '(footnote 0 19)) package--builtin-versions) |
| 11141 | (autoload 'footnote-mode "footnote" "\ | 11229 | (autoload 'footnote-mode "footnote" "\ |
| 11142 | Toggle Footnote mode. | 11230 | Toggle Footnote mode. |
| 11143 | With a prefix argument ARG, enable Footnote mode if ARG is | 11231 | With a prefix argument ARG, enable Footnote mode if ARG is |
| @@ -11153,7 +11241,7 @@ play around with the following keys: | |||
| 11153 | 11241 | ||
| 11154 | ;;;*** | 11242 | ;;;*** |
| 11155 | 11243 | ||
| 11156 | ;;;### (autoloads nil "forms" "forms.el" (20709 26818 907104 0)) | 11244 | ;;;### (autoloads nil "forms" "forms.el" (20999 25770 522517 0)) |
| 11157 | ;;; Generated autoloads from forms.el | 11245 | ;;; Generated autoloads from forms.el |
| 11158 | 11246 | ||
| 11159 | (autoload 'forms-mode "forms" "\ | 11247 | (autoload 'forms-mode "forms" "\ |
| @@ -11189,8 +11277,8 @@ Visit a file in Forms mode in other window. | |||
| 11189 | 11277 | ||
| 11190 | ;;;*** | 11278 | ;;;*** |
| 11191 | 11279 | ||
| 11192 | ;;;### (autoloads nil "fortran" "progmodes/fortran.el" (20709 26818 | 11280 | ;;;### (autoloads nil "fortran" "progmodes/fortran.el" (20992 52525 |
| 11193 | ;;;;;; 907104 0)) | 11281 | ;;;;;; 458637 0)) |
| 11194 | ;;; Generated autoloads from progmodes/fortran.el | 11282 | ;;; Generated autoloads from progmodes/fortran.el |
| 11195 | 11283 | ||
| 11196 | (autoload 'fortran-mode "fortran" "\ | 11284 | (autoload 'fortran-mode "fortran" "\ |
| @@ -11316,14 +11404,175 @@ and choose the directory as the fortune-file. | |||
| 11316 | 11404 | ||
| 11317 | ;;;*** | 11405 | ;;;*** |
| 11318 | 11406 | ||
| 11407 | ;;;### (autoloads nil "frameset" "frameset.el" (21005 64551 555603 | ||
| 11408 | ;;;;;; 0)) | ||
| 11409 | ;;; Generated autoloads from frameset.el | ||
| 11410 | |||
| 11411 | (defvar frameset-session-filter-alist '((name . :never) (left . frameset-filter-iconified) (minibuffer . frameset-filter-minibuffer) (top . frameset-filter-iconified)) "\ | ||
| 11412 | Minimum set of parameters to filter for live (on-session) framesets. | ||
| 11413 | DO NOT MODIFY. See `frameset-filter-alist' for a full description.") | ||
| 11414 | |||
| 11415 | (defvar frameset-persistent-filter-alist (nconc '((background-color . frameset-filter-sanitize-color) (buffer-list . :never) (buffer-predicate . :never) (buried-buffer-list . :never) (font . frameset-filter-shelve-param) (foreground-color . frameset-filter-sanitize-color) (fullscreen . frameset-filter-shelve-param) (GUI:font . frameset-filter-unshelve-param) (GUI:fullscreen . frameset-filter-unshelve-param) (GUI:height . frameset-filter-unshelve-param) (GUI:width . frameset-filter-unshelve-param) (height . frameset-filter-shelve-param) (outer-window-id . :never) (parent-id . :never) (tty . frameset-filter-tty-to-GUI) (tty-type . frameset-filter-tty-to-GUI) (width . frameset-filter-shelve-param) (window-id . :never) (window-system . :never)) frameset-session-filter-alist) "\ | ||
| 11416 | Parameters to filter for persistent framesets. | ||
| 11417 | DO NOT MODIFY. See `frameset-filter-alist' for a full description.") | ||
| 11418 | |||
| 11419 | (defvar frameset-filter-alist frameset-persistent-filter-alist "\ | ||
| 11420 | Alist of frame parameters and filtering functions. | ||
| 11421 | |||
| 11422 | This alist is the default value of the FILTERS argument of | ||
| 11423 | `frameset-save' and `frameset-restore' (which see). | ||
| 11424 | |||
| 11425 | Initially, `frameset-filter-alist' is set to, and shares the value of, | ||
| 11426 | `frameset-persistent-filter-alist'. You can override any item in | ||
| 11427 | this alist by `push'ing a new item onto it. If, for some reason, you | ||
| 11428 | intend to modify existing values, do | ||
| 11429 | |||
| 11430 | (setq frameset-filter-alist (copy-tree frameset-filter-alist)) | ||
| 11431 | |||
| 11432 | before changing anything. | ||
| 11433 | |||
| 11434 | On saving, PARAMETERS is the parameter alist of each frame processed, | ||
| 11435 | and FILTERED is the parameter alist that gets saved to the frameset. | ||
| 11436 | |||
| 11437 | On restoring, PARAMETERS is the parameter alist extracted from the | ||
| 11438 | frameset, and FILTERED is the resulting frame parameter alist used | ||
| 11439 | to restore the frame. | ||
| 11440 | |||
| 11441 | Elements of `frameset-filter-alist' are conses (PARAM . ACTION), | ||
| 11442 | where PARAM is a parameter name (a symbol identifying a frame | ||
| 11443 | parameter), and ACTION can be: | ||
| 11444 | |||
| 11445 | nil The parameter is copied to FILTERED. | ||
| 11446 | :never The parameter is never copied to FILTERED. | ||
| 11447 | :save The parameter is copied only when saving the frame. | ||
| 11448 | :restore The parameter is copied only when restoring the frame. | ||
| 11449 | FILTER A filter function. | ||
| 11450 | |||
| 11451 | FILTER can be a symbol FILTER-FUN, or a list (FILTER-FUN ARGS...). | ||
| 11452 | FILTER-FUN is invoked with | ||
| 11453 | |||
| 11454 | (apply FILTER-FUN CURRENT FILTERED PARAMETERS SAVING ARGS) | ||
| 11455 | |||
| 11456 | where | ||
| 11457 | |||
| 11458 | CURRENT A cons (PARAM . VALUE), where PARAM is the one being | ||
| 11459 | filtered and VALUE is its current value. | ||
| 11460 | FILTERED The resulting alist (so far). | ||
| 11461 | PARAMETERS The complete alist of parameters being filtered, | ||
| 11462 | SAVING Non-nil if filtering before saving state, nil if filtering | ||
| 11463 | before restoring it. | ||
| 11464 | ARGS Any additional arguments specified in the ACTION. | ||
| 11465 | |||
| 11466 | FILTER-FUN is allowed to modify items in FILTERED, but no other arguments. | ||
| 11467 | It must return: | ||
| 11468 | nil Skip CURRENT (do not add it to FILTERED). | ||
| 11469 | t Add CURRENT to FILTERED as is. | ||
| 11470 | (NEW-PARAM . NEW-VALUE) Add this to FILTERED instead of CURRENT. | ||
| 11471 | |||
| 11472 | Frame parameters not on this alist are passed intact, as if they were | ||
| 11473 | defined with ACTION = nil.") | ||
| 11474 | |||
| 11475 | (autoload 'frameset-frame-id "frameset" "\ | ||
| 11476 | Return the frame id of FRAME, if it has one; else, return nil. | ||
| 11477 | A frame id is a string that uniquely identifies a frame. | ||
| 11478 | It is persistent across `frameset-save' / `frameset-restore' | ||
| 11479 | invocations, and once assigned is never changed unless the same | ||
| 11480 | frame is duplicated (via `frameset-restore'), in which case the | ||
| 11481 | newest frame keeps the id and the old frame's is set to nil. | ||
| 11482 | |||
| 11483 | \(fn FRAME)" nil nil) | ||
| 11484 | |||
| 11485 | (autoload 'frameset-frame-id-equal-p "frameset" "\ | ||
| 11486 | Return non-nil if FRAME's id matches ID. | ||
| 11487 | |||
| 11488 | \(fn FRAME ID)" nil nil) | ||
| 11489 | |||
| 11490 | (autoload 'frameset-frame-with-id "frameset" "\ | ||
| 11491 | Return the live frame with id ID, if exists; else nil. | ||
| 11492 | If FRAME-LIST is a list of frames, check these frames only. | ||
| 11493 | If nil, check all live frames. | ||
| 11494 | |||
| 11495 | \(fn ID &optional FRAME-LIST)" nil nil) | ||
| 11496 | |||
| 11497 | (autoload 'frameset-save "frameset" "\ | ||
| 11498 | Return a frameset for FRAME-LIST, a list of frames. | ||
| 11499 | Dead frames and non-frame objects are silently removed from the list. | ||
| 11500 | If nil, FRAME-LIST defaults to the output of `frame-list' (all live frames). | ||
| 11501 | APP, NAME and DESCRIPTION are optional data; see the docstring of the | ||
| 11502 | `frameset' defstruct for details. | ||
| 11503 | FILTERS is an alist of parameter filters; if nil, the value of the variable | ||
| 11504 | `frameset-filter-alist' is used instead. | ||
| 11505 | PREDICATE is a predicate function, which must return non-nil for frames that | ||
| 11506 | should be saved; if PREDICATE is nil, all frames from FRAME-LIST are saved. | ||
| 11507 | PROPERTIES is a user-defined property list to add to the frameset. | ||
| 11508 | |||
| 11509 | \(fn FRAME-LIST &key APP NAME DESCRIPTION FILTERS PREDICATE PROPERTIES)" nil nil) | ||
| 11510 | |||
| 11511 | (autoload 'frameset-restore "frameset" "\ | ||
| 11512 | Restore a FRAMESET into the current display(s). | ||
| 11513 | |||
| 11514 | PREDICATE is a function called with two arguments, the parameter alist | ||
| 11515 | and the window-state of the frame being restored, in that order (see | ||
| 11516 | the docstring of the `frameset' defstruct for additional details). | ||
| 11517 | If PREDICATE returns nil, the frame described by that parameter alist | ||
| 11518 | and window-state is not restored. | ||
| 11519 | |||
| 11520 | FILTERS is an alist of parameter filters; if nil, the value of | ||
| 11521 | `frameset-filter-alist' is used instead. | ||
| 11522 | |||
| 11523 | REUSE-FRAMES selects the policy to use to reuse frames when restoring: | ||
| 11524 | t Reuse existing frames if possible, and delete those not reused. | ||
| 11525 | nil Restore frameset in new frames and delete existing frames. | ||
| 11526 | :keep Restore frameset in new frames and keep the existing ones. | ||
| 11527 | LIST A list of frames to reuse; only these are reused (if possible). | ||
| 11528 | Remaining frames in this list are deleted; other frames not | ||
| 11529 | included on the list are left untouched. | ||
| 11530 | |||
| 11531 | FORCE-DISPLAY can be: | ||
| 11532 | t Frames are restored in the current display. | ||
| 11533 | nil Frames are restored, if possible, in their original displays. | ||
| 11534 | :delete Frames in other displays are deleted instead of restored. | ||
| 11535 | PRED A function called with two arguments, the parameter alist and | ||
| 11536 | the window state (in that order). It must return t, nil or | ||
| 11537 | `:delete', as above but affecting only the frame that will | ||
| 11538 | be created from that parameter alist. | ||
| 11539 | |||
| 11540 | FORCE-ONSCREEN can be: | ||
| 11541 | t Force onscreen only those frames that are fully offscreen. | ||
| 11542 | nil Do not force any frame back onscreen. | ||
| 11543 | :all Force onscreen any frame fully or partially offscreen. | ||
| 11544 | PRED A function called with three arguments, | ||
| 11545 | - the live frame just restored, | ||
| 11546 | - a list (LEFT TOP WIDTH HEIGHT), describing the frame, | ||
| 11547 | - a list (LEFT TOP WIDTH HEIGHT), describing the workarea. | ||
| 11548 | It must return non-nil to force the frame onscreen, nil otherwise. | ||
| 11549 | |||
| 11550 | Note the timing and scope of the operations described above: REUSE-FRAMES | ||
| 11551 | affects existing frames; PREDICATE, FILTERS and FORCE-DISPLAY affect the frame | ||
| 11552 | being restored before that happens; and FORCE-ONSCREEN affects the frame once | ||
| 11553 | it has been restored. | ||
| 11554 | |||
| 11555 | All keyword parameters default to nil. | ||
| 11556 | |||
| 11557 | \(fn FRAMESET &key PREDICATE FILTERS REUSE-FRAMES FORCE-DISPLAY FORCE-ONSCREEN)" nil nil) | ||
| 11558 | |||
| 11559 | (autoload 'frameset-to-register "frameset" "\ | ||
| 11560 | Store the current frameset in register REGISTER. | ||
| 11561 | Use \\[jump-to-register] to restore the frameset. | ||
| 11562 | Argument is a character, naming the register. | ||
| 11563 | |||
| 11564 | \(fn REGISTER &optional ARG)" t nil) | ||
| 11565 | |||
| 11566 | ;;;*** | ||
| 11567 | |||
| 11319 | ;;;### (autoloads nil "gamegrid" "play/gamegrid.el" (20752 26925 | 11568 | ;;;### (autoloads nil "gamegrid" "play/gamegrid.el" (20752 26925 |
| 11320 | ;;;;;; 124734 677000)) | 11569 | ;;;;;; 124734 677000)) |
| 11321 | ;;; Generated autoloads from play/gamegrid.el | 11570 | ;;; Generated autoloads from play/gamegrid.el |
| 11322 | (push (purecopy (quote (gamegrid 1 2))) package--builtin-versions) | 11571 | (push (purecopy '(gamegrid 1 2)) package--builtin-versions) |
| 11323 | ;;;*** | 11572 | ;;;*** |
| 11324 | 11573 | ||
| 11325 | ;;;### (autoloads nil "gdb-mi" "progmodes/gdb-mi.el" (20932 61687 | 11574 | ;;;### (autoloads nil "gdb-mi" "progmodes/gdb-mi.el" (20992 52525 |
| 11326 | ;;;;;; 205708 148000)) | 11575 | ;;;;;; 458637 0)) |
| 11327 | ;;; Generated autoloads from progmodes/gdb-mi.el | 11576 | ;;; Generated autoloads from progmodes/gdb-mi.el |
| 11328 | 11577 | ||
| 11329 | (defvar gdb-enable-debug nil "\ | 11578 | (defvar gdb-enable-debug nil "\ |
| @@ -11551,9 +11800,9 @@ DEFAULT-MAP specifies the default key map for ICON-LIST. | |||
| 11551 | 11800 | ||
| 11552 | ;;;*** | 11801 | ;;;*** |
| 11553 | 11802 | ||
| 11554 | ;;;### (autoloads nil "gnus" "gnus/gnus.el" (20901 54695 989166 0)) | 11803 | ;;;### (autoloads nil "gnus" "gnus/gnus.el" (21002 1963 769129 0)) |
| 11555 | ;;; Generated autoloads from gnus/gnus.el | 11804 | ;;; Generated autoloads from gnus/gnus.el |
| 11556 | (push (purecopy (quote (gnus 5 13))) package--builtin-versions)(when (fboundp 'custom-autoload) | 11805 | (push (purecopy '(gnus 5 13)) package--builtin-versions)(when (fboundp 'custom-autoload) |
| 11557 | (custom-autoload 'gnus-select-method "gnus")) | 11806 | (custom-autoload 'gnus-select-method "gnus")) |
| 11558 | 11807 | ||
| 11559 | (autoload 'gnus-slave-no-server "gnus" "\ | 11808 | (autoload 'gnus-slave-no-server "gnus" "\ |
| @@ -11691,8 +11940,8 @@ If CLEAN, obsolete (ignore). | |||
| 11691 | 11940 | ||
| 11692 | ;;;*** | 11941 | ;;;*** |
| 11693 | 11942 | ||
| 11694 | ;;;### (autoloads nil "gnus-art" "gnus/gnus-art.el" (20941 25255 | 11943 | ;;;### (autoloads nil "gnus-art" "gnus/gnus-art.el" (20977 54298 |
| 11695 | ;;;;;; 50698 0)) | 11944 | ;;;;;; 858063 0)) |
| 11696 | ;;; Generated autoloads from gnus/gnus-art.el | 11945 | ;;; Generated autoloads from gnus/gnus-art.el |
| 11697 | 11946 | ||
| 11698 | (autoload 'gnus-article-prepare-display "gnus-art" "\ | 11947 | (autoload 'gnus-article-prepare-display "gnus-art" "\ |
| @@ -11768,8 +12017,8 @@ supported. | |||
| 11768 | 12017 | ||
| 11769 | ;;;*** | 12018 | ;;;*** |
| 11770 | 12019 | ||
| 11771 | ;;;### (autoloads nil "gnus-delay" "gnus/gnus-delay.el" (20791 9657 | 12020 | ;;;### (autoloads nil "gnus-delay" "gnus/gnus-delay.el" (20988 22031 |
| 11772 | ;;;;;; 561026 0)) | 12021 | ;;;;;; 837044 0)) |
| 11773 | ;;; Generated autoloads from gnus/gnus-delay.el | 12022 | ;;; Generated autoloads from gnus/gnus-delay.el |
| 11774 | 12023 | ||
| 11775 | (autoload 'gnus-delay-article "gnus-delay" "\ | 12024 | (autoload 'gnus-delay-article "gnus-delay" "\ |
| @@ -11905,8 +12154,8 @@ If gravatars are already displayed, remove them. | |||
| 11905 | 12154 | ||
| 11906 | ;;;*** | 12155 | ;;;*** |
| 11907 | 12156 | ||
| 11908 | ;;;### (autoloads nil "gnus-group" "gnus/gnus-group.el" (20929 34089 | 12157 | ;;;### (autoloads nil "gnus-group" "gnus/gnus-group.el" (20988 22031 |
| 11909 | ;;;;;; 117790 0)) | 12158 | ;;;;;; 837044 0)) |
| 11910 | ;;; Generated autoloads from gnus/gnus-group.el | 12159 | ;;; Generated autoloads from gnus/gnus-group.el |
| 11911 | 12160 | ||
| 11912 | (autoload 'gnus-fetch-group "gnus-group" "\ | 12161 | (autoload 'gnus-fetch-group "gnus-group" "\ |
| @@ -12078,8 +12327,8 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\") returns: | |||
| 12078 | 12327 | ||
| 12079 | ;;;*** | 12328 | ;;;*** |
| 12080 | 12329 | ||
| 12081 | ;;;### (autoloads nil "gnus-msg" "gnus/gnus-msg.el" (20858 21542 | 12330 | ;;;### (autoloads nil "gnus-msg" "gnus/gnus-msg.el" (20974 22577 |
| 12082 | ;;;;;; 723007 0)) | 12331 | ;;;;;; 548213 0)) |
| 12083 | ;;; Generated autoloads from gnus/gnus-msg.el | 12332 | ;;; Generated autoloads from gnus/gnus-msg.el |
| 12084 | 12333 | ||
| 12085 | (autoload 'gnus-msg-mail "gnus-msg" "\ | 12334 | (autoload 'gnus-msg-mail "gnus-msg" "\ |
| @@ -12214,8 +12463,8 @@ Add NUM into sorted LIST by side effect. | |||
| 12214 | 12463 | ||
| 12215 | ;;;*** | 12464 | ;;;*** |
| 12216 | 12465 | ||
| 12217 | ;;;### (autoloads nil "gnus-registry" "gnus/gnus-registry.el" (20779 | 12466 | ;;;### (autoloads nil "gnus-registry" "gnus/gnus-registry.el" (20955 |
| 12218 | ;;;;;; 18487 859617 0)) | 12467 | ;;;;;; 58152 201869 0)) |
| 12219 | ;;; Generated autoloads from gnus/gnus-registry.el | 12468 | ;;; Generated autoloads from gnus/gnus-registry.el |
| 12220 | 12469 | ||
| 12221 | (autoload 'gnus-registry-initialize "gnus-registry" "\ | 12470 | (autoload 'gnus-registry-initialize "gnus-registry" "\ |
| @@ -12269,8 +12518,8 @@ Update the format specification near point. | |||
| 12269 | 12518 | ||
| 12270 | ;;;*** | 12519 | ;;;*** |
| 12271 | 12520 | ||
| 12272 | ;;;### (autoloads nil "gnus-start" "gnus/gnus-start.el" (20763 30266 | 12521 | ;;;### (autoloads nil "gnus-start" "gnus/gnus-start.el" (20986 60038 |
| 12273 | ;;;;;; 231060 0)) | 12522 | ;;;;;; 720063 0)) |
| 12274 | ;;; Generated autoloads from gnus/gnus-start.el | 12523 | ;;; Generated autoloads from gnus/gnus-start.el |
| 12275 | 12524 | ||
| 12276 | (autoload 'gnus-declare-backend "gnus-start" "\ | 12525 | (autoload 'gnus-declare-backend "gnus-start" "\ |
| @@ -12280,8 +12529,8 @@ Declare back end NAME with ABILITIES as a Gnus back end. | |||
| 12280 | 12529 | ||
| 12281 | ;;;*** | 12530 | ;;;*** |
| 12282 | 12531 | ||
| 12283 | ;;;### (autoloads nil "gnus-sum" "gnus/gnus-sum.el" (20901 54695 | 12532 | ;;;### (autoloads nil "gnus-sum" "gnus/gnus-sum.el" (20984 58408 |
| 12284 | ;;;;;; 989166 0)) | 12533 | ;;;;;; 354075 0)) |
| 12285 | ;;; Generated autoloads from gnus/gnus-sum.el | 12534 | ;;; Generated autoloads from gnus/gnus-sum.el |
| 12286 | 12535 | ||
| 12287 | (autoload 'gnus-summary-bookmark-jump "gnus-sum" "\ | 12536 | (autoload 'gnus-summary-bookmark-jump "gnus-sum" "\ |
| @@ -12319,7 +12568,7 @@ Add the window configuration CONF to `gnus-buffer-configuration'. | |||
| 12319 | 12568 | ||
| 12320 | ;;;*** | 12569 | ;;;*** |
| 12321 | 12570 | ||
| 12322 | ;;;### (autoloads nil "gnutls" "net/gnutls.el" (20709 26818 907104 | 12571 | ;;;### (autoloads nil "gnutls" "net/gnutls.el" (20998 4934 952905 |
| 12323 | ;;;;;; 0)) | 12572 | ;;;;;; 0)) |
| 12324 | ;;; Generated autoloads from net/gnutls.el | 12573 | ;;; Generated autoloads from net/gnutls.el |
| 12325 | 12574 | ||
| @@ -12336,7 +12585,7 @@ A value of nil says to use the default GnuTLS value.") | |||
| 12336 | 12585 | ||
| 12337 | ;;;*** | 12586 | ;;;*** |
| 12338 | 12587 | ||
| 12339 | ;;;### (autoloads nil "gomoku" "play/gomoku.el" (20709 26818 907104 | 12588 | ;;;### (autoloads nil "gomoku" "play/gomoku.el" (20992 52525 458637 |
| 12340 | ;;;;;; 0)) | 12589 | ;;;;;; 0)) |
| 12341 | ;;; Generated autoloads from play/gomoku.el | 12590 | ;;; Generated autoloads from play/gomoku.el |
| 12342 | 12591 | ||
| @@ -12688,7 +12937,7 @@ it if ARG is omitted or nil. | |||
| 12688 | 12937 | ||
| 12689 | ;;;*** | 12938 | ;;;*** |
| 12690 | 12939 | ||
| 12691 | ;;;### (autoloads nil "gv" "emacs-lisp/gv.el" (20709 26818 907104 | 12940 | ;;;### (autoloads nil "gv" "emacs-lisp/gv.el" (21002 1963 769129 |
| 12692 | ;;;;;; 0)) | 12941 | ;;;;;; 0)) |
| 12693 | ;;; Generated autoloads from emacs-lisp/gv.el | 12942 | ;;; Generated autoloads from emacs-lisp/gv.el |
| 12694 | 12943 | ||
| @@ -13085,7 +13334,7 @@ Produce a texinfo buffer with sorted doc-strings from the DOC file. | |||
| 13085 | 13334 | ||
| 13086 | ;;;*** | 13335 | ;;;*** |
| 13087 | 13336 | ||
| 13088 | ;;;### (autoloads nil "help-macro" "help-macro.el" (20709 26818 907104 | 13337 | ;;;### (autoloads nil "help-macro" "help-macro.el" (20992 52525 458637 |
| 13089 | ;;;;;; 0)) | 13338 | ;;;;;; 0)) |
| 13090 | ;;; Generated autoloads from help-macro.el | 13339 | ;;; Generated autoloads from help-macro.el |
| 13091 | 13340 | ||
| @@ -13100,7 +13349,7 @@ gives the window that lists the options.") | |||
| 13100 | 13349 | ||
| 13101 | ;;;*** | 13350 | ;;;*** |
| 13102 | 13351 | ||
| 13103 | ;;;### (autoloads nil "help-mode" "help-mode.el" (20920 19111 869400 | 13352 | ;;;### (autoloads nil "help-mode" "help-mode.el" (20999 25770 522517 |
| 13104 | ;;;;;; 0)) | 13353 | ;;;;;; 0)) |
| 13105 | ;;; Generated autoloads from help-mode.el | 13354 | ;;; Generated autoloads from help-mode.el |
| 13106 | 13355 | ||
| @@ -13200,8 +13449,8 @@ BOOKMARK is a bookmark name or a bookmark record. | |||
| 13200 | 13449 | ||
| 13201 | ;;;*** | 13450 | ;;;*** |
| 13202 | 13451 | ||
| 13203 | ;;;### (autoloads nil "helper" "emacs-lisp/helper.el" (20709 26818 | 13452 | ;;;### (autoloads nil "helper" "emacs-lisp/helper.el" (20992 52525 |
| 13204 | ;;;;;; 907104 0)) | 13453 | ;;;;;; 458637 0)) |
| 13205 | ;;; Generated autoloads from emacs-lisp/helper.el | 13454 | ;;; Generated autoloads from emacs-lisp/helper.el |
| 13206 | 13455 | ||
| 13207 | (autoload 'Helper-describe-bindings "helper" "\ | 13456 | (autoload 'Helper-describe-bindings "helper" "\ |
| @@ -13588,7 +13837,7 @@ Unconditionally turn off `hs-minor-mode'. | |||
| 13588 | 13837 | ||
| 13589 | ;;;*** | 13838 | ;;;*** |
| 13590 | 13839 | ||
| 13591 | ;;;### (autoloads nil "hilit-chg" "hilit-chg.el" (20709 26818 907104 | 13840 | ;;;### (autoloads nil "hilit-chg" "hilit-chg.el" (20992 52525 458637 |
| 13592 | ;;;;;; 0)) | 13841 | ;;;;;; 0)) |
| 13593 | ;;; Generated autoloads from hilit-chg.el | 13842 | ;;; Generated autoloads from hilit-chg.el |
| 13594 | 13843 | ||
| @@ -13720,10 +13969,10 @@ See `highlight-changes-mode' for more information on Highlight-Changes mode. | |||
| 13720 | 13969 | ||
| 13721 | ;;;*** | 13970 | ;;;*** |
| 13722 | 13971 | ||
| 13723 | ;;;### (autoloads nil "hippie-exp" "hippie-exp.el" (20709 26818 907104 | 13972 | ;;;### (autoloads nil "hippie-exp" "hippie-exp.el" (20992 52525 458637 |
| 13724 | ;;;;;; 0)) | 13973 | ;;;;;; 0)) |
| 13725 | ;;; Generated autoloads from hippie-exp.el | 13974 | ;;; Generated autoloads from hippie-exp.el |
| 13726 | (push (purecopy (quote (hippie-exp 1 6))) package--builtin-versions) | 13975 | (push (purecopy '(hippie-exp 1 6)) package--builtin-versions) |
| 13727 | (defvar hippie-expand-try-functions-list '(try-complete-file-name-partially try-complete-file-name try-expand-all-abbrevs try-expand-list try-expand-line try-expand-dabbrev try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill try-complete-lisp-symbol-partially try-complete-lisp-symbol) "\ | 13976 | (defvar hippie-expand-try-functions-list '(try-complete-file-name-partially try-complete-file-name try-expand-all-abbrevs try-expand-list try-expand-line try-expand-dabbrev try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill try-complete-lisp-symbol-partially try-complete-lisp-symbol) "\ |
| 13728 | The list of expansion functions tried in order by `hippie-expand'. | 13977 | The list of expansion functions tried in order by `hippie-expand'. |
| 13729 | To change the behavior of `hippie-expand', remove, change the order of, | 13978 | To change the behavior of `hippie-expand', remove, change the order of, |
| @@ -13752,7 +14001,7 @@ argument VERBOSE non-nil makes the function verbose. | |||
| 13752 | 14001 | ||
| 13753 | ;;;*** | 14002 | ;;;*** |
| 13754 | 14003 | ||
| 13755 | ;;;### (autoloads nil "hl-line" "hl-line.el" (20709 26818 907104 | 14004 | ;;;### (autoloads nil "hl-line" "hl-line.el" (20992 52525 458637 |
| 13756 | ;;;;;; 0)) | 14005 | ;;;;;; 0)) |
| 13757 | ;;; Generated autoloads from hl-line.el | 14006 | ;;; Generated autoloads from hl-line.el |
| 13758 | 14007 | ||
| @@ -13965,7 +14214,7 @@ Convert HTML to plain text in the current buffer. | |||
| 13965 | ;;;### (autoloads nil "htmlfontify" "htmlfontify.el" (20938 49065 | 14214 | ;;;### (autoloads nil "htmlfontify" "htmlfontify.el" (20938 49065 |
| 13966 | ;;;;;; 383398 0)) | 14215 | ;;;;;; 383398 0)) |
| 13967 | ;;; Generated autoloads from htmlfontify.el | 14216 | ;;; Generated autoloads from htmlfontify.el |
| 13968 | (push (purecopy (quote (htmlfontify 0 21))) package--builtin-versions) | 14217 | (push (purecopy '(htmlfontify 0 21)) package--builtin-versions) |
| 13969 | (autoload 'htmlfontify-buffer "htmlfontify" "\ | 14218 | (autoload 'htmlfontify-buffer "htmlfontify" "\ |
| 13970 | Create a new buffer, named for the current buffer + a .html extension, | 14219 | Create a new buffer, named for the current buffer + a .html extension, |
| 13971 | containing an inline CSS-stylesheet and formatted CSS-markup HTML | 14220 | containing an inline CSS-stylesheet and formatted CSS-markup HTML |
| @@ -14084,8 +14333,8 @@ bound to the current value of the filter. | |||
| 14084 | 14333 | ||
| 14085 | ;;;*** | 14334 | ;;;*** |
| 14086 | 14335 | ||
| 14087 | ;;;### (autoloads nil "ibuffer" "ibuffer.el" (20921 40206 193565 | 14336 | ;;;### (autoloads nil "ibuffer" "ibuffer.el" (20999 25770 522517 |
| 14088 | ;;;;;; 167000)) | 14337 | ;;;;;; 0)) |
| 14089 | ;;; Generated autoloads from ibuffer.el | 14338 | ;;; Generated autoloads from ibuffer.el |
| 14090 | 14339 | ||
| 14091 | (autoload 'ibuffer-list-buffers "ibuffer" "\ | 14340 | (autoload 'ibuffer-list-buffers "ibuffer" "\ |
| @@ -14127,7 +14376,7 @@ FORMATS is the value to use for `ibuffer-formats'. | |||
| 14127 | ;;;### (autoloads nil "icalendar" "calendar/icalendar.el" (20709 | 14376 | ;;;### (autoloads nil "icalendar" "calendar/icalendar.el" (20709 |
| 14128 | ;;;;;; 26818 907104 0)) | 14377 | ;;;;;; 26818 907104 0)) |
| 14129 | ;;; Generated autoloads from calendar/icalendar.el | 14378 | ;;; Generated autoloads from calendar/icalendar.el |
| 14130 | (push (purecopy (quote (icalendar 0 19))) package--builtin-versions) | 14379 | (push (purecopy '(icalendar 0 19)) package--builtin-versions) |
| 14131 | (autoload 'icalendar-export-file "icalendar" "\ | 14380 | (autoload 'icalendar-export-file "icalendar" "\ |
| 14132 | Export diary file to iCalendar format. | 14381 | Export diary file to iCalendar format. |
| 14133 | All diary entries in the file DIARY-FILENAME are converted to iCalendar | 14382 | All diary entries in the file DIARY-FILENAME are converted to iCalendar |
| @@ -14177,7 +14426,7 @@ buffer `*icalendar-errors*'. | |||
| 14177 | 14426 | ||
| 14178 | ;;;*** | 14427 | ;;;*** |
| 14179 | 14428 | ||
| 14180 | ;;;### (autoloads nil "icomplete" "icomplete.el" (20766 59066 666084 | 14429 | ;;;### (autoloads nil "icomplete" "icomplete.el" (20992 52525 458637 |
| 14181 | ;;;;;; 0)) | 14430 | ;;;;;; 0)) |
| 14182 | ;;; Generated autoloads from icomplete.el | 14431 | ;;; Generated autoloads from icomplete.el |
| 14183 | 14432 | ||
| @@ -14270,7 +14519,7 @@ See also the variable `idlwave-shell-prompt-pattern'. | |||
| 14270 | ;;;### (autoloads nil "idlwave" "progmodes/idlwave.el" (20929 34089 | 14519 | ;;;### (autoloads nil "idlwave" "progmodes/idlwave.el" (20929 34089 |
| 14271 | ;;;;;; 117790 0)) | 14520 | ;;;;;; 117790 0)) |
| 14272 | ;;; Generated autoloads from progmodes/idlwave.el | 14521 | ;;; Generated autoloads from progmodes/idlwave.el |
| 14273 | (push (purecopy (quote (idlwave 6 1 22))) package--builtin-versions) | 14522 | (push (purecopy '(idlwave 6 1 22)) package--builtin-versions) |
| 14274 | (autoload 'idlwave-mode "idlwave" "\ | 14523 | (autoload 'idlwave-mode "idlwave" "\ |
| 14275 | Major mode for editing IDL source files (version 6.1_em22). | 14524 | Major mode for editing IDL source files (version 6.1_em22). |
| 14276 | 14525 | ||
| @@ -14395,17 +14644,17 @@ The main features of this mode are | |||
| 14395 | 14644 | ||
| 14396 | ;;;*** | 14645 | ;;;*** |
| 14397 | 14646 | ||
| 14398 | ;;;### (autoloads nil "ido" "ido.el" (20937 28198 475168 0)) | 14647 | ;;;### (autoloads nil "ido" "ido.el" (20996 49577 892030 0)) |
| 14399 | ;;; Generated autoloads from ido.el | 14648 | ;;; Generated autoloads from ido.el |
| 14400 | 14649 | ||
| 14401 | (defvar ido-mode nil "\ | 14650 | (defvar ido-mode nil "\ |
| 14402 | Determines for which functional group (buffer and files) ido behavior | 14651 | Determines for which buffer/file Ido should be enabled. |
| 14403 | should be enabled. The following values are possible: | 14652 | The following values are possible: |
| 14404 | - `buffer': Turn only on ido buffer behavior (switching, killing, | 14653 | - `buffer': Turn only on ido buffer behavior (switching, killing, |
| 14405 | displaying...) | 14654 | displaying...) |
| 14406 | - `file': Turn only on ido file behavior (finding, writing, inserting...) | 14655 | - `file': Turn only on ido file behavior (finding, writing, inserting...) |
| 14407 | - `both': Turn on ido buffer and file behavior. | 14656 | - `both': Turn on ido buffer and file behavior. |
| 14408 | - `nil': Turn off any ido switching. | 14657 | - nil: Turn off any ido switching. |
| 14409 | 14658 | ||
| 14410 | Setting this variable directly does not take effect; | 14659 | Setting this variable directly does not take effect; |
| 14411 | use either \\[customize] or the function `ido-mode'.") | 14660 | use either \\[customize] or the function `ido-mode'.") |
| @@ -14681,7 +14930,7 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'. | |||
| 14681 | 14930 | ||
| 14682 | ;;;*** | 14931 | ;;;*** |
| 14683 | 14932 | ||
| 14684 | ;;;### (autoloads nil "image" "image.el" (20903 10024 645978 0)) | 14933 | ;;;### (autoloads nil "image" "image.el" (21005 64551 555603 0)) |
| 14685 | ;;; Generated autoloads from image.el | 14934 | ;;; Generated autoloads from image.el |
| 14686 | 14935 | ||
| 14687 | (autoload 'image-type-from-data "image" "\ | 14936 | (autoload 'image-type-from-data "image" "\ |
| @@ -14874,10 +15123,10 @@ If Emacs is compiled without ImageMagick support, this does nothing. | |||
| 14874 | 15123 | ||
| 14875 | ;;;*** | 15124 | ;;;*** |
| 14876 | 15125 | ||
| 14877 | ;;;### (autoloads nil "image-dired" "image-dired.el" (20921 39978 | 15126 | ;;;### (autoloads nil "image-dired" "image-dired.el" (20971 46377 |
| 14878 | ;;;;;; 248467 0)) | 15127 | ;;;;;; 737658 0)) |
| 14879 | ;;; Generated autoloads from image-dired.el | 15128 | ;;; Generated autoloads from image-dired.el |
| 14880 | (push (purecopy (quote (image-dired 0 4 11))) package--builtin-versions) | 15129 | (push (purecopy '(image-dired 0 4 11)) package--builtin-versions) |
| 14881 | (autoload 'image-dired-dired-toggle-marked-thumbs "image-dired" "\ | 15130 | (autoload 'image-dired-dired-toggle-marked-thumbs "image-dired" "\ |
| 14882 | Toggle thumbnails in front of file names in the dired buffer. | 15131 | Toggle thumbnails in front of file names in the dired buffer. |
| 14883 | If no marked file could be found, insert or hide thumbnails on the | 15132 | If no marked file could be found, insert or hide thumbnails on the |
| @@ -15074,7 +15323,7 @@ An image file is one whose name has an extension in | |||
| 15074 | 15323 | ||
| 15075 | ;;;*** | 15324 | ;;;*** |
| 15076 | 15325 | ||
| 15077 | ;;;### (autoloads nil "image-mode" "image-mode.el" (20899 12965 791908 | 15326 | ;;;### (autoloads nil "image-mode" "image-mode.el" (21005 64551 555603 |
| 15078 | ;;;;;; 0)) | 15327 | ;;;;;; 0)) |
| 15079 | ;;; Generated autoloads from image-mode.el | 15328 | ;;; Generated autoloads from image-mode.el |
| 15080 | 15329 | ||
| @@ -15083,6 +15332,9 @@ Major mode for image files. | |||
| 15083 | You can use \\<image-mode-map>\\[image-toggle-display] | 15332 | You can use \\<image-mode-map>\\[image-toggle-display] |
| 15084 | to toggle between display as an image and display as text. | 15333 | to toggle between display as an image and display as text. |
| 15085 | 15334 | ||
| 15335 | Key bindings: | ||
| 15336 | \\{image-mode-map} | ||
| 15337 | |||
| 15086 | \(fn)" t nil) | 15338 | \(fn)" t nil) |
| 15087 | 15339 | ||
| 15088 | (autoload 'image-minor-mode "image-mode" "\ | 15340 | (autoload 'image-minor-mode "image-mode" "\ |
| @@ -15307,7 +15559,7 @@ of `inferior-lisp-program'). Runs the hooks from | |||
| 15307 | 15559 | ||
| 15308 | ;;;*** | 15560 | ;;;*** |
| 15309 | 15561 | ||
| 15310 | ;;;### (autoloads nil "info" "info.el" (20940 4391 641153 0)) | 15562 | ;;;### (autoloads nil "info" "info.el" (20992 52525 458637 0)) |
| 15311 | ;;; Generated autoloads from info.el | 15563 | ;;; Generated autoloads from info.el |
| 15312 | 15564 | ||
| 15313 | (defcustom Info-default-directory-list (let* ((config-dir (file-name-as-directory (or (and (featurep 'ns) (let ((dir (expand-file-name "../info" data-directory))) (if (file-directory-p dir) dir))) configure-info-directory))) (prefixes (prune-directory-list '("/usr/local/" "/usr/" "/opt/" "/"))) (suffixes '("share/" "" "gnu/" "gnu/lib/" "gnu/lib/emacs/" "emacs/" "lib/" "lib/emacs/")) (standard-info-dirs (apply #'nconc (mapcar (lambda (pfx) (let ((dirs (mapcar (lambda (sfx) (concat pfx sfx "info/")) suffixes))) (prune-directory-list dirs))) prefixes))) (dirs (if (member config-dir standard-info-dirs) (nconc standard-info-dirs (list config-dir)) (cons config-dir standard-info-dirs)))) (if (not (eq system-type 'windows-nt)) dirs (let* ((instdir (file-name-directory invocation-directory)) (dir1 (expand-file-name "../info/" instdir)) (dir2 (expand-file-name "../../../info/" instdir))) (cond ((file-exists-p dir1) (append dirs (list dir1))) ((file-exists-p dir2) (append dirs (list dir2))) (t dirs))))) "\ | 15565 | (defcustom Info-default-directory-list (let* ((config-dir (file-name-as-directory (or (and (featurep 'ns) (let ((dir (expand-file-name "../info" data-directory))) (if (file-directory-p dir) dir))) configure-info-directory))) (prefixes (prune-directory-list '("/usr/local/" "/usr/" "/opt/" "/"))) (suffixes '("share/" "" "gnu/" "gnu/lib/" "gnu/lib/emacs/" "emacs/" "lib/" "lib/emacs/")) (standard-info-dirs (apply #'nconc (mapcar (lambda (pfx) (let ((dirs (mapcar (lambda (sfx) (concat pfx sfx "info/")) suffixes))) (prune-directory-list dirs))) prefixes))) (dirs (if (member config-dir standard-info-dirs) (nconc standard-info-dirs (list config-dir)) (cons config-dir standard-info-dirs)))) (if (not (eq system-type 'windows-nt)) dirs (let* ((instdir (file-name-directory invocation-directory)) (dir1 (expand-file-name "../info/" instdir)) (dir2 (expand-file-name "../../../info/" instdir))) (cond ((file-exists-p dir1) (append dirs (list dir1))) ((file-exists-p dir2) (append dirs (list dir2))) (t dirs))))) "\ |
| @@ -15566,10 +15818,10 @@ Perform completion on file preceding point. | |||
| 15566 | 15818 | ||
| 15567 | ;;;*** | 15819 | ;;;*** |
| 15568 | 15820 | ||
| 15569 | ;;;### (autoloads nil "info-xref" "info-xref.el" (20938 49065 383398 | 15821 | ;;;### (autoloads nil "info-xref" "info-xref.el" (20947 64044 876888 |
| 15570 | ;;;;;; 0)) | 15822 | ;;;;;; 0)) |
| 15571 | ;;; Generated autoloads from info-xref.el | 15823 | ;;; Generated autoloads from info-xref.el |
| 15572 | (push (purecopy (quote (info-xref 3))) package--builtin-versions) | 15824 | (push (purecopy '(info-xref 3)) package--builtin-versions) |
| 15573 | (autoload 'info-xref-check "info-xref" "\ | 15825 | (autoload 'info-xref-check "info-xref" "\ |
| 15574 | Check external references in FILENAME, an info document. | 15826 | Check external references in FILENAME, an info document. |
| 15575 | Interactively from an `Info-mode' or `texinfo-mode' buffer the | 15827 | Interactively from an `Info-mode' or `texinfo-mode' buffer the |
| @@ -15698,7 +15950,7 @@ For example, invoke \"emacs -batch -f batch-info-validate $info/ ~/*.info\" | |||
| 15698 | ;;;### (autoloads nil "inversion" "cedet/inversion.el" (20745 310 | 15950 | ;;;### (autoloads nil "inversion" "cedet/inversion.el" (20745 310 |
| 15699 | ;;;;;; 425822 0)) | 15951 | ;;;;;; 425822 0)) |
| 15700 | ;;; Generated autoloads from cedet/inversion.el | 15952 | ;;; Generated autoloads from cedet/inversion.el |
| 15701 | (push (purecopy (quote (inversion 1 3))) package--builtin-versions) | 15953 | (push (purecopy '(inversion 1 3)) package--builtin-versions) |
| 15702 | (autoload 'inversion-require-emacs "inversion" "\ | 15954 | (autoload 'inversion-require-emacs "inversion" "\ |
| 15703 | Declare that you need either EMACS-VER, XEMACS-VER or SXEMACS-ver. | 15955 | Declare that you need either EMACS-VER, XEMACS-VER or SXEMACS-ver. |
| 15704 | Only checks one based on which kind of Emacs is being run. | 15956 | Only checks one based on which kind of Emacs is being run. |
| @@ -15731,7 +15983,7 @@ Toggle input method in interactive search. | |||
| 15731 | ;;;### (autoloads nil "isearchb" "isearchb.el" (20709 26818 907104 | 15983 | ;;;### (autoloads nil "isearchb" "isearchb.el" (20709 26818 907104 |
| 15732 | ;;;;;; 0)) | 15984 | ;;;;;; 0)) |
| 15733 | ;;; Generated autoloads from isearchb.el | 15985 | ;;; Generated autoloads from isearchb.el |
| 15734 | (push (purecopy (quote (isearchb 1 5))) package--builtin-versions) | 15986 | (push (purecopy '(isearchb 1 5)) package--builtin-versions) |
| 15735 | (autoload 'isearchb-activate "isearchb" "\ | 15987 | (autoload 'isearchb-activate "isearchb" "\ |
| 15736 | Active isearchb mode for subsequent alphanumeric keystrokes. | 15988 | Active isearchb mode for subsequent alphanumeric keystrokes. |
| 15737 | Executing this command again will terminate the search; or, if | 15989 | Executing this command again will terminate the search; or, if |
| @@ -15841,8 +16093,8 @@ Add submenus to the File menu, to convert to and from various formats. | |||
| 15841 | 16093 | ||
| 15842 | ;;;*** | 16094 | ;;;*** |
| 15843 | 16095 | ||
| 15844 | ;;;### (autoloads nil "ispell" "textmodes/ispell.el" (20847 51240 | 16096 | ;;;### (autoloads nil "ispell" "textmodes/ispell.el" (20992 52525 |
| 15845 | ;;;;;; 240216 0)) | 16097 | ;;;;;; 458637 0)) |
| 15846 | ;;; Generated autoloads from textmodes/ispell.el | 16098 | ;;; Generated autoloads from textmodes/ispell.el |
| 15847 | 16099 | ||
| 15848 | (put 'ispell-check-comments 'safe-local-variable (lambda (a) (memq a '(nil t exclusive)))) | 16100 | (put 'ispell-check-comments 'safe-local-variable (lambda (a) (memq a '(nil t exclusive)))) |
| @@ -16179,7 +16431,7 @@ If non-nil, second arg INITIAL-INPUT is a string to insert before reading. | |||
| 16179 | 16431 | ||
| 16180 | ;;;*** | 16432 | ;;;*** |
| 16181 | 16433 | ||
| 16182 | ;;;### (autoloads nil "jka-compr" "jka-compr.el" (20759 33211 414988 | 16434 | ;;;### (autoloads nil "jka-compr" "jka-compr.el" (20998 4934 952905 |
| 16183 | ;;;;;; 0)) | 16435 | ;;;;;; 0)) |
| 16184 | ;;; Generated autoloads from jka-compr.el | 16436 | ;;; Generated autoloads from jka-compr.el |
| 16185 | 16437 | ||
| @@ -16203,10 +16455,9 @@ by `jka-compr-installed'. | |||
| 16203 | 16455 | ||
| 16204 | ;;;*** | 16456 | ;;;*** |
| 16205 | 16457 | ||
| 16206 | ;;;### (autoloads nil "js" "progmodes/js.el" (20895 15912 444844 | 16458 | ;;;### (autoloads nil "js" "progmodes/js.el" (20998 4934 952905 0)) |
| 16207 | ;;;;;; 0)) | ||
| 16208 | ;;; Generated autoloads from progmodes/js.el | 16459 | ;;; Generated autoloads from progmodes/js.el |
| 16209 | (push (purecopy (quote (js 9))) package--builtin-versions) | 16460 | (push (purecopy '(js 9)) package--builtin-versions) |
| 16210 | (autoload 'js-mode "js" "\ | 16461 | (autoload 'js-mode "js" "\ |
| 16211 | Major mode for editing JavaScript. | 16462 | Major mode for editing JavaScript. |
| 16212 | 16463 | ||
| @@ -16215,9 +16466,9 @@ Major mode for editing JavaScript. | |||
| 16215 | 16466 | ||
| 16216 | ;;;*** | 16467 | ;;;*** |
| 16217 | 16468 | ||
| 16218 | ;;;### (autoloads nil "json" "json.el" (20709 26818 907104 0)) | 16469 | ;;;### (autoloads nil "json" "json.el" (20998 4934 952905 0)) |
| 16219 | ;;; Generated autoloads from json.el | 16470 | ;;; Generated autoloads from json.el |
| 16220 | (push (purecopy (quote (json 1 4))) package--builtin-versions) | 16471 | (push (purecopy '(json 1 4)) package--builtin-versions) |
| 16221 | ;;;*** | 16472 | ;;;*** |
| 16222 | 16473 | ||
| 16223 | ;;;### (autoloads nil "keypad" "emulation/keypad.el" (20709 26818 | 16474 | ;;;### (autoloads nil "keypad" "emulation/keypad.el" (20709 26818 |
| @@ -16298,7 +16549,7 @@ the context of text formatting. | |||
| 16298 | 16549 | ||
| 16299 | ;;;*** | 16550 | ;;;*** |
| 16300 | 16551 | ||
| 16301 | ;;;### (autoloads nil "kkc" "international/kkc.el" (20799 169 640767 | 16552 | ;;;### (autoloads nil "kkc" "international/kkc.el" (20998 4934 952905 |
| 16302 | ;;;;;; 0)) | 16553 | ;;;;;; 0)) |
| 16303 | ;;; Generated autoloads from international/kkc.el | 16554 | ;;; Generated autoloads from international/kkc.el |
| 16304 | 16555 | ||
| @@ -16447,8 +16698,8 @@ The kind of Korean keyboard for Korean input method. | |||
| 16447 | 16698 | ||
| 16448 | ;;;*** | 16699 | ;;;*** |
| 16449 | 16700 | ||
| 16450 | ;;;### (autoloads nil "landmark" "play/landmark.el" (20709 26818 | 16701 | ;;;### (autoloads nil "landmark" "play/landmark.el" (20992 52525 |
| 16451 | ;;;;;; 907104 0)) | 16702 | ;;;;;; 458637 0)) |
| 16452 | ;;; Generated autoloads from play/landmark.el | 16703 | ;;; Generated autoloads from play/landmark.el |
| 16453 | 16704 | ||
| 16454 | (defalias 'landmark-repeat 'landmark-test-run) | 16705 | (defalias 'landmark-repeat 'landmark-test-run) |
| @@ -16601,7 +16852,7 @@ A major mode to edit GNU ld script files | |||
| 16601 | 16852 | ||
| 16602 | ;;;*** | 16853 | ;;;*** |
| 16603 | 16854 | ||
| 16604 | ;;;### (autoloads nil "life" "play/life.el" (20709 26818 907104 0)) | 16855 | ;;;### (autoloads nil "life" "play/life.el" (20998 4934 952905 0)) |
| 16605 | ;;; Generated autoloads from play/life.el | 16856 | ;;; Generated autoloads from play/life.el |
| 16606 | 16857 | ||
| 16607 | (autoload 'life "life" "\ | 16858 | (autoload 'life "life" "\ |
| @@ -16616,7 +16867,7 @@ generations (this defaults to 1). | |||
| 16616 | 16867 | ||
| 16617 | ;;;### (autoloads nil "linum" "linum.el" (20709 26818 907104 0)) | 16868 | ;;;### (autoloads nil "linum" "linum.el" (20709 26818 907104 0)) |
| 16618 | ;;; Generated autoloads from linum.el | 16869 | ;;; Generated autoloads from linum.el |
| 16619 | (push (purecopy (quote (linum 0 9 24))) package--builtin-versions) | 16870 | (push (purecopy '(linum 0 9 24)) package--builtin-versions) |
| 16620 | (autoload 'linum-mode "linum" "\ | 16871 | (autoload 'linum-mode "linum" "\ |
| 16621 | Toggle display of line numbers in the left margin (Linum mode). | 16872 | Toggle display of line numbers in the left margin (Linum mode). |
| 16622 | With a prefix argument ARG, enable Linum mode if ARG is positive, | 16873 | With a prefix argument ARG, enable Linum mode if ARG is positive, |
| @@ -16766,7 +17017,7 @@ done. Otherwise, it uses the current buffer. | |||
| 16766 | 17017 | ||
| 16767 | ;;;*** | 17018 | ;;;*** |
| 16768 | 17019 | ||
| 16769 | ;;;### (autoloads nil "log-view" "vc/log-view.el" (20918 63784 852859 | 17020 | ;;;### (autoloads nil "log-view" "vc/log-view.el" (20986 13739 89657 |
| 16770 | ;;;;;; 0)) | 17021 | ;;;;;; 0)) |
| 16771 | ;;; Generated autoloads from vc/log-view.el | 17022 | ;;; Generated autoloads from vc/log-view.el |
| 16772 | 17023 | ||
| @@ -16777,7 +17028,7 @@ Major mode for browsing CVS log output. | |||
| 16777 | 17028 | ||
| 16778 | ;;;*** | 17029 | ;;;*** |
| 16779 | 17030 | ||
| 16780 | ;;;### (autoloads nil "lpr" "lpr.el" (20878 6823 881439 0)) | 17031 | ;;;### (autoloads nil "lpr" "lpr.el" (20975 43430 521692 0)) |
| 16781 | ;;; Generated autoloads from lpr.el | 17032 | ;;; Generated autoloads from lpr.el |
| 16782 | 17033 | ||
| 16783 | (defvar lpr-windows-system (memq system-type '(ms-dos windows-nt)) "\ | 17034 | (defvar lpr-windows-system (memq system-type '(ms-dos windows-nt)) "\ |
| @@ -17184,8 +17435,8 @@ double-quotes. | |||
| 17184 | 17435 | ||
| 17185 | ;;;*** | 17436 | ;;;*** |
| 17186 | 17437 | ||
| 17187 | ;;;### (autoloads nil "mailalias" "mail/mailalias.el" (20709 26818 | 17438 | ;;;### (autoloads nil "mailalias" "mail/mailalias.el" (20970 25513 |
| 17188 | ;;;;;; 907104 0)) | 17439 | ;;;;;; 362767 0)) |
| 17189 | ;;; Generated autoloads from mail/mailalias.el | 17440 | ;;; Generated autoloads from mail/mailalias.el |
| 17190 | 17441 | ||
| 17191 | (defvar mail-complete-style 'angles "\ | 17442 | (defvar mail-complete-style 'angles "\ |
| @@ -17437,7 +17688,7 @@ Default bookmark handler for Man buffers. | |||
| 17437 | 17688 | ||
| 17438 | ;;;### (autoloads nil "master" "master.el" (20884 7264 912957 506000)) | 17689 | ;;;### (autoloads nil "master" "master.el" (20884 7264 912957 506000)) |
| 17439 | ;;; Generated autoloads from master.el | 17690 | ;;; Generated autoloads from master.el |
| 17440 | (push (purecopy (quote (master 1 0 2))) package--builtin-versions) | 17691 | (push (purecopy '(master 1 0 2)) package--builtin-versions) |
| 17441 | (autoload 'master-mode "master" "\ | 17692 | (autoload 'master-mode "master" "\ |
| 17442 | Toggle Master mode. | 17693 | Toggle Master mode. |
| 17443 | With a prefix argument ARG, enable Master mode if ARG is | 17694 | With a prefix argument ARG, enable Master mode if ARG is |
| @@ -17487,10 +17738,10 @@ recursion depth in the minibuffer prompt. This is only useful if | |||
| 17487 | 17738 | ||
| 17488 | ;;;### (autoloads nil "md4" "md4.el" (20709 26818 907104 0)) | 17739 | ;;;### (autoloads nil "md4" "md4.el" (20709 26818 907104 0)) |
| 17489 | ;;; Generated autoloads from md4.el | 17740 | ;;; Generated autoloads from md4.el |
| 17490 | (push (purecopy (quote (md4 1 0))) package--builtin-versions) | 17741 | (push (purecopy '(md4 1 0)) package--builtin-versions) |
| 17491 | ;;;*** | 17742 | ;;;*** |
| 17492 | 17743 | ||
| 17493 | ;;;### (autoloads nil "message" "gnus/message.el" (20889 63525 775294 | 17744 | ;;;### (autoloads nil "message" "gnus/message.el" (20986 60038 720063 |
| 17494 | ;;;;;; 0)) | 17745 | ;;;;;; 0)) |
| 17495 | ;;; Generated autoloads from gnus/message.el | 17746 | ;;; Generated autoloads from gnus/message.el |
| 17496 | 17747 | ||
| @@ -17659,7 +17910,7 @@ which specify the range to operate on. | |||
| 17659 | ;;;### (autoloads nil "meta-mode" "progmodes/meta-mode.el" (20874 | 17910 | ;;;### (autoloads nil "meta-mode" "progmodes/meta-mode.el" (20874 |
| 17660 | ;;;;;; 62962 290468 0)) | 17911 | ;;;;;; 62962 290468 0)) |
| 17661 | ;;; Generated autoloads from progmodes/meta-mode.el | 17912 | ;;; Generated autoloads from progmodes/meta-mode.el |
| 17662 | (push (purecopy (quote (meta-mode 1 0))) package--builtin-versions) | 17913 | (push (purecopy '(meta-mode 1 0)) package--builtin-versions) |
| 17663 | (autoload 'metafont-mode "meta-mode" "\ | 17914 | (autoload 'metafont-mode "meta-mode" "\ |
| 17664 | Major mode for editing Metafont sources. | 17915 | Major mode for editing Metafont sources. |
| 17665 | 17916 | ||
| @@ -17807,9 +18058,9 @@ delete the draft message. | |||
| 17807 | 18058 | ||
| 17808 | ;;;*** | 18059 | ;;;*** |
| 17809 | 18060 | ||
| 17810 | ;;;### (autoloads nil "mh-e" "mh-e/mh-e.el" (20874 65006 672942 217000)) | 18061 | ;;;### (autoloads nil "mh-e" "mh-e/mh-e.el" (20987 34598 970563 0)) |
| 17811 | ;;; Generated autoloads from mh-e/mh-e.el | 18062 | ;;; Generated autoloads from mh-e/mh-e.el |
| 17812 | (push (purecopy (quote (mh-e 8 5))) package--builtin-versions) | 18063 | (push (purecopy '(mh-e 8 5)) package--builtin-versions) |
| 17813 | (put 'mh-progs 'risky-local-variable t) | 18064 | (put 'mh-progs 'risky-local-variable t) |
| 17814 | 18065 | ||
| 17815 | (put 'mh-lib 'risky-local-variable t) | 18066 | (put 'mh-lib 'risky-local-variable t) |
| @@ -18072,10 +18323,10 @@ whose file names match the specified wildcard. | |||
| 18072 | 18323 | ||
| 18073 | ;;;*** | 18324 | ;;;*** |
| 18074 | 18325 | ||
| 18075 | ;;;### (autoloads nil "mixal-mode" "progmodes/mixal-mode.el" (20709 | 18326 | ;;;### (autoloads nil "mixal-mode" "progmodes/mixal-mode.el" (21002 |
| 18076 | ;;;;;; 26818 907104 0)) | 18327 | ;;;;;; 1963 769129 0)) |
| 18077 | ;;; Generated autoloads from progmodes/mixal-mode.el | 18328 | ;;; Generated autoloads from progmodes/mixal-mode.el |
| 18078 | (push (purecopy (quote (mixal-mode 0 1))) package--builtin-versions) | 18329 | (push (purecopy '(mixal-mode 0 1)) package--builtin-versions) |
| 18079 | (autoload 'mixal-mode "mixal-mode" "\ | 18330 | (autoload 'mixal-mode "mixal-mode" "\ |
| 18080 | Major mode for the mixal asm language. | 18331 | Major mode for the mixal asm language. |
| 18081 | 18332 | ||
| @@ -18205,7 +18456,7 @@ body) or \"attachment\" (separate from the body). | |||
| 18205 | 18456 | ||
| 18206 | ;;;*** | 18457 | ;;;*** |
| 18207 | 18458 | ||
| 18208 | ;;;### (autoloads nil "mml2015" "gnus/mml2015.el" (20922 60838 997229 | 18459 | ;;;### (autoloads nil "mml2015" "gnus/mml2015.el" (20986 60038 720063 |
| 18209 | ;;;;;; 0)) | 18460 | ;;;;;; 0)) |
| 18210 | ;;; Generated autoloads from gnus/mml2015.el | 18461 | ;;; Generated autoloads from gnus/mml2015.el |
| 18211 | 18462 | ||
| @@ -18314,7 +18565,7 @@ Convert NATO phonetic alphabet in region to ordinary ASCII text. | |||
| 18314 | 18565 | ||
| 18315 | ;;;*** | 18566 | ;;;*** |
| 18316 | 18567 | ||
| 18317 | ;;;### (autoloads nil "mouse-drag" "mouse-drag.el" (20709 26818 907104 | 18568 | ;;;### (autoloads nil "mouse-drag" "mouse-drag.el" (20992 52525 458637 |
| 18318 | ;;;;;; 0)) | 18569 | ;;;;;; 0)) |
| 18319 | ;;; Generated autoloads from mouse-drag.el | 18570 | ;;; Generated autoloads from mouse-drag.el |
| 18320 | 18571 | ||
| @@ -18362,7 +18613,7 @@ To test this function, evaluate: | |||
| 18362 | 18613 | ||
| 18363 | ;;;*** | 18614 | ;;;*** |
| 18364 | 18615 | ||
| 18365 | ;;;### (autoloads nil "mpc" "mpc.el" (20838 36262 626321 0)) | 18616 | ;;;### (autoloads nil "mpc" "mpc.el" (20998 4934 952905 0)) |
| 18366 | ;;; Generated autoloads from mpc.el | 18617 | ;;; Generated autoloads from mpc.el |
| 18367 | 18618 | ||
| 18368 | (autoload 'mpc "mpc" "\ | 18619 | (autoload 'mpc "mpc" "\ |
| @@ -18382,7 +18633,7 @@ Multiplication puzzle with GNU Emacs. | |||
| 18382 | 18633 | ||
| 18383 | ;;;*** | 18634 | ;;;*** |
| 18384 | 18635 | ||
| 18385 | ;;;### (autoloads nil "msb" "msb.el" (20709 26818 907104 0)) | 18636 | ;;;### (autoloads nil "msb" "msb.el" (20999 25770 522517 0)) |
| 18386 | ;;; Generated autoloads from msb.el | 18637 | ;;; Generated autoloads from msb.el |
| 18387 | 18638 | ||
| 18388 | (defvar msb-mode nil "\ | 18639 | (defvar msb-mode nil "\ |
| @@ -18540,8 +18791,8 @@ The default is 20. If LIMIT is negative, do not limit the listing. | |||
| 18540 | 18791 | ||
| 18541 | ;;;*** | 18792 | ;;;*** |
| 18542 | 18793 | ||
| 18543 | ;;;### (autoloads nil "mule-util" "international/mule-util.el" (20826 | 18794 | ;;;### (autoloads nil "mule-util" "international/mule-util.el" (20991 |
| 18544 | ;;;;;; 45095 436233 0)) | 18795 | ;;;;;; 31656 363459 0)) |
| 18545 | ;;; Generated autoloads from international/mule-util.el | 18796 | ;;; Generated autoloads from international/mule-util.el |
| 18546 | 18797 | ||
| 18547 | (defsubst string-to-list (string) "\ | 18798 | (defsubst string-to-list (string) "\ |
| @@ -18672,92 +18923,6 @@ per-character basis, this may not be accurate. | |||
| 18672 | 18923 | ||
| 18673 | ;;;*** | 18924 | ;;;*** |
| 18674 | 18925 | ||
| 18675 | ;;;### (autoloads nil "nadvice" "emacs-lisp/nadvice.el" (20940 4391 | ||
| 18676 | ;;;;;; 641153 0)) | ||
| 18677 | ;;; Generated autoloads from emacs-lisp/nadvice.el | ||
| 18678 | |||
| 18679 | (autoload 'advice--remove-function "nadvice" "\ | ||
| 18680 | |||
| 18681 | |||
| 18682 | \(fn FLIST FUNCTION)" nil nil) | ||
| 18683 | |||
| 18684 | (autoload 'advice--buffer-local "nadvice" "\ | ||
| 18685 | Buffer-local value of VAR, presumed to contain a function. | ||
| 18686 | |||
| 18687 | \(fn VAR)" nil nil) | ||
| 18688 | |||
| 18689 | (autoload 'add-function "nadvice" "\ | ||
| 18690 | Add a piece of advice on the function stored at PLACE. | ||
| 18691 | FUNCTION describes the code to add. WHERE describes where to add it. | ||
| 18692 | WHERE can be explained by showing the resulting new function, as the | ||
| 18693 | result of combining FUNCTION and the previous value of PLACE, which we | ||
| 18694 | call OLDFUN here: | ||
| 18695 | `:before' (lambda (&rest r) (apply FUNCTION r) (apply OLDFUN r)) | ||
| 18696 | `:after' (lambda (&rest r) (prog1 (apply OLDFUN r) (apply FUNCTION r))) | ||
| 18697 | `:around' (lambda (&rest r) (apply FUNCTION OLDFUN r)) | ||
| 18698 | `:override' (lambda (&rest r) (apply FUNCTION r)) | ||
| 18699 | `:before-while' (lambda (&rest r) (and (apply FUNCTION r) (apply OLDFUN r))) | ||
| 18700 | `:before-until' (lambda (&rest r) (or (apply FUNCTION r) (apply OLDFUN r))) | ||
| 18701 | `:after-while' (lambda (&rest r) (and (apply OLDFUN r) (apply FUNCTION r))) | ||
| 18702 | `:after-until' (lambda (&rest r) (or (apply OLDFUN r) (apply FUNCTION r))) | ||
| 18703 | `:filter-args' (lambda (&rest r) (apply OLDFUN (funcall FUNCTION r))) | ||
| 18704 | `:filter-return'(lambda (&rest r) (funcall FUNCTION (apply OLDFUN r))) | ||
| 18705 | If FUNCTION was already added, do nothing. | ||
| 18706 | PROPS is an alist of additional properties, among which the following have | ||
| 18707 | a special meaning: | ||
| 18708 | - `name': a string or symbol. It can be used to refer to this piece of advice. | ||
| 18709 | |||
| 18710 | If PLACE is a simple variable, only its global value will be affected. | ||
| 18711 | Use (local 'VAR) if you want to apply FUNCTION to VAR buffer-locally. | ||
| 18712 | |||
| 18713 | If one of FUNCTION or OLDFUN is interactive, then the resulting function | ||
| 18714 | is also interactive. There are 3 cases: | ||
| 18715 | - FUNCTION is not interactive: the interactive spec of OLDFUN is used. | ||
| 18716 | - The interactive spec of FUNCTION is itself a function: it should take one | ||
| 18717 | argument (the interactive spec of OLDFUN, which it can pass to | ||
| 18718 | `advice-eval-interactive-spec') and return the list of arguments to use. | ||
| 18719 | - Else, use the interactive spec of FUNCTION and ignore the one of OLDFUN. | ||
| 18720 | |||
| 18721 | \(fn WHERE PLACE FUNCTION &optional PROPS)" nil t) | ||
| 18722 | |||
| 18723 | (autoload 'advice--add-function "nadvice" "\ | ||
| 18724 | |||
| 18725 | |||
| 18726 | \(fn WHERE REF FUNCTION PROPS)" nil nil) | ||
| 18727 | |||
| 18728 | (autoload 'remove-function "nadvice" "\ | ||
| 18729 | Remove the FUNCTION piece of advice from PLACE. | ||
| 18730 | If FUNCTION was not added to PLACE, do nothing. | ||
| 18731 | Instead of FUNCTION being the actual function, it can also be the `name' | ||
| 18732 | of the piece of advice. | ||
| 18733 | |||
| 18734 | \(fn PLACE FUNCTION)" nil t) | ||
| 18735 | |||
| 18736 | (autoload 'advice-add "nadvice" "\ | ||
| 18737 | Like `add-function' but for the function named SYMBOL. | ||
| 18738 | Contrary to `add-function', this will properly handle the cases where SYMBOL | ||
| 18739 | is defined as a macro, alias, command, ... | ||
| 18740 | |||
| 18741 | \(fn SYMBOL WHERE FUNCTION &optional PROPS)" nil nil) | ||
| 18742 | |||
| 18743 | (autoload 'advice-remove "nadvice" "\ | ||
| 18744 | Like `remove-function' but for the function named SYMBOL. | ||
| 18745 | Contrary to `remove-function', this also works when SYMBOL is a macro | ||
| 18746 | or an autoload and it preserves `fboundp'. | ||
| 18747 | Instead of the actual function to remove, FUNCTION can also be the `name' | ||
| 18748 | of the piece of advice. | ||
| 18749 | |||
| 18750 | \(fn SYMBOL FUNCTION)" nil nil) | ||
| 18751 | |||
| 18752 | (autoload 'advice-member-p "nadvice" "\ | ||
| 18753 | Return non-nil if ADVICE has been added to FUNCTION-NAME. | ||
| 18754 | Instead of ADVICE being the actual function, it can also be the `name' | ||
| 18755 | of the piece of advice. | ||
| 18756 | |||
| 18757 | \(fn ADVICE FUNCTION-NAME)" nil nil) | ||
| 18758 | |||
| 18759 | ;;;*** | ||
| 18760 | |||
| 18761 | ;;;### (autoloads nil "net-utils" "net/net-utils.el" (20903 10024 | 18926 | ;;;### (autoloads nil "net-utils" "net/net-utils.el" (20903 10024 |
| 18762 | ;;;;;; 645978 0)) | 18927 | ;;;;;; 645978 0)) |
| 18763 | ;;; Generated autoloads from net/net-utils.el | 18928 | ;;; Generated autoloads from net/net-utils.el |
| @@ -18866,8 +19031,8 @@ listed in the PORTS list. | |||
| 18866 | 19031 | ||
| 18867 | ;;;*** | 19032 | ;;;*** |
| 18868 | 19033 | ||
| 18869 | ;;;### (autoloads nil "network-stream" "net/network-stream.el" (20770 | 19034 | ;;;### (autoloads nil "network-stream" "net/network-stream.el" (20984 |
| 18870 | ;;;;;; 3512 176098 0)) | 19035 | ;;;;;; 58408 354075 0)) |
| 18871 | ;;; Generated autoloads from net/network-stream.el | 19036 | ;;; Generated autoloads from net/network-stream.el |
| 18872 | 19037 | ||
| 18873 | (autoload 'open-network-stream "network-stream" "\ | 19038 | (autoload 'open-network-stream "network-stream" "\ |
| @@ -18948,6 +19113,9 @@ values: | |||
| 18948 | :use-starttls-if-possible is a boolean that says to do opportunistic | 19113 | :use-starttls-if-possible is a boolean that says to do opportunistic |
| 18949 | STARTTLS upgrades even if Emacs doesn't have built-in TLS functionality. | 19114 | STARTTLS upgrades even if Emacs doesn't have built-in TLS functionality. |
| 18950 | 19115 | ||
| 19116 | :nogreeting is a boolean that can be used to inhibit waiting for | ||
| 19117 | a greeting from the server. | ||
| 19118 | |||
| 18951 | :nowait is a boolean that says the connection should be made | 19119 | :nowait is a boolean that says the connection should be made |
| 18952 | asynchronously, if possible. | 19120 | asynchronously, if possible. |
| 18953 | 19121 | ||
| @@ -18980,7 +19148,7 @@ Run `newsticker-start-hook' if newsticker was not running already. | |||
| 18980 | ;;;*** | 19148 | ;;;*** |
| 18981 | 19149 | ||
| 18982 | ;;;### (autoloads nil "newst-plainview" "net/newst-plainview.el" | 19150 | ;;;### (autoloads nil "newst-plainview" "net/newst-plainview.el" |
| 18983 | ;;;;;; (20762 9398 526093 0)) | 19151 | ;;;;;; (20992 52525 458637 0)) |
| 18984 | ;;; Generated autoloads from net/newst-plainview.el | 19152 | ;;; Generated autoloads from net/newst-plainview.el |
| 18985 | 19153 | ||
| 18986 | (autoload 'newsticker-plainview "newst-plainview" "\ | 19154 | (autoload 'newsticker-plainview "newst-plainview" "\ |
| @@ -19036,7 +19204,7 @@ Start newsticker treeview. | |||
| 19036 | ;;;### (autoloads nil "newsticker" "net/newsticker.el" (20709 26818 | 19204 | ;;;### (autoloads nil "newsticker" "net/newsticker.el" (20709 26818 |
| 19037 | ;;;;;; 907104 0)) | 19205 | ;;;;;; 907104 0)) |
| 19038 | ;;; Generated autoloads from net/newsticker.el | 19206 | ;;; Generated autoloads from net/newsticker.el |
| 19039 | (push (purecopy (quote (newsticker 1 99))) package--builtin-versions) | 19207 | (push (purecopy '(newsticker 1 99)) package--builtin-versions) |
| 19040 | ;;;*** | 19208 | ;;;*** |
| 19041 | 19209 | ||
| 19042 | ;;;### (autoloads nil "nndiary" "gnus/nndiary.el" (20709 26818 907104 | 19210 | ;;;### (autoloads nil "nndiary" "gnus/nndiary.el" (20709 26818 907104 |
| @@ -19080,10 +19248,10 @@ This command does not work if you use short group names. | |||
| 19080 | ;;;### (autoloads nil "nnmairix" "gnus/nnmairix.el" (20709 26818 | 19248 | ;;;### (autoloads nil "nnmairix" "gnus/nnmairix.el" (20709 26818 |
| 19081 | ;;;;;; 907104 0)) | 19249 | ;;;;;; 907104 0)) |
| 19082 | ;;; Generated autoloads from gnus/nnmairix.el | 19250 | ;;; Generated autoloads from gnus/nnmairix.el |
| 19083 | (push (purecopy (quote (nnmairix 0 6))) package--builtin-versions) | 19251 | (push (purecopy '(nnmairix 0 6)) package--builtin-versions) |
| 19084 | ;;;*** | 19252 | ;;;*** |
| 19085 | 19253 | ||
| 19086 | ;;;### (autoloads nil "nnml" "gnus/nnml.el" (20709 26818 907104 0)) | 19254 | ;;;### (autoloads nil "nnml" "gnus/nnml.el" (20955 58152 201869 0)) |
| 19087 | ;;; Generated autoloads from gnus/nnml.el | 19255 | ;;; Generated autoloads from gnus/nnml.el |
| 19088 | 19256 | ||
| 19089 | (autoload 'nnml-generate-nov-databases "nnml" "\ | 19257 | (autoload 'nnml-generate-nov-databases "nnml" "\ |
| @@ -19142,7 +19310,7 @@ closing requests for requests that are used in matched pairs. | |||
| 19142 | 19310 | ||
| 19143 | ;;;### (autoloads nil "ntlm" "net/ntlm.el" (20709 26818 907104 0)) | 19311 | ;;;### (autoloads nil "ntlm" "net/ntlm.el" (20709 26818 907104 0)) |
| 19144 | ;;; Generated autoloads from net/ntlm.el | 19312 | ;;; Generated autoloads from net/ntlm.el |
| 19145 | (push (purecopy (quote (ntlm 1 0))) package--builtin-versions) | 19313 | (push (purecopy '(ntlm 1 0)) package--builtin-versions) |
| 19146 | ;;;*** | 19314 | ;;;*** |
| 19147 | 19315 | ||
| 19148 | ;;;### (autoloads nil "nxml-glyph" "nxml/nxml-glyph.el" (20709 26818 | 19316 | ;;;### (autoloads nil "nxml-glyph" "nxml/nxml-glyph.el" (20709 26818 |
| @@ -19987,10 +20155,10 @@ See the command `outline-mode' for more information on this mode. | |||
| 19987 | 20155 | ||
| 19988 | ;;;*** | 20156 | ;;;*** |
| 19989 | 20157 | ||
| 19990 | ;;;### (autoloads nil "package" "emacs-lisp/package.el" (20938 49065 | 20158 | ;;;### (autoloads nil "package" "emacs-lisp/package.el" (21022 27213 |
| 19991 | ;;;;;; 383398 0)) | 20159 | ;;;;;; 317995 0)) |
| 19992 | ;;; Generated autoloads from emacs-lisp/package.el | 20160 | ;;; Generated autoloads from emacs-lisp/package.el |
| 19993 | (push (purecopy (quote (package 1 0 1))) package--builtin-versions) | 20161 | (push (purecopy '(package 1 0 1)) package--builtin-versions) |
| 19994 | (defvar package-enable-at-startup t "\ | 20162 | (defvar package-enable-at-startup t "\ |
| 19995 | Whether to activate installed packages when Emacs starts. | 20163 | Whether to activate installed packages when Emacs starts. |
| 19996 | If non-nil, packages are activated after reading the init file | 20164 | If non-nil, packages are activated after reading the init file |
| @@ -20169,8 +20337,8 @@ Check if KEY is in the cache. | |||
| 20169 | 20337 | ||
| 20170 | ;;;*** | 20338 | ;;;*** |
| 20171 | 20339 | ||
| 20172 | ;;;### (autoloads nil "pcase" "emacs-lisp/pcase.el" (20717 20920 | 20340 | ;;;### (autoloads nil "pcase" "emacs-lisp/pcase.el" (20991 31656 |
| 20173 | ;;;;;; 410005 0)) | 20341 | ;;;;;; 363459 0)) |
| 20174 | ;;; Generated autoloads from emacs-lisp/pcase.el | 20342 | ;;; Generated autoloads from emacs-lisp/pcase.el |
| 20175 | 20343 | ||
| 20176 | (autoload 'pcase "pcase" "\ | 20344 | (autoload 'pcase "pcase" "\ |
| @@ -20436,7 +20604,7 @@ Setup `shell-mode' to use pcomplete. | |||
| 20436 | 20604 | ||
| 20437 | ;;;*** | 20605 | ;;;*** |
| 20438 | 20606 | ||
| 20439 | ;;;### (autoloads nil "pcvs" "vc/pcvs.el" (20717 20920 410005 0)) | 20607 | ;;;### (autoloads nil "pcvs" "vc/pcvs.el" (20983 37555 279226 0)) |
| 20440 | ;;; Generated autoloads from vc/pcvs.el | 20608 | ;;; Generated autoloads from vc/pcvs.el |
| 20441 | 20609 | ||
| 20442 | (autoload 'cvs-checkout "pcvs" "\ | 20610 | (autoload 'cvs-checkout "pcvs" "\ |
| @@ -20717,7 +20885,7 @@ Use streaming commands. | |||
| 20717 | 20885 | ||
| 20718 | ;;;*** | 20886 | ;;;*** |
| 20719 | 20887 | ||
| 20720 | ;;;### (autoloads nil "pp" "emacs-lisp/pp.el" (20709 26818 907104 | 20888 | ;;;### (autoloads nil "pp" "emacs-lisp/pp.el" (21013 58662 278539 |
| 20721 | ;;;;;; 0)) | 20889 | ;;;;;; 0)) |
| 20722 | ;;; Generated autoloads from emacs-lisp/pp.el | 20890 | ;;; Generated autoloads from emacs-lisp/pp.el |
| 20723 | 20891 | ||
| @@ -20768,10 +20936,10 @@ Ignores leading comment characters. | |||
| 20768 | 20936 | ||
| 20769 | ;;;*** | 20937 | ;;;*** |
| 20770 | 20938 | ||
| 20771 | ;;;### (autoloads nil "printing" "printing.el" (20891 44219 680764 | 20939 | ;;;### (autoloads nil "printing" "printing.el" (20975 43430 521692 |
| 20772 | ;;;;;; 0)) | 20940 | ;;;;;; 0)) |
| 20773 | ;;; Generated autoloads from printing.el | 20941 | ;;; Generated autoloads from printing.el |
| 20774 | (push (purecopy (quote (printing 6 9 3))) package--builtin-versions) | 20942 | (push (purecopy '(printing 6 9 3)) package--builtin-versions) |
| 20775 | (autoload 'pr-interface "printing" "\ | 20943 | (autoload 'pr-interface "printing" "\ |
| 20776 | Activate the printing interface buffer. | 20944 | Activate the printing interface buffer. |
| 20777 | 20945 | ||
| @@ -21453,7 +21621,7 @@ The default value is '(\"/usr/local/share/emacs/fonts/bdf\").") | |||
| 21453 | ;;;### (autoloads nil "ps-mode" "progmodes/ps-mode.el" (20777 63161 | 21621 | ;;;### (autoloads nil "ps-mode" "progmodes/ps-mode.el" (20777 63161 |
| 21454 | ;;;;;; 848428 0)) | 21622 | ;;;;;; 848428 0)) |
| 21455 | ;;; Generated autoloads from progmodes/ps-mode.el | 21623 | ;;; Generated autoloads from progmodes/ps-mode.el |
| 21456 | (push (purecopy (quote (ps-mode 1 1 9))) package--builtin-versions) | 21624 | (push (purecopy '(ps-mode 1 1 9)) package--builtin-versions) |
| 21457 | (autoload 'ps-mode "ps-mode" "\ | 21625 | (autoload 'ps-mode "ps-mode" "\ |
| 21458 | Major mode for editing PostScript with GNU Emacs. | 21626 | Major mode for editing PostScript with GNU Emacs. |
| 21459 | 21627 | ||
| @@ -21497,10 +21665,10 @@ Typing \\<ps-run-mode-map>\\[ps-run-goto-error] when the cursor is at the number | |||
| 21497 | 21665 | ||
| 21498 | ;;;*** | 21666 | ;;;*** |
| 21499 | 21667 | ||
| 21500 | ;;;### (autoloads nil "ps-print" "ps-print.el" (20874 65006 672942 | 21668 | ;;;### (autoloads nil "ps-print" "ps-print.el" (20975 43430 521692 |
| 21501 | ;;;;;; 217000)) | 21669 | ;;;;;; 0)) |
| 21502 | ;;; Generated autoloads from ps-print.el | 21670 | ;;; Generated autoloads from ps-print.el |
| 21503 | (push (purecopy (quote (ps-print 7 3 5))) package--builtin-versions) | 21671 | (push (purecopy '(ps-print 7 3 5)) package--builtin-versions) |
| 21504 | (defvar ps-page-dimensions-database (purecopy (list (list 'a4 (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54) "A4") (list 'a3 (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54) "A3") (list 'letter (* 72 8.5) (* 72 11.0) "Letter") (list 'legal (* 72 8.5) (* 72 14.0) "Legal") (list 'letter-small (* 72 7.68) (* 72 10.16) "LetterSmall") (list 'tabloid (* 72 11.0) (* 72 17.0) "Tabloid") (list 'ledger (* 72 17.0) (* 72 11.0) "Ledger") (list 'statement (* 72 5.5) (* 72 8.5) "Statement") (list 'executive (* 72 7.5) (* 72 10.0) "Executive") (list 'a4small (* 72 7.47) (* 72 10.85) "A4Small") (list 'b4 (* 72 10.125) (* 72 14.33) "B4") (list 'b5 (* 72 7.16) (* 72 10.125) "B5") '(addresslarge 236.0 99.0 "AddressLarge") '(addresssmall 236.0 68.0 "AddressSmall") '(cuthanging13 90.0 222.0 "CutHanging13") '(cuthanging15 90.0 114.0 "CutHanging15") '(diskette 181.0 136.0 "Diskette") '(eurofilefolder 139.0 112.0 "EuropeanFilefolder") '(eurofoldernarrow 526.0 107.0 "EuroFolderNarrow") '(eurofolderwide 526.0 136.0 "EuroFolderWide") '(euronamebadge 189.0 108.0 "EuroNameBadge") '(euronamebadgelarge 223.0 136.0 "EuroNameBadgeLarge") '(filefolder 230.0 37.0 "FileFolder") '(jewelry 76.0 136.0 "Jewelry") '(mediabadge 180.0 136.0 "MediaBadge") '(multipurpose 126.0 68.0 "MultiPurpose") '(retaillabel 90.0 104.0 "RetailLabel") '(shipping 271.0 136.0 "Shipping") '(slide35mm 26.0 104.0 "Slide35mm") '(spine8mm 187.0 26.0 "Spine8mm") '(topcoated 425.19685 136.0 "TopCoatedPaper") '(topcoatedpaper 396.0 136.0 "TopcoatedPaper150") '(vhsface 205.0 127.0 "VHSFace") '(vhsspine 400.0 50.0 "VHSSpine") '(zipdisk 156.0 136.0 "ZipDisk"))) "\ | 21672 | (defvar ps-page-dimensions-database (purecopy (list (list 'a4 (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54) "A4") (list 'a3 (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54) "A3") (list 'letter (* 72 8.5) (* 72 11.0) "Letter") (list 'legal (* 72 8.5) (* 72 14.0) "Legal") (list 'letter-small (* 72 7.68) (* 72 10.16) "LetterSmall") (list 'tabloid (* 72 11.0) (* 72 17.0) "Tabloid") (list 'ledger (* 72 17.0) (* 72 11.0) "Ledger") (list 'statement (* 72 5.5) (* 72 8.5) "Statement") (list 'executive (* 72 7.5) (* 72 10.0) "Executive") (list 'a4small (* 72 7.47) (* 72 10.85) "A4Small") (list 'b4 (* 72 10.125) (* 72 14.33) "B4") (list 'b5 (* 72 7.16) (* 72 10.125) "B5") '(addresslarge 236.0 99.0 "AddressLarge") '(addresssmall 236.0 68.0 "AddressSmall") '(cuthanging13 90.0 222.0 "CutHanging13") '(cuthanging15 90.0 114.0 "CutHanging15") '(diskette 181.0 136.0 "Diskette") '(eurofilefolder 139.0 112.0 "EuropeanFilefolder") '(eurofoldernarrow 526.0 107.0 "EuroFolderNarrow") '(eurofolderwide 526.0 136.0 "EuroFolderWide") '(euronamebadge 189.0 108.0 "EuroNameBadge") '(euronamebadgelarge 223.0 136.0 "EuroNameBadgeLarge") '(filefolder 230.0 37.0 "FileFolder") '(jewelry 76.0 136.0 "Jewelry") '(mediabadge 180.0 136.0 "MediaBadge") '(multipurpose 126.0 68.0 "MultiPurpose") '(retaillabel 90.0 104.0 "RetailLabel") '(shipping 271.0 136.0 "Shipping") '(slide35mm 26.0 104.0 "Slide35mm") '(spine8mm 187.0 26.0 "Spine8mm") '(topcoated 425.19685 136.0 "TopCoatedPaper") '(topcoatedpaper 396.0 136.0 "TopcoatedPaper150") '(vhsface 205.0 127.0 "VHSFace") '(vhsspine 400.0 50.0 "VHSSpine") '(zipdisk 156.0 136.0 "ZipDisk"))) "\ |
| 21505 | List associating a symbolic paper type to its width, height and doc media. | 21673 | List associating a symbolic paper type to its width, height and doc media. |
| 21506 | See `ps-paper-type'.") | 21674 | See `ps-paper-type'.") |
| @@ -21697,13 +21865,13 @@ If EXTENSION is any other symbol, it is ignored. | |||
| 21697 | ;;;### (autoloads nil "pulse" "cedet/pulse.el" (20709 26818 907104 | 21865 | ;;;### (autoloads nil "pulse" "cedet/pulse.el" (20709 26818 907104 |
| 21698 | ;;;;;; 0)) | 21866 | ;;;;;; 0)) |
| 21699 | ;;; Generated autoloads from cedet/pulse.el | 21867 | ;;; Generated autoloads from cedet/pulse.el |
| 21700 | (push (purecopy (quote (pulse 1 0))) package--builtin-versions) | 21868 | (push (purecopy '(pulse 1 0)) package--builtin-versions) |
| 21701 | ;;;*** | 21869 | ;;;*** |
| 21702 | 21870 | ||
| 21703 | ;;;### (autoloads nil "python" "progmodes/python.el" (20928 13222 | 21871 | ;;;### (autoloads nil "python" "progmodes/python.el" (21020 31917 |
| 21704 | ;;;;;; 500272 0)) | 21872 | ;;;;;; 145164 0)) |
| 21705 | ;;; Generated autoloads from progmodes/python.el | 21873 | ;;; Generated autoloads from progmodes/python.el |
| 21706 | (push (purecopy (quote (python 0 24 2))) package--builtin-versions) | 21874 | (push (purecopy '(python 0 24 2)) package--builtin-versions) |
| 21707 | (add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'") 'python-mode)) | 21875 | (add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'") 'python-mode)) |
| 21708 | 21876 | ||
| 21709 | (add-to-list 'interpreter-mode-alist (cons (purecopy "python") 'python-mode)) | 21877 | (add-to-list 'interpreter-mode-alist (cons (purecopy "python") 'python-mode)) |
| @@ -21755,8 +21923,8 @@ them into characters should be done separately. | |||
| 21755 | 21923 | ||
| 21756 | ;;;*** | 21924 | ;;;*** |
| 21757 | 21925 | ||
| 21758 | ;;;### (autoloads nil "quail" "international/quail.el" (20709 26818 | 21926 | ;;;### (autoloads nil "quail" "international/quail.el" (20998 4934 |
| 21759 | ;;;;;; 907104 0)) | 21927 | ;;;;;; 952905 0)) |
| 21760 | ;;; Generated autoloads from international/quail.el | 21928 | ;;; Generated autoloads from international/quail.el |
| 21761 | 21929 | ||
| 21762 | (autoload 'quail-title "quail" "\ | 21930 | (autoload 'quail-title "quail" "\ |
| @@ -22057,7 +22225,8 @@ Display `quickurl-list' as a formatted list using `quickurl-list-mode'. | |||
| 22057 | 22225 | ||
| 22058 | ;;;*** | 22226 | ;;;*** |
| 22059 | 22227 | ||
| 22060 | ;;;### (autoloads nil "rcirc" "net/rcirc.el" (20770 3512 176098 0)) | 22228 | ;;;### (autoloads nil "rcirc" "net/rcirc.el" (20992 52525 458637 |
| 22229 | ;;;;;; 0)) | ||
| 22061 | ;;; Generated autoloads from net/rcirc.el | 22230 | ;;; Generated autoloads from net/rcirc.el |
| 22062 | 22231 | ||
| 22063 | (autoload 'rcirc "rcirc" "\ | 22232 | (autoload 'rcirc "rcirc" "\ |
| @@ -22107,8 +22276,8 @@ See \\[compile]. | |||
| 22107 | 22276 | ||
| 22108 | ;;;*** | 22277 | ;;;*** |
| 22109 | 22278 | ||
| 22110 | ;;;### (autoloads nil "re-builder" "emacs-lisp/re-builder.el" (20709 | 22279 | ;;;### (autoloads nil "re-builder" "emacs-lisp/re-builder.el" (20984 |
| 22111 | ;;;;;; 26818 907104 0)) | 22280 | ;;;;;; 58408 354075 0)) |
| 22112 | ;;; Generated autoloads from emacs-lisp/re-builder.el | 22281 | ;;; Generated autoloads from emacs-lisp/re-builder.el |
| 22113 | 22282 | ||
| 22114 | (defalias 'regexp-builder 're-builder) | 22283 | (defalias 'regexp-builder 're-builder) |
| @@ -22494,13 +22663,13 @@ This means the number of non-shy regexp grouping constructs | |||
| 22494 | ;;;### (autoloads nil "regi" "emacs-lisp/regi.el" (20709 26818 907104 | 22663 | ;;;### (autoloads nil "regi" "emacs-lisp/regi.el" (20709 26818 907104 |
| 22495 | ;;;;;; 0)) | 22664 | ;;;;;; 0)) |
| 22496 | ;;; Generated autoloads from emacs-lisp/regi.el | 22665 | ;;; Generated autoloads from emacs-lisp/regi.el |
| 22497 | (push (purecopy (quote (regi 1 8))) package--builtin-versions) | 22666 | (push (purecopy '(regi 1 8)) package--builtin-versions) |
| 22498 | ;;;*** | 22667 | ;;;*** |
| 22499 | 22668 | ||
| 22500 | ;;;### (autoloads nil "remember" "textmodes/remember.el" (20945 22315 | 22669 | ;;;### (autoloads nil "remember" "textmodes/remember.el" (20945 22315 |
| 22501 | ;;;;;; 8369 0)) | 22670 | ;;;;;; 8369 0)) |
| 22502 | ;;; Generated autoloads from textmodes/remember.el | 22671 | ;;; Generated autoloads from textmodes/remember.el |
| 22503 | (push (purecopy (quote (remember 2 0))) package--builtin-versions) | 22672 | (push (purecopy '(remember 2 0)) package--builtin-versions) |
| 22504 | (autoload 'remember "remember" "\ | 22673 | (autoload 'remember "remember" "\ |
| 22505 | Remember an arbitrary piece of data. | 22674 | Remember an arbitrary piece of data. |
| 22506 | INITIAL is the text to initially place in the *Remember* buffer, | 22675 | INITIAL is the text to initially place in the *Remember* buffer, |
| @@ -22557,7 +22726,7 @@ preserve across Emacs restarts. The notes will be stored in the | |||
| 22557 | 22726 | ||
| 22558 | ;;;### (autoloads nil "repeat" "repeat.el" (20709 26818 907104 0)) | 22727 | ;;;### (autoloads nil "repeat" "repeat.el" (20709 26818 907104 0)) |
| 22559 | ;;; Generated autoloads from repeat.el | 22728 | ;;; Generated autoloads from repeat.el |
| 22560 | (push (purecopy (quote (repeat 0 51))) package--builtin-versions) | 22729 | (push (purecopy '(repeat 0 51)) package--builtin-versions) |
| 22561 | (autoload 'repeat "repeat" "\ | 22730 | (autoload 'repeat "repeat" "\ |
| 22562 | Repeat most recently executed command. | 22731 | Repeat most recently executed command. |
| 22563 | If REPEAT-ARG is non-nil (interactively, with a prefix argument), | 22732 | If REPEAT-ARG is non-nil (interactively, with a prefix argument), |
| @@ -22609,7 +22778,7 @@ mail-sending package is used for editing and sending the message. | |||
| 22609 | 22778 | ||
| 22610 | ;;;*** | 22779 | ;;;*** |
| 22611 | 22780 | ||
| 22612 | ;;;### (autoloads nil "reposition" "reposition.el" (20709 26818 907104 | 22781 | ;;;### (autoloads nil "reposition" "reposition.el" (20992 52525 458637 |
| 22613 | ;;;;;; 0)) | 22782 | ;;;;;; 0)) |
| 22614 | ;;; Generated autoloads from reposition.el | 22783 | ;;; Generated autoloads from reposition.el |
| 22615 | 22784 | ||
| @@ -22732,7 +22901,7 @@ variable. | |||
| 22732 | 22901 | ||
| 22733 | ;;;*** | 22902 | ;;;*** |
| 22734 | 22903 | ||
| 22735 | ;;;### (autoloads nil "rmail" "mail/rmail.el" (20892 39729 858825 | 22904 | ;;;### (autoloads nil "rmail" "mail/rmail.el" (20992 52525 458637 |
| 22736 | ;;;;;; 0)) | 22905 | ;;;;;; 0)) |
| 22737 | ;;; Generated autoloads from mail/rmail.el | 22906 | ;;; Generated autoloads from mail/rmail.el |
| 22738 | 22907 | ||
| @@ -22995,8 +23164,8 @@ than appending to it. Deletes the message after writing if | |||
| 22995 | 23164 | ||
| 22996 | ;;;*** | 23165 | ;;;*** |
| 22997 | 23166 | ||
| 22998 | ;;;### (autoloads nil "rng-cmpct" "nxml/rng-cmpct.el" (20709 26818 | 23167 | ;;;### (autoloads nil "rng-cmpct" "nxml/rng-cmpct.el" (20998 4934 |
| 22999 | ;;;;;; 907104 0)) | 23168 | ;;;;;; 952905 0)) |
| 23000 | ;;; Generated autoloads from nxml/rng-cmpct.el | 23169 | ;;; Generated autoloads from nxml/rng-cmpct.el |
| 23001 | 23170 | ||
| 23002 | (autoload 'rng-c-load-schema "rng-cmpct" "\ | 23171 | (autoload 'rng-c-load-schema "rng-cmpct" "\ |
| @@ -23112,7 +23281,7 @@ Start using robin package NAME, which is a string. | |||
| 23112 | 23281 | ||
| 23113 | ;;;*** | 23282 | ;;;*** |
| 23114 | 23283 | ||
| 23115 | ;;;### (autoloads nil "rot13" "rot13.el" (20709 26818 907104 0)) | 23284 | ;;;### (autoloads nil "rot13" "rot13.el" (20992 52525 458637 0)) |
| 23116 | ;;; Generated autoloads from rot13.el | 23285 | ;;; Generated autoloads from rot13.el |
| 23117 | 23286 | ||
| 23118 | (autoload 'rot13 "rot13" "\ | 23287 | (autoload 'rot13 "rot13" "\ |
| @@ -23180,10 +23349,10 @@ for modes derived from Text mode, like Mail mode. | |||
| 23180 | 23349 | ||
| 23181 | ;;;*** | 23350 | ;;;*** |
| 23182 | 23351 | ||
| 23183 | ;;;### (autoloads nil "ruby-mode" "progmodes/ruby-mode.el" (20944 | 23352 | ;;;### (autoloads nil "ruby-mode" "progmodes/ruby-mode.el" (21024 |
| 23184 | ;;;;;; 1446 914400 0)) | 23353 | ;;;;;; 28968 738399 0)) |
| 23185 | ;;; Generated autoloads from progmodes/ruby-mode.el | 23354 | ;;; Generated autoloads from progmodes/ruby-mode.el |
| 23186 | (push (purecopy (quote (ruby-mode 1 2))) package--builtin-versions) | 23355 | (push (purecopy '(ruby-mode 1 2)) package--builtin-versions) |
| 23187 | (autoload 'ruby-mode "ruby-mode" "\ | 23356 | (autoload 'ruby-mode "ruby-mode" "\ |
| 23188 | Major mode for editing Ruby scripts. | 23357 | Major mode for editing Ruby scripts. |
| 23189 | \\[ruby-indent-line] properly indents subexpressions of multi-line | 23358 | \\[ruby-indent-line] properly indents subexpressions of multi-line |
| @@ -23205,7 +23374,7 @@ The variable `ruby-indent-level' controls the amount of indentation. | |||
| 23205 | ;;;### (autoloads nil "ruler-mode" "ruler-mode.el" (20791 9657 561026 | 23374 | ;;;### (autoloads nil "ruler-mode" "ruler-mode.el" (20791 9657 561026 |
| 23206 | ;;;;;; 0)) | 23375 | ;;;;;; 0)) |
| 23207 | ;;; Generated autoloads from ruler-mode.el | 23376 | ;;; Generated autoloads from ruler-mode.el |
| 23208 | (push (purecopy (quote (ruler-mode 1 6))) package--builtin-versions) | 23377 | (push (purecopy '(ruler-mode 1 6)) package--builtin-versions) |
| 23209 | (defvar ruler-mode nil "\ | 23378 | (defvar ruler-mode nil "\ |
| 23210 | Non-nil if Ruler mode is enabled. | 23379 | Non-nil if Ruler mode is enabled. |
| 23211 | Use the command `ruler-mode' to change this variable.") | 23380 | Use the command `ruler-mode' to change this variable.") |
| @@ -23535,13 +23704,13 @@ enclosed in `(and ...)'. | |||
| 23535 | ;;;### (autoloads nil "sasl-ntlm" "net/sasl-ntlm.el" (20709 26818 | 23704 | ;;;### (autoloads nil "sasl-ntlm" "net/sasl-ntlm.el" (20709 26818 |
| 23536 | ;;;;;; 907104 0)) | 23705 | ;;;;;; 907104 0)) |
| 23537 | ;;; Generated autoloads from net/sasl-ntlm.el | 23706 | ;;; Generated autoloads from net/sasl-ntlm.el |
| 23538 | (push (purecopy (quote (sasl 1 0))) package--builtin-versions) | 23707 | (push (purecopy '(sasl 1 0)) package--builtin-versions) |
| 23539 | ;;;*** | 23708 | ;;;*** |
| 23540 | 23709 | ||
| 23541 | ;;;### (autoloads nil "savehist" "savehist.el" (20709 26818 907104 | 23710 | ;;;### (autoloads nil "savehist" "savehist.el" (20709 26818 907104 |
| 23542 | ;;;;;; 0)) | 23711 | ;;;;;; 0)) |
| 23543 | ;;; Generated autoloads from savehist.el | 23712 | ;;; Generated autoloads from savehist.el |
| 23544 | (push (purecopy (quote (savehist 24))) package--builtin-versions) | 23713 | (push (purecopy '(savehist 24)) package--builtin-versions) |
| 23545 | (defvar savehist-mode nil "\ | 23714 | (defvar savehist-mode nil "\ |
| 23546 | Non-nil if Savehist mode is enabled. | 23715 | Non-nil if Savehist mode is enabled. |
| 23547 | See the command `savehist-mode' for a description of this minor mode. | 23716 | See the command `savehist-mode' for a description of this minor mode. |
| @@ -23680,7 +23849,7 @@ vertically fixed relative to window boundaries during scrolling. | |||
| 23680 | ;;;### (autoloads nil "semantic" "cedet/semantic.el" (20908 27948 | 23849 | ;;;### (autoloads nil "semantic" "cedet/semantic.el" (20908 27948 |
| 23681 | ;;;;;; 216644 0)) | 23850 | ;;;;;; 216644 0)) |
| 23682 | ;;; Generated autoloads from cedet/semantic.el | 23851 | ;;; Generated autoloads from cedet/semantic.el |
| 23683 | (push (purecopy (quote (semantic 2 2))) package--builtin-versions) | 23852 | (push (purecopy '(semantic 2 2)) package--builtin-versions) |
| 23684 | (defvar semantic-default-submodes '(global-semantic-idle-scheduler-mode global-semanticdb-minor-mode) "\ | 23853 | (defvar semantic-default-submodes '(global-semantic-idle-scheduler-mode global-semanticdb-minor-mode) "\ |
| 23685 | List of auxiliary Semantic minor modes enabled by `semantic-mode'. | 23854 | List of auxiliary Semantic minor modes enabled by `semantic-mode'. |
| 23686 | The possible elements of this list include the following: | 23855 | The possible elements of this list include the following: |
| @@ -23756,8 +23925,8 @@ Major mode for editing Wisent grammars. | |||
| 23756 | 23925 | ||
| 23757 | ;;;*** | 23926 | ;;;*** |
| 23758 | 23927 | ||
| 23759 | ;;;### (autoloads nil "sendmail" "mail/sendmail.el" (20723 59703 | 23928 | ;;;### (autoloads nil "sendmail" "mail/sendmail.el" (21002 1963 769129 |
| 23760 | ;;;;;; 12265 0)) | 23929 | ;;;;;; 0)) |
| 23761 | ;;; Generated autoloads from mail/sendmail.el | 23930 | ;;; Generated autoloads from mail/sendmail.el |
| 23762 | 23931 | ||
| 23763 | (defvar mail-from-style 'default "\ | 23932 | (defvar mail-from-style 'default "\ |
| @@ -24038,7 +24207,7 @@ Like `mail' command, but display mail buffer in another frame. | |||
| 24038 | 24207 | ||
| 24039 | ;;;*** | 24208 | ;;;*** |
| 24040 | 24209 | ||
| 24041 | ;;;### (autoloads nil "server" "server.el" (20763 30266 231060 0)) | 24210 | ;;;### (autoloads nil "server" "server.el" (20992 52525 458637 0)) |
| 24042 | ;;; Generated autoloads from server.el | 24211 | ;;; Generated autoloads from server.el |
| 24043 | 24212 | ||
| 24044 | (put 'server-host 'risky-local-variable t) | 24213 | (put 'server-host 'risky-local-variable t) |
| @@ -24105,7 +24274,7 @@ only these files will be asked to be saved. | |||
| 24105 | 24274 | ||
| 24106 | ;;;*** | 24275 | ;;;*** |
| 24107 | 24276 | ||
| 24108 | ;;;### (autoloads nil "ses" "ses.el" (20709 26818 907104 0)) | 24277 | ;;;### (autoloads nil "ses" "ses.el" (20999 25770 522517 0)) |
| 24109 | ;;; Generated autoloads from ses.el | 24278 | ;;; Generated autoloads from ses.el |
| 24110 | 24279 | ||
| 24111 | (autoload 'ses-mode "ses" "\ | 24280 | (autoload 'ses-mode "ses" "\ |
| @@ -24189,10 +24358,10 @@ To work around that, do: | |||
| 24189 | 24358 | ||
| 24190 | ;;;*** | 24359 | ;;;*** |
| 24191 | 24360 | ||
| 24192 | ;;;### (autoloads nil "sh-script" "progmodes/sh-script.el" (20850 | 24361 | ;;;### (autoloads nil "sh-script" "progmodes/sh-script.el" (21022 |
| 24193 | ;;;;;; 27430 515630 0)) | 24362 | ;;;;;; 40320 762131 34000)) |
| 24194 | ;;; Generated autoloads from progmodes/sh-script.el | 24363 | ;;; Generated autoloads from progmodes/sh-script.el |
| 24195 | (push (purecopy (quote (sh-script 2 0 6))) package--builtin-versions)(put 'sh-shell 'safe-local-variable 'symbolp) | 24364 | (push (purecopy '(sh-script 2 0 6)) package--builtin-versions)(put 'sh-shell 'safe-local-variable 'symbolp) |
| 24196 | 24365 | ||
| 24197 | (autoload 'sh-mode "sh-script" "\ | 24366 | (autoload 'sh-mode "sh-script" "\ |
| 24198 | Major mode for editing shell scripts. | 24367 | Major mode for editing shell scripts. |
| @@ -24303,7 +24472,7 @@ function, `load-path-shadows-find'. | |||
| 24303 | 24472 | ||
| 24304 | ;;;*** | 24473 | ;;;*** |
| 24305 | 24474 | ||
| 24306 | ;;;### (autoloads nil "shadowfile" "shadowfile.el" (20799 169 640767 | 24475 | ;;;### (autoloads nil "shadowfile" "shadowfile.el" (20959 55207 940876 |
| 24307 | ;;;;;; 0)) | 24476 | ;;;;;; 0)) |
| 24308 | ;;; Generated autoloads from shadowfile.el | 24477 | ;;; Generated autoloads from shadowfile.el |
| 24309 | 24478 | ||
| @@ -24342,7 +24511,7 @@ Set up file shadowing. | |||
| 24342 | 24511 | ||
| 24343 | ;;;*** | 24512 | ;;;*** |
| 24344 | 24513 | ||
| 24345 | ;;;### (autoloads nil "shell" "shell.el" (20884 7264 912957 506000)) | 24514 | ;;;### (autoloads nil "shell" "shell.el" (20992 52525 458637 0)) |
| 24346 | ;;; Generated autoloads from shell.el | 24515 | ;;; Generated autoloads from shell.el |
| 24347 | 24516 | ||
| 24348 | (defvar shell-dumb-shell-regexp (purecopy "cmd\\(proxy\\)?\\.exe") "\ | 24517 | (defvar shell-dumb-shell-regexp (purecopy "cmd\\(proxy\\)?\\.exe") "\ |
| @@ -24390,7 +24559,7 @@ Otherwise, one argument `-i' is passed to the shell. | |||
| 24390 | 24559 | ||
| 24391 | ;;;*** | 24560 | ;;;*** |
| 24392 | 24561 | ||
| 24393 | ;;;### (autoloads nil "shr" "net/shr.el" (20944 31824 211965 0)) | 24562 | ;;;### (autoloads nil "shr" "net/shr.el" (21007 19880 17663 0)) |
| 24394 | ;;; Generated autoloads from net/shr.el | 24563 | ;;; Generated autoloads from net/shr.el |
| 24395 | 24564 | ||
| 24396 | (autoload 'shr-insert-document "shr" "\ | 24565 | (autoload 'shr-insert-document "shr" "\ |
| @@ -24605,8 +24774,8 @@ symmetrical ones, and the same character twice for the others. | |||
| 24605 | 24774 | ||
| 24606 | ;;;*** | 24775 | ;;;*** |
| 24607 | 24776 | ||
| 24608 | ;;;### (autoloads nil "smerge-mode" "vc/smerge-mode.el" (20709 26818 | 24777 | ;;;### (autoloads nil "smerge-mode" "vc/smerge-mode.el" (21022 27213 |
| 24609 | ;;;;;; 907104 0)) | 24778 | ;;;;;; 317995 0)) |
| 24610 | ;;; Generated autoloads from vc/smerge-mode.el | 24779 | ;;; Generated autoloads from vc/smerge-mode.el |
| 24611 | 24780 | ||
| 24612 | (autoload 'smerge-ediff "smerge-mode" "\ | 24781 | (autoload 'smerge-ediff "smerge-mode" "\ |
| @@ -25047,7 +25216,7 @@ Spam reports will be queued with the method used when | |||
| 25047 | 25216 | ||
| 25048 | ;;;*** | 25217 | ;;;*** |
| 25049 | 25218 | ||
| 25050 | ;;;### (autoloads nil "speedbar" "speedbar.el" (20892 39729 858825 | 25219 | ;;;### (autoloads nil "speedbar" "speedbar.el" (21024 28968 738399 |
| 25051 | ;;;;;; 0)) | 25220 | ;;;;;; 0)) |
| 25052 | ;;; Generated autoloads from speedbar.el | 25221 | ;;; Generated autoloads from speedbar.el |
| 25053 | 25222 | ||
| @@ -25088,10 +25257,10 @@ Return a vector containing the lines from `spook-phrases-file'. | |||
| 25088 | 25257 | ||
| 25089 | ;;;*** | 25258 | ;;;*** |
| 25090 | 25259 | ||
| 25091 | ;;;### (autoloads nil "sql" "progmodes/sql.el" (20878 6823 881439 | 25260 | ;;;### (autoloads nil "sql" "progmodes/sql.el" (20975 10147 44538 |
| 25092 | ;;;;;; 0)) | 25261 | ;;;;;; 0)) |
| 25093 | ;;; Generated autoloads from progmodes/sql.el | 25262 | ;;; Generated autoloads from progmodes/sql.el |
| 25094 | (push (purecopy (quote (sql 3 2))) package--builtin-versions) | 25263 | (push (purecopy '(sql 3 3)) package--builtin-versions) |
| 25095 | (autoload 'sql-add-product-keywords "sql" "\ | 25264 | (autoload 'sql-add-product-keywords "sql" "\ |
| 25096 | Add highlighting KEYWORDS for SQL PRODUCT. | 25265 | Add highlighting KEYWORDS for SQL PRODUCT. |
| 25097 | 25266 | ||
| @@ -25554,7 +25723,7 @@ buffer. | |||
| 25554 | ;;;### (autoloads nil "srecode" "cedet/srecode.el" (20748 62911 684442 | 25723 | ;;;### (autoloads nil "srecode" "cedet/srecode.el" (20748 62911 684442 |
| 25555 | ;;;;;; 0)) | 25724 | ;;;;;; 0)) |
| 25556 | ;;; Generated autoloads from cedet/srecode.el | 25725 | ;;; Generated autoloads from cedet/srecode.el |
| 25557 | (push (purecopy (quote (srecode 1 2))) package--builtin-versions) | 25726 | (push (purecopy '(srecode 1 2)) package--builtin-versions) |
| 25558 | ;;;*** | 25727 | ;;;*** |
| 25559 | 25728 | ||
| 25560 | ;;;### (autoloads nil "srecode/srt-mode" "cedet/srecode/srt-mode.el" | 25729 | ;;;### (autoloads nil "srecode/srt-mode" "cedet/srecode/srt-mode.el" |
| @@ -25728,8 +25897,8 @@ Studlify-case the current buffer. | |||
| 25728 | 25897 | ||
| 25729 | ;;;*** | 25898 | ;;;*** |
| 25730 | 25899 | ||
| 25731 | ;;;### (autoloads nil "subword" "progmodes/subword.el" (20886 47777 | 25900 | ;;;### (autoloads nil "subword" "progmodes/subword.el" (20974 22577 |
| 25732 | ;;;;;; 83668 440000)) | 25901 | ;;;;;; 548213 0)) |
| 25733 | ;;; Generated autoloads from progmodes/subword.el | 25902 | ;;; Generated autoloads from progmodes/subword.el |
| 25734 | 25903 | ||
| 25735 | (autoload 'subword-mode "subword" "\ | 25904 | (autoload 'subword-mode "subword" "\ |
| @@ -25885,7 +26054,7 @@ It relies on the `gpm' daemon being activated. | |||
| 25885 | 26054 | ||
| 25886 | ;;;*** | 26055 | ;;;*** |
| 25887 | 26056 | ||
| 25888 | ;;;### (autoloads nil "tabify" "tabify.el" (20928 13222 500272 0)) | 26057 | ;;;### (autoloads nil "tabify" "tabify.el" (20999 25770 522517 0)) |
| 25889 | ;;; Generated autoloads from tabify.el | 26058 | ;;; Generated autoloads from tabify.el |
| 25890 | 26059 | ||
| 25891 | (autoload 'untabify "tabify" "\ | 26060 | (autoload 'untabify "tabify" "\ |
| @@ -26507,7 +26676,7 @@ converts a table into plain text without frames. It is a companion to | |||
| 26507 | 26676 | ||
| 26508 | ;;;*** | 26677 | ;;;*** |
| 26509 | 26678 | ||
| 26510 | ;;;### (autoloads nil "talk" "talk.el" (20709 26818 907104 0)) | 26679 | ;;;### (autoloads nil "talk" "talk.el" (20992 52525 458637 0)) |
| 26511 | ;;; Generated autoloads from talk.el | 26680 | ;;; Generated autoloads from talk.el |
| 26512 | 26681 | ||
| 26513 | (autoload 'talk-connect "talk" "\ | 26682 | (autoload 'talk-connect "talk" "\ |
| @@ -26677,7 +26846,7 @@ Start coverage on function under point. | |||
| 26677 | ;;;### (autoloads nil "tetris" "play/tetris.el" (20874 65006 672942 | 26846 | ;;;### (autoloads nil "tetris" "play/tetris.el" (20874 65006 672942 |
| 26678 | ;;;;;; 217000)) | 26847 | ;;;;;; 217000)) |
| 26679 | ;;; Generated autoloads from play/tetris.el | 26848 | ;;; Generated autoloads from play/tetris.el |
| 26680 | (push (purecopy (quote (tetris 2 1))) package--builtin-versions) | 26849 | (push (purecopy '(tetris 2 1)) package--builtin-versions) |
| 26681 | (autoload 'tetris "tetris" "\ | 26850 | (autoload 'tetris "tetris" "\ |
| 26682 | Play the Tetris game. | 26851 | Play the Tetris game. |
| 26683 | Shapes drop from the top of the screen, and the user has to move and | 26852 | Shapes drop from the top of the screen, and the user has to move and |
| @@ -27154,7 +27323,7 @@ Compose Thai characters in the current buffer. | |||
| 27154 | 27323 | ||
| 27155 | ;;;*** | 27324 | ;;;*** |
| 27156 | 27325 | ||
| 27157 | ;;;### (autoloads nil "thingatpt" "thingatpt.el" (20874 62962 290468 | 27326 | ;;;### (autoloads nil "thingatpt" "thingatpt.el" (20999 25770 522517 |
| 27158 | ;;;;;; 0)) | 27327 | ;;;;;; 0)) |
| 27159 | ;;; Generated autoloads from thingatpt.el | 27328 | ;;; Generated autoloads from thingatpt.el |
| 27160 | 27329 | ||
| @@ -27219,7 +27388,7 @@ Return the Lisp list at point, or nil if none is found. | |||
| 27219 | 27388 | ||
| 27220 | ;;;*** | 27389 | ;;;*** |
| 27221 | 27390 | ||
| 27222 | ;;;### (autoloads nil "thumbs" "thumbs.el" (20709 26818 907104 0)) | 27391 | ;;;### (autoloads nil "thumbs" "thumbs.el" (20958 59019 473587 89000)) |
| 27223 | ;;; Generated autoloads from thumbs.el | 27392 | ;;; Generated autoloads from thumbs.el |
| 27224 | 27393 | ||
| 27225 | (autoload 'thumbs-find-thumb "thumbs" "\ | 27394 | (autoload 'thumbs-find-thumb "thumbs" "\ |
| @@ -27330,7 +27499,7 @@ See also docstring of the function tibetan-compose-region. | |||
| 27330 | ;;;### (autoloads nil "tildify" "textmodes/tildify.el" (20791 9657 | 27499 | ;;;### (autoloads nil "tildify" "textmodes/tildify.el" (20791 9657 |
| 27331 | ;;;;;; 561026 0)) | 27500 | ;;;;;; 561026 0)) |
| 27332 | ;;; Generated autoloads from textmodes/tildify.el | 27501 | ;;; Generated autoloads from textmodes/tildify.el |
| 27333 | (push (purecopy (quote (tildify 4 5))) package--builtin-versions) | 27502 | (push (purecopy '(tildify 4 5)) package--builtin-versions) |
| 27334 | (autoload 'tildify-region "tildify" "\ | 27503 | (autoload 'tildify-region "tildify" "\ |
| 27335 | Add hard spaces in the region between BEG and END. | 27504 | Add hard spaces in the region between BEG and END. |
| 27336 | See variables `tildify-pattern-alist', `tildify-string-alist', and | 27505 | See variables `tildify-pattern-alist', `tildify-string-alist', and |
| @@ -27351,7 +27520,7 @@ This function performs no refilling of the changed text. | |||
| 27351 | 27520 | ||
| 27352 | ;;;*** | 27521 | ;;;*** |
| 27353 | 27522 | ||
| 27354 | ;;;### (autoloads nil "time" "time.el" (20709 26818 907104 0)) | 27523 | ;;;### (autoloads nil "time" "time.el" (20998 4934 952905 0)) |
| 27355 | ;;; Generated autoloads from time.el | 27524 | ;;; Generated autoloads from time.el |
| 27356 | 27525 | ||
| 27357 | (defvar display-time-day-and-date nil "\ | 27526 | (defvar display-time-day-and-date nil "\ |
| @@ -27566,10 +27735,19 @@ With ARG, turn time stamping on if and only if arg is positive. | |||
| 27566 | 27735 | ||
| 27567 | ;;;*** | 27736 | ;;;*** |
| 27568 | 27737 | ||
| 27569 | ;;;### (autoloads nil "timeclock" "calendar/timeclock.el" (20799 | 27738 | ;;;### (autoloads nil "timeclock" "calendar/timeclock.el" (21013 |
| 27570 | ;;;;;; 169 640767 0)) | 27739 | ;;;;;; 58662 278539 0)) |
| 27571 | ;;; Generated autoloads from calendar/timeclock.el | 27740 | ;;; Generated autoloads from calendar/timeclock.el |
| 27572 | (push (purecopy (quote (timeclock 2 6 1))) package--builtin-versions) | 27741 | (push (purecopy '(timeclock 2 6 1)) package--builtin-versions) |
| 27742 | (defvar timeclock-mode-line-display nil "\ | ||
| 27743 | Non-nil if Timeclock-Mode-Line-Display mode is enabled. | ||
| 27744 | See the command `timeclock-mode-line-display' for a description of this minor mode. | ||
| 27745 | Setting this variable directly does not take effect; | ||
| 27746 | either customize it (see the info node `Easy Customization') | ||
| 27747 | or call the function `timeclock-mode-line-display'.") | ||
| 27748 | |||
| 27749 | (custom-autoload 'timeclock-mode-line-display "timeclock" nil) | ||
| 27750 | |||
| 27573 | (autoload 'timeclock-mode-line-display "timeclock" "\ | 27751 | (autoload 'timeclock-mode-line-display "timeclock" "\ |
| 27574 | Toggle display of the amount of time left today in the mode line. | 27752 | Toggle display of the amount of time left today in the mode line. |
| 27575 | If `timeclock-use-display-time' is non-nil (the default), then | 27753 | If `timeclock-use-display-time' is non-nil (the default), then |
| @@ -27727,8 +27905,8 @@ Its value should be an event that has a binding in MENU. | |||
| 27727 | 27905 | ||
| 27728 | ;;;*** | 27906 | ;;;*** |
| 27729 | 27907 | ||
| 27730 | ;;;### (autoloads nil "todo-mode" "calendar/todo-mode.el" (20944 | 27908 | ;;;### (autoloads nil "todo-mode" "calendar/todo-mode.el" (20982 |
| 27731 | ;;;;;; 31824 211965 0)) | 27909 | ;;;;;; 16679 447285 0)) |
| 27732 | ;;; Generated autoloads from calendar/todo-mode.el | 27910 | ;;; Generated autoloads from calendar/todo-mode.el |
| 27733 | 27911 | ||
| 27734 | (autoload 'todo-show "todo-mode" "\ | 27912 | (autoload 'todo-show "todo-mode" "\ |
| @@ -27770,7 +27948,7 @@ and done items are always shown on visiting a category. | |||
| 27770 | Invoking this command in Todo Archive mode visits the | 27948 | Invoking this command in Todo Archive mode visits the |
| 27771 | corresponding todo file, displaying the corresponding category. | 27949 | corresponding todo file, displaying the corresponding category. |
| 27772 | 27950 | ||
| 27773 | \(fn &optional SOLICIT-FILE)" t nil) | 27951 | \(fn &optional SOLICIT-FILE INTERACTIVE)" t nil) |
| 27774 | 27952 | ||
| 27775 | ;;;*** | 27953 | ;;;*** |
| 27776 | 27954 | ||
| @@ -27848,7 +28026,7 @@ holds a keymap. | |||
| 27848 | ;;;### (autoloads nil "tpu-edt" "emulation/tpu-edt.el" (20884 7264 | 28026 | ;;;### (autoloads nil "tpu-edt" "emulation/tpu-edt.el" (20884 7264 |
| 27849 | ;;;;;; 412929 442000)) | 28027 | ;;;;;; 412929 442000)) |
| 27850 | ;;; Generated autoloads from emulation/tpu-edt.el | 28028 | ;;; Generated autoloads from emulation/tpu-edt.el |
| 27851 | (push (purecopy (quote (tpu-edt 4 5))) package--builtin-versions) | 28029 | (push (purecopy '(tpu-edt 4 5)) package--builtin-versions) |
| 27852 | (defvar tpu-edt-mode nil "\ | 28030 | (defvar tpu-edt-mode nil "\ |
| 27853 | Non-nil if Tpu-Edt mode is enabled. | 28031 | Non-nil if Tpu-Edt mode is enabled. |
| 27854 | See the command `tpu-edt-mode' for a description of this minor mode. | 28032 | See the command `tpu-edt-mode' for a description of this minor mode. |
| @@ -27963,7 +28141,7 @@ changing the window configuration. | |||
| 27963 | 28141 | ||
| 27964 | ;;;*** | 28142 | ;;;*** |
| 27965 | 28143 | ||
| 27966 | ;;;### (autoloads nil "tramp" "net/tramp.el" (20854 24486 190633 | 28144 | ;;;### (autoloads nil "tramp" "net/tramp.el" (21024 28968 738399 |
| 27967 | ;;;;;; 0)) | 28145 | ;;;;;; 0)) |
| 27968 | ;;; Generated autoloads from net/tramp.el | 28146 | ;;; Generated autoloads from net/tramp.el |
| 27969 | 28147 | ||
| @@ -28096,8 +28274,8 @@ Discard Tramp from loading remote files. | |||
| 28096 | 28274 | ||
| 28097 | ;;;*** | 28275 | ;;;*** |
| 28098 | 28276 | ||
| 28099 | ;;;### (autoloads nil "tramp-ftp" "net/tramp-ftp.el" (20709 26818 | 28277 | ;;;### (autoloads nil "tramp-ftp" "net/tramp-ftp.el" (21008 40741 |
| 28100 | ;;;;;; 907104 0)) | 28278 | ;;;;;; 120196 0)) |
| 28101 | ;;; Generated autoloads from net/tramp-ftp.el | 28279 | ;;; Generated autoloads from net/tramp-ftp.el |
| 28102 | 28280 | ||
| 28103 | (autoload 'tramp-ftp-enable-ange-ftp "tramp-ftp" "\ | 28281 | (autoload 'tramp-ftp-enable-ange-ftp "tramp-ftp" "\ |
| @@ -28107,7 +28285,7 @@ Discard Tramp from loading remote files. | |||
| 28107 | 28285 | ||
| 28108 | ;;;*** | 28286 | ;;;*** |
| 28109 | 28287 | ||
| 28110 | ;;;### (autoloads nil "tutorial" "tutorial.el" (20760 54070 584283 | 28288 | ;;;### (autoloads nil "tutorial" "tutorial.el" (20999 25770 522517 |
| 28111 | ;;;;;; 0)) | 28289 | ;;;;;; 0)) |
| 28112 | ;;; Generated autoloads from tutorial.el | 28290 | ;;; Generated autoloads from tutorial.el |
| 28113 | 28291 | ||
| @@ -28645,8 +28823,8 @@ Might do a non-blocking connection; use `process-status' to check. | |||
| 28645 | 28823 | ||
| 28646 | ;;;*** | 28824 | ;;;*** |
| 28647 | 28825 | ||
| 28648 | ;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (20892 | 28826 | ;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (20984 |
| 28649 | ;;;;;; 39729 858825 0)) | 28827 | ;;;;;; 58408 354075 0)) |
| 28650 | ;;; Generated autoloads from url/url-handlers.el | 28828 | ;;; Generated autoloads from url/url-handlers.el |
| 28651 | 28829 | ||
| 28652 | (defvar url-handler-mode nil "\ | 28830 | (defvar url-handler-mode nil "\ |
| @@ -28700,8 +28878,8 @@ accessible. | |||
| 28700 | 28878 | ||
| 28701 | ;;;*** | 28879 | ;;;*** |
| 28702 | 28880 | ||
| 28703 | ;;;### (autoloads nil "url-http" "url/url-http.el" (20766 59628 334727 | 28881 | ;;;### (autoloads nil "url-http" "url/url-http.el" (21004 43695 993272 |
| 28704 | ;;;;;; 618000)) | 28882 | ;;;;;; 0)) |
| 28705 | ;;; Generated autoloads from url/url-http.el | 28883 | ;;; Generated autoloads from url/url-http.el |
| 28706 | (autoload 'url-default-expander "url-expand") | 28884 | (autoload 'url-default-expander "url-expand") |
| 28707 | 28885 | ||
| @@ -29095,7 +29273,7 @@ This uses `url-current-object', set locally to the buffer. | |||
| 29095 | 29273 | ||
| 29096 | ;;;*** | 29274 | ;;;*** |
| 29097 | 29275 | ||
| 29098 | ;;;### (autoloads nil "userlock" "userlock.el" (20709 26818 907104 | 29276 | ;;;### (autoloads nil "userlock" "userlock.el" (20998 4934 952905 |
| 29099 | ;;;;;; 0)) | 29277 | ;;;;;; 0)) |
| 29100 | ;;; Generated autoloads from userlock.el | 29278 | ;;; Generated autoloads from userlock.el |
| 29101 | 29279 | ||
| @@ -29185,7 +29363,7 @@ If FILE-NAME is non-nil, save the result to FILE-NAME. | |||
| 29185 | 29363 | ||
| 29186 | ;;;*** | 29364 | ;;;*** |
| 29187 | 29365 | ||
| 29188 | ;;;### (autoloads nil "vc" "vc/vc.el" (20919 46844 767888 0)) | 29366 | ;;;### (autoloads nil "vc" "vc/vc.el" (20992 52525 458637 0)) |
| 29189 | ;;; Generated autoloads from vc/vc.el | 29367 | ;;; Generated autoloads from vc/vc.el |
| 29190 | 29368 | ||
| 29191 | (defvar vc-checkout-hook nil "\ | 29369 | (defvar vc-checkout-hook nil "\ |
| @@ -29515,7 +29693,7 @@ mode-specific menu. `vc-annotate-color-map' and | |||
| 29515 | 29693 | ||
| 29516 | ;;;*** | 29694 | ;;;*** |
| 29517 | 29695 | ||
| 29518 | ;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (20900 33838 319219 | 29696 | ;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (20990 10793 424093 |
| 29519 | ;;;;;; 0)) | 29697 | ;;;;;; 0)) |
| 29520 | ;;; Generated autoloads from vc/vc-bzr.el | 29698 | ;;; Generated autoloads from vc/vc-bzr.el |
| 29521 | 29699 | ||
| @@ -29532,7 +29710,7 @@ Name of the format file in a .bzr directory.") | |||
| 29532 | 29710 | ||
| 29533 | ;;;*** | 29711 | ;;;*** |
| 29534 | 29712 | ||
| 29535 | ;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (20921 39978 248467 | 29713 | ;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (20983 37555 279226 |
| 29536 | ;;;;;; 0)) | 29714 | ;;;;;; 0)) |
| 29537 | ;;; Generated autoloads from vc/vc-cvs.el | 29715 | ;;; Generated autoloads from vc/vc-cvs.el |
| 29538 | (defun vc-cvs-registered (f) | 29716 | (defun vc-cvs-registered (f) |
| @@ -29544,7 +29722,7 @@ Name of the format file in a .bzr directory.") | |||
| 29544 | 29722 | ||
| 29545 | ;;;*** | 29723 | ;;;*** |
| 29546 | 29724 | ||
| 29547 | ;;;### (autoloads nil "vc-dir" "vc/vc-dir.el" (20900 33838 319219 | 29725 | ;;;### (autoloads nil "vc-dir" "vc/vc-dir.el" (20990 10793 424093 |
| 29548 | ;;;;;; 0)) | 29726 | ;;;;;; 0)) |
| 29549 | ;;; Generated autoloads from vc/vc-dir.el | 29727 | ;;; Generated autoloads from vc/vc-dir.el |
| 29550 | 29728 | ||
| @@ -29593,7 +29771,7 @@ case, and the process object in the asynchronous case. | |||
| 29593 | 29771 | ||
| 29594 | ;;;*** | 29772 | ;;;*** |
| 29595 | 29773 | ||
| 29596 | ;;;### (autoloads nil "vc-git" "vc/vc-git.el" (20900 33838 319219 | 29774 | ;;;### (autoloads nil "vc-git" "vc/vc-git.el" (20990 10793 424093 |
| 29597 | ;;;;;; 0)) | 29775 | ;;;;;; 0)) |
| 29598 | ;;; Generated autoloads from vc/vc-git.el | 29776 | ;;; Generated autoloads from vc/vc-git.el |
| 29599 | (defun vc-git-registered (file) | 29777 | (defun vc-git-registered (file) |
| @@ -29605,7 +29783,7 @@ case, and the process object in the asynchronous case. | |||
| 29605 | 29783 | ||
| 29606 | ;;;*** | 29784 | ;;;*** |
| 29607 | 29785 | ||
| 29608 | ;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (20900 33838 319219 0)) | 29786 | ;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (20990 10793 424093 0)) |
| 29609 | ;;; Generated autoloads from vc/vc-hg.el | 29787 | ;;; Generated autoloads from vc/vc-hg.el |
| 29610 | (defun vc-hg-registered (file) | 29788 | (defun vc-hg-registered (file) |
| 29611 | "Return non-nil if FILE is registered with hg." | 29789 | "Return non-nil if FILE is registered with hg." |
| @@ -29666,7 +29844,7 @@ find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir) | |||
| 29666 | 29844 | ||
| 29667 | ;;;*** | 29845 | ;;;*** |
| 29668 | 29846 | ||
| 29669 | ;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (20900 33838 319219 | 29847 | ;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (20990 10793 424093 |
| 29670 | ;;;;;; 0)) | 29848 | ;;;;;; 0)) |
| 29671 | ;;; Generated autoloads from vc/vc-svn.el | 29849 | ;;; Generated autoloads from vc/vc-svn.el |
| 29672 | (defun vc-svn-registered (f) | 29850 | (defun vc-svn-registered (f) |
| @@ -29683,7 +29861,7 @@ find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir) | |||
| 29683 | ;;;### (autoloads nil "vera-mode" "progmodes/vera-mode.el" (20893 | 29861 | ;;;### (autoloads nil "vera-mode" "progmodes/vera-mode.el" (20893 |
| 29684 | ;;;;;; 60586 188550 0)) | 29862 | ;;;;;; 60586 188550 0)) |
| 29685 | ;;; Generated autoloads from progmodes/vera-mode.el | 29863 | ;;; Generated autoloads from progmodes/vera-mode.el |
| 29686 | (push (purecopy (quote (vera-mode 2 28))) package--builtin-versions) (add-to-list 'auto-mode-alist (cons (purecopy "\\.vr[hi]?\\'") 'vera-mode)) | 29864 | (push (purecopy '(vera-mode 2 28)) package--builtin-versions) (add-to-list 'auto-mode-alist (cons (purecopy "\\.vr[hi]?\\'") 'vera-mode)) |
| 29687 | 29865 | ||
| 29688 | (autoload 'vera-mode "vera-mode" "\ | 29866 | (autoload 'vera-mode "vera-mode" "\ |
| 29689 | Major mode for editing Vera code. | 29867 | Major mode for editing Vera code. |
| @@ -29739,7 +29917,7 @@ Key bindings: | |||
| 29739 | ;;;*** | 29917 | ;;;*** |
| 29740 | 29918 | ||
| 29741 | ;;;### (autoloads nil "verilog-mode" "progmodes/verilog-mode.el" | 29919 | ;;;### (autoloads nil "verilog-mode" "progmodes/verilog-mode.el" |
| 29742 | ;;;;;; (20885 2819 449152 0)) | 29920 | ;;;;;; (20992 52525 458637 0)) |
| 29743 | ;;; Generated autoloads from progmodes/verilog-mode.el | 29921 | ;;; Generated autoloads from progmodes/verilog-mode.el |
| 29744 | 29922 | ||
| 29745 | (autoload 'verilog-mode "verilog-mode" "\ | 29923 | (autoload 'verilog-mode "verilog-mode" "\ |
| @@ -30530,7 +30708,7 @@ Convert Vietnamese characters of the current buffer to `VIQR' mnemonics. | |||
| 30530 | 30708 | ||
| 30531 | ;;;*** | 30709 | ;;;*** |
| 30532 | 30710 | ||
| 30533 | ;;;### (autoloads nil "view" "view.el" (20762 9398 526093 0)) | 30711 | ;;;### (autoloads nil "view" "view.el" (20999 25770 522517 0)) |
| 30534 | ;;; Generated autoloads from view.el | 30712 | ;;; Generated autoloads from view.el |
| 30535 | 30713 | ||
| 30536 | (defvar view-remove-frame-by-deleting t "\ | 30714 | (defvar view-remove-frame-by-deleting t "\ |
| @@ -30802,10 +30980,10 @@ Turn on VIP emulation of VI. | |||
| 30802 | 30980 | ||
| 30803 | ;;;*** | 30981 | ;;;*** |
| 30804 | 30982 | ||
| 30805 | ;;;### (autoloads nil "viper" "emulation/viper.el" (20799 169 640767 | 30983 | ;;;### (autoloads nil "viper" "emulation/viper.el" (20954 37295 781599 |
| 30806 | ;;;;;; 0)) | 30984 | ;;;;;; 0)) |
| 30807 | ;;; Generated autoloads from emulation/viper.el | 30985 | ;;; Generated autoloads from emulation/viper.el |
| 30808 | (push (purecopy (quote (viper 3 14 1))) package--builtin-versions) | 30986 | (push (purecopy '(viper 3 14 1)) package--builtin-versions) |
| 30809 | (autoload 'toggle-viper-mode "viper" "\ | 30987 | (autoload 'toggle-viper-mode "viper" "\ |
| 30810 | Toggle Viper on/off. | 30988 | Toggle Viper on/off. |
| 30811 | If Viper is enabled, turn it off. Otherwise, turn it on. | 30989 | If Viper is enabled, turn it off. Otherwise, turn it on. |
| @@ -30909,9 +31087,9 @@ this is equivalent to `display-warning', using | |||
| 30909 | 31087 | ||
| 30910 | ;;;*** | 31088 | ;;;*** |
| 30911 | 31089 | ||
| 30912 | ;;;### (autoloads nil "wdired" "wdired.el" (20900 33838 319219 0)) | 31090 | ;;;### (autoloads nil "wdired" "wdired.el" (20992 52525 458637 0)) |
| 30913 | ;;; Generated autoloads from wdired.el | 31091 | ;;; Generated autoloads from wdired.el |
| 30914 | (push (purecopy (quote (wdired 2 0))) package--builtin-versions) | 31092 | (push (purecopy '(wdired 2 0)) package--builtin-versions) |
| 30915 | (autoload 'wdired-change-to-wdired-mode "wdired" "\ | 31093 | (autoload 'wdired-change-to-wdired-mode "wdired" "\ |
| 30916 | Put a Dired buffer in Writable Dired (WDired) mode. | 31094 | Put a Dired buffer in Writable Dired (WDired) mode. |
| 30917 | \\<wdired-mode-map> | 31095 | \\<wdired-mode-map> |
| @@ -30974,10 +31152,10 @@ in certain major modes. | |||
| 30974 | 31152 | ||
| 30975 | ;;;*** | 31153 | ;;;*** |
| 30976 | 31154 | ||
| 30977 | ;;;### (autoloads nil "whitespace" "whitespace.el" (20874 65007 172950 | 31155 | ;;;### (autoloads nil "whitespace" "whitespace.el" (20986 60038 720063 |
| 30978 | ;;;;;; 7000)) | 31156 | ;;;;;; 0)) |
| 30979 | ;;; Generated autoloads from whitespace.el | 31157 | ;;; Generated autoloads from whitespace.el |
| 30980 | (push (purecopy (quote (whitespace 13 2 2))) package--builtin-versions) | 31158 | (push (purecopy '(whitespace 13 2 2)) package--builtin-versions) |
| 30981 | (autoload 'whitespace-mode "whitespace" "\ | 31159 | (autoload 'whitespace-mode "whitespace" "\ |
| 30982 | Toggle whitespace visualization (Whitespace mode). | 31160 | Toggle whitespace visualization (Whitespace mode). |
| 30983 | With a prefix argument ARG, enable Whitespace mode if ARG is | 31161 | With a prefix argument ARG, enable Whitespace mode if ARG is |
| @@ -31402,7 +31580,7 @@ if ARG is omitted or nil. | |||
| 31402 | 31580 | ||
| 31403 | ;;;*** | 31581 | ;;;*** |
| 31404 | 31582 | ||
| 31405 | ;;;### (autoloads nil "wid-edit" "wid-edit.el" (20945 22315 8369 | 31583 | ;;;### (autoloads nil "wid-edit" "wid-edit.el" (20959 55207 940876 |
| 31406 | ;;;;;; 0)) | 31584 | ;;;;;; 0)) |
| 31407 | ;;; Generated autoloads from wid-edit.el | 31585 | ;;; Generated autoloads from wid-edit.el |
| 31408 | 31586 | ||
| @@ -31498,7 +31676,7 @@ Default MODIFIER is 'shift. | |||
| 31498 | 31676 | ||
| 31499 | ;;;*** | 31677 | ;;;*** |
| 31500 | 31678 | ||
| 31501 | ;;;### (autoloads nil "winner" "winner.el" (20849 6570 598687 0)) | 31679 | ;;;### (autoloads nil "winner" "winner.el" (20992 52525 458637 0)) |
| 31502 | ;;; Generated autoloads from winner.el | 31680 | ;;; Generated autoloads from winner.el |
| 31503 | 31681 | ||
| 31504 | (defvar winner-mode nil "\ | 31682 | (defvar winner-mode nil "\ |
| @@ -31521,9 +31699,9 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'. | |||
| 31521 | 31699 | ||
| 31522 | ;;;*** | 31700 | ;;;*** |
| 31523 | 31701 | ||
| 31524 | ;;;### (autoloads nil "woman" "woman.el" (20709 26818 907104 0)) | 31702 | ;;;### (autoloads nil "woman" "woman.el" (20999 25770 522517 0)) |
| 31525 | ;;; Generated autoloads from woman.el | 31703 | ;;; Generated autoloads from woman.el |
| 31526 | (push (purecopy (quote (woman 0 551))) package--builtin-versions) | 31704 | (push (purecopy '(woman 0 551)) package--builtin-versions) |
| 31527 | (defvar woman-locale nil "\ | 31705 | (defvar woman-locale nil "\ |
| 31528 | String specifying a manual page locale, or nil. | 31706 | String specifying a manual page locale, or nil. |
| 31529 | If a manual page is available in the specified locale | 31707 | If a manual page is available in the specified locale |
| @@ -31572,7 +31750,7 @@ Default bookmark handler for Woman buffers. | |||
| 31572 | ;;;### (autoloads nil "ws-mode" "emulation/ws-mode.el" (20709 26818 | 31750 | ;;;### (autoloads nil "ws-mode" "emulation/ws-mode.el" (20709 26818 |
| 31573 | ;;;;;; 907104 0)) | 31751 | ;;;;;; 907104 0)) |
| 31574 | ;;; Generated autoloads from emulation/ws-mode.el | 31752 | ;;; Generated autoloads from emulation/ws-mode.el |
| 31575 | (push (purecopy (quote (ws-mode 0 7))) package--builtin-versions) | 31753 | (push (purecopy '(ws-mode 0 7)) package--builtin-versions) |
| 31576 | (autoload 'wordstar-mode "ws-mode" "\ | 31754 | (autoload 'wordstar-mode "ws-mode" "\ |
| 31577 | Major mode with WordStar-like key bindings. | 31755 | Major mode with WordStar-like key bindings. |
| 31578 | 31756 | ||
| @@ -31682,7 +31860,7 @@ The key bindings are: | |||
| 31682 | 31860 | ||
| 31683 | ;;;*** | 31861 | ;;;*** |
| 31684 | 31862 | ||
| 31685 | ;;;### (autoloads nil "xml" "xml.el" (20766 6456 368550 0)) | 31863 | ;;;### (autoloads nil "xml" "xml.el" (21002 1963 769129 0)) |
| 31686 | ;;; Generated autoloads from xml.el | 31864 | ;;; Generated autoloads from xml.el |
| 31687 | 31865 | ||
| 31688 | (autoload 'xml-parse-file "xml" "\ | 31866 | (autoload 'xml-parse-file "xml" "\ |
| @@ -31738,7 +31916,7 @@ Both features can be combined by providing a cons cell | |||
| 31738 | 31916 | ||
| 31739 | ;;;*** | 31917 | ;;;*** |
| 31740 | 31918 | ||
| 31741 | ;;;### (autoloads nil "xmltok" "nxml/xmltok.el" (20884 6711 386198 | 31919 | ;;;### (autoloads nil "xmltok" "nxml/xmltok.el" (20998 4934 952905 |
| 31742 | ;;;;;; 0)) | 31920 | ;;;;;; 0)) |
| 31743 | ;;; Generated autoloads from nxml/xmltok.el | 31921 | ;;; Generated autoloads from nxml/xmltok.el |
| 31744 | 31922 | ||
| @@ -31802,7 +31980,7 @@ Extract file name from an yenc header. | |||
| 31802 | 31980 | ||
| 31803 | ;;;*** | 31981 | ;;;*** |
| 31804 | 31982 | ||
| 31805 | ;;;### (autoloads nil "zone" "play/zone.el" (20709 26818 907104 0)) | 31983 | ;;;### (autoloads nil "zone" "play/zone.el" (20992 52525 458637 0)) |
| 31806 | ;;; Generated autoloads from play/zone.el | 31984 | ;;; Generated autoloads from play/zone.el |
| 31807 | 31985 | ||
| 31808 | (autoload 'zone "zone" "\ | 31986 | (autoload 'zone "zone" "\ |
| @@ -31818,45 +31996,44 @@ Zone out, completely. | |||
| 31818 | ;;;;;; "calc/calc-fin.el" "calc/calc-forms.el" "calc/calc-frac.el" | 31996 | ;;;;;; "calc/calc-fin.el" "calc/calc-forms.el" "calc/calc-frac.el" |
| 31819 | ;;;;;; "calc/calc-funcs.el" "calc/calc-graph.el" "calc/calc-help.el" | 31997 | ;;;;;; "calc/calc-funcs.el" "calc/calc-graph.el" "calc/calc-help.el" |
| 31820 | ;;;;;; "calc/calc-incom.el" "calc/calc-keypd.el" "calc/calc-lang.el" | 31998 | ;;;;;; "calc/calc-incom.el" "calc/calc-keypd.el" "calc/calc-lang.el" |
| 31821 | ;;;;;; "calc/calc-loaddefs.el" "calc/calc-macs.el" "calc/calc-map.el" | 31999 | ;;;;;; "calc/calc-macs.el" "calc/calc-map.el" "calc/calc-math.el" |
| 31822 | ;;;;;; "calc/calc-math.el" "calc/calc-menu.el" "calc/calc-misc.el" | 32000 | ;;;;;; "calc/calc-menu.el" "calc/calc-misc.el" "calc/calc-mode.el" |
| 31823 | ;;;;;; "calc/calc-mode.el" "calc/calc-mtx.el" "calc/calc-nlfit.el" | 32001 | ;;;;;; "calc/calc-mtx.el" "calc/calc-nlfit.el" "calc/calc-poly.el" |
| 31824 | ;;;;;; "calc/calc-poly.el" "calc/calc-prog.el" "calc/calc-rewr.el" | 32002 | ;;;;;; "calc/calc-prog.el" "calc/calc-rewr.el" "calc/calc-rules.el" |
| 31825 | ;;;;;; "calc/calc-rules.el" "calc/calc-sel.el" "calc/calc-stat.el" | 32003 | ;;;;;; "calc/calc-sel.el" "calc/calc-stat.el" "calc/calc-store.el" |
| 31826 | ;;;;;; "calc/calc-store.el" "calc/calc-stuff.el" "calc/calc-trail.el" | 32004 | ;;;;;; "calc/calc-stuff.el" "calc/calc-trail.el" "calc/calc-units.el" |
| 31827 | ;;;;;; "calc/calc-units.el" "calc/calc-vec.el" "calc/calc-yank.el" | 32005 | ;;;;;; "calc/calc-vec.el" "calc/calc-yank.el" "calc/calcalg2.el" |
| 31828 | ;;;;;; "calc/calcalg2.el" "calc/calcalg3.el" "calc/calccomp.el" | 32006 | ;;;;;; "calc/calcalg3.el" "calc/calccomp.el" "calc/calcsel2.el" |
| 31829 | ;;;;;; "calc/calcsel2.el" "calendar/cal-bahai.el" "calendar/cal-coptic.el" | 32007 | ;;;;;; "calendar/cal-bahai.el" "calendar/cal-coptic.el" "calendar/cal-french.el" |
| 31830 | ;;;;;; "calendar/cal-french.el" "calendar/cal-html.el" "calendar/cal-islam.el" | 32008 | ;;;;;; "calendar/cal-html.el" "calendar/cal-islam.el" "calendar/cal-iso.el" |
| 31831 | ;;;;;; "calendar/cal-iso.el" "calendar/cal-julian.el" "calendar/cal-loaddefs.el" | 32009 | ;;;;;; "calendar/cal-julian.el" "calendar/cal-loaddefs.el" "calendar/cal-mayan.el" |
| 31832 | ;;;;;; "calendar/cal-mayan.el" "calendar/cal-menu.el" "calendar/cal-move.el" | 32010 | ;;;;;; "calendar/cal-menu.el" "calendar/cal-move.el" "calendar/cal-persia.el" |
| 31833 | ;;;;;; "calendar/cal-persia.el" "calendar/cal-tex.el" "calendar/cal-x.el" | 32011 | ;;;;;; "calendar/cal-tex.el" "calendar/cal-x.el" "calendar/diary-loaddefs.el" |
| 31834 | ;;;;;; "calendar/diary-loaddefs.el" "calendar/hol-loaddefs.el" "cdl.el" | 32012 | ;;;;;; "calendar/hol-loaddefs.el" "cdl.el" "cedet/cedet-cscope.el" |
| 31835 | ;;;;;; "cedet/cedet-cscope.el" "cedet/cedet-files.el" "cedet/cedet-global.el" | 32013 | ;;;;;; "cedet/cedet-files.el" "cedet/cedet-global.el" "cedet/cedet-idutils.el" |
| 31836 | ;;;;;; "cedet/cedet-idutils.el" "cedet/ede/auto.el" "cedet/ede/autoconf-edit.el" | 32014 | ;;;;;; "cedet/ede/auto.el" "cedet/ede/autoconf-edit.el" "cedet/ede/base.el" |
| 31837 | ;;;;;; "cedet/ede/base.el" "cedet/ede/cpp-root.el" "cedet/ede/custom.el" | 32015 | ;;;;;; "cedet/ede/cpp-root.el" "cedet/ede/custom.el" "cedet/ede/emacs.el" |
| 31838 | ;;;;;; "cedet/ede/emacs.el" "cedet/ede/files.el" "cedet/ede/generic.el" | 32016 | ;;;;;; "cedet/ede/files.el" "cedet/ede/generic.el" "cedet/ede/linux.el" |
| 31839 | ;;;;;; "cedet/ede/linux.el" "cedet/ede/loaddefs.el" "cedet/ede/locate.el" | 32017 | ;;;;;; "cedet/ede/locate.el" "cedet/ede/make.el" "cedet/ede/makefile-edit.el" |
| 31840 | ;;;;;; "cedet/ede/make.el" "cedet/ede/makefile-edit.el" "cedet/ede/pconf.el" | 32018 | ;;;;;; "cedet/ede/pconf.el" "cedet/ede/pmake.el" "cedet/ede/proj-archive.el" |
| 31841 | ;;;;;; "cedet/ede/pmake.el" "cedet/ede/proj-archive.el" "cedet/ede/proj-aux.el" | 32019 | ;;;;;; "cedet/ede/proj-aux.el" "cedet/ede/proj-comp.el" "cedet/ede/proj-elisp.el" |
| 31842 | ;;;;;; "cedet/ede/proj-comp.el" "cedet/ede/proj-elisp.el" "cedet/ede/proj-info.el" | 32020 | ;;;;;; "cedet/ede/proj-info.el" "cedet/ede/proj-misc.el" "cedet/ede/proj-obj.el" |
| 31843 | ;;;;;; "cedet/ede/proj-misc.el" "cedet/ede/proj-obj.el" "cedet/ede/proj-prog.el" | 32021 | ;;;;;; "cedet/ede/proj-prog.el" "cedet/ede/proj-scheme.el" "cedet/ede/proj-shared.el" |
| 31844 | ;;;;;; "cedet/ede/proj-scheme.el" "cedet/ede/proj-shared.el" "cedet/ede/proj.el" | 32022 | ;;;;;; "cedet/ede/proj.el" "cedet/ede/shell.el" "cedet/ede/simple.el" |
| 31845 | ;;;;;; "cedet/ede/shell.el" "cedet/ede/simple.el" "cedet/ede/source.el" | 32023 | ;;;;;; "cedet/ede/source.el" "cedet/ede/speedbar.el" "cedet/ede/srecode.el" |
| 31846 | ;;;;;; "cedet/ede/speedbar.el" "cedet/ede/srecode.el" "cedet/ede/system.el" | 32024 | ;;;;;; "cedet/ede/system.el" "cedet/ede/util.el" "cedet/semantic/analyze.el" |
| 31847 | ;;;;;; "cedet/ede/util.el" "cedet/semantic/analyze.el" "cedet/semantic/analyze/complete.el" | 32025 | ;;;;;; "cedet/semantic/analyze/complete.el" "cedet/semantic/analyze/debug.el" |
| 31848 | ;;;;;; "cedet/semantic/analyze/debug.el" "cedet/semantic/analyze/fcn.el" | 32026 | ;;;;;; "cedet/semantic/analyze/fcn.el" "cedet/semantic/analyze/refs.el" |
| 31849 | ;;;;;; "cedet/semantic/analyze/refs.el" "cedet/semantic/bovine.el" | 32027 | ;;;;;; "cedet/semantic/bovine.el" "cedet/semantic/bovine/c-by.el" |
| 31850 | ;;;;;; "cedet/semantic/bovine/c-by.el" "cedet/semantic/bovine/c.el" | 32028 | ;;;;;; "cedet/semantic/bovine/c.el" "cedet/semantic/bovine/debug.el" |
| 31851 | ;;;;;; "cedet/semantic/bovine/debug.el" "cedet/semantic/bovine/el.el" | 32029 | ;;;;;; "cedet/semantic/bovine/el.el" "cedet/semantic/bovine/gcc.el" |
| 31852 | ;;;;;; "cedet/semantic/bovine/gcc.el" "cedet/semantic/bovine/make-by.el" | 32030 | ;;;;;; "cedet/semantic/bovine/make-by.el" "cedet/semantic/bovine/make.el" |
| 31853 | ;;;;;; "cedet/semantic/bovine/make.el" "cedet/semantic/bovine/scm-by.el" | 32031 | ;;;;;; "cedet/semantic/bovine/scm-by.el" "cedet/semantic/bovine/scm.el" |
| 31854 | ;;;;;; "cedet/semantic/bovine/scm.el" "cedet/semantic/chart.el" | 32032 | ;;;;;; "cedet/semantic/chart.el" "cedet/semantic/complete.el" "cedet/semantic/ctxt.el" |
| 31855 | ;;;;;; "cedet/semantic/complete.el" "cedet/semantic/ctxt.el" "cedet/semantic/db-debug.el" | 32033 | ;;;;;; "cedet/semantic/db-debug.el" "cedet/semantic/db-ebrowse.el" |
| 31856 | ;;;;;; "cedet/semantic/db-ebrowse.el" "cedet/semantic/db-el.el" | 32034 | ;;;;;; "cedet/semantic/db-el.el" "cedet/semantic/db-file.el" "cedet/semantic/db-find.el" |
| 31857 | ;;;;;; "cedet/semantic/db-file.el" "cedet/semantic/db-find.el" "cedet/semantic/db-global.el" | 32035 | ;;;;;; "cedet/semantic/db-global.el" "cedet/semantic/db-javascript.el" |
| 31858 | ;;;;;; "cedet/semantic/db-javascript.el" "cedet/semantic/db-mode.el" | 32036 | ;;;;;; "cedet/semantic/db-mode.el" "cedet/semantic/db-ref.el" "cedet/semantic/db-typecache.el" |
| 31859 | ;;;;;; "cedet/semantic/db-ref.el" "cedet/semantic/db-typecache.el" | ||
| 31860 | ;;;;;; "cedet/semantic/db.el" "cedet/semantic/debug.el" "cedet/semantic/decorate.el" | 32037 | ;;;;;; "cedet/semantic/db.el" "cedet/semantic/debug.el" "cedet/semantic/decorate.el" |
| 31861 | ;;;;;; "cedet/semantic/decorate/include.el" "cedet/semantic/decorate/mode.el" | 32038 | ;;;;;; "cedet/semantic/decorate/include.el" "cedet/semantic/decorate/mode.el" |
| 31862 | ;;;;;; "cedet/semantic/dep.el" "cedet/semantic/doc.el" "cedet/semantic/ede-grammar.el" | 32039 | ;;;;;; "cedet/semantic/dep.el" "cedet/semantic/doc.el" "cedet/semantic/ede-grammar.el" |
| @@ -31864,13 +32041,13 @@ Zone out, completely. | |||
| 31864 | ;;;;;; "cedet/semantic/fw.el" "cedet/semantic/grammar-wy.el" "cedet/semantic/grammar.el" | 32041 | ;;;;;; "cedet/semantic/fw.el" "cedet/semantic/grammar-wy.el" "cedet/semantic/grammar.el" |
| 31865 | ;;;;;; "cedet/semantic/html.el" "cedet/semantic/ia-sb.el" "cedet/semantic/ia.el" | 32042 | ;;;;;; "cedet/semantic/html.el" "cedet/semantic/ia-sb.el" "cedet/semantic/ia.el" |
| 31866 | ;;;;;; "cedet/semantic/idle.el" "cedet/semantic/imenu.el" "cedet/semantic/java.el" | 32043 | ;;;;;; "cedet/semantic/idle.el" "cedet/semantic/imenu.el" "cedet/semantic/java.el" |
| 31867 | ;;;;;; "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/loaddefs.el" | 32044 | ;;;;;; "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/mru-bookmark.el" |
| 31868 | ;;;;;; "cedet/semantic/mru-bookmark.el" "cedet/semantic/sb.el" "cedet/semantic/scope.el" | 32045 | ;;;;;; "cedet/semantic/sb.el" "cedet/semantic/scope.el" "cedet/semantic/senator.el" |
| 31869 | ;;;;;; "cedet/semantic/senator.el" "cedet/semantic/sort.el" "cedet/semantic/symref.el" | 32046 | ;;;;;; "cedet/semantic/sort.el" "cedet/semantic/symref.el" "cedet/semantic/symref/cscope.el" |
| 31870 | ;;;;;; "cedet/semantic/symref/cscope.el" "cedet/semantic/symref/filter.el" | 32047 | ;;;;;; "cedet/semantic/symref/filter.el" "cedet/semantic/symref/global.el" |
| 31871 | ;;;;;; "cedet/semantic/symref/global.el" "cedet/semantic/symref/grep.el" | 32048 | ;;;;;; "cedet/semantic/symref/grep.el" "cedet/semantic/symref/idutils.el" |
| 31872 | ;;;;;; "cedet/semantic/symref/idutils.el" "cedet/semantic/symref/list.el" | 32049 | ;;;;;; "cedet/semantic/symref/list.el" "cedet/semantic/tag-file.el" |
| 31873 | ;;;;;; "cedet/semantic/tag-file.el" "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el" | 32050 | ;;;;;; "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el" |
| 31874 | ;;;;;; "cedet/semantic/tag.el" "cedet/semantic/texi.el" "cedet/semantic/util-modes.el" | 32051 | ;;;;;; "cedet/semantic/tag.el" "cedet/semantic/texi.el" "cedet/semantic/util-modes.el" |
| 31875 | ;;;;;; "cedet/semantic/util.el" "cedet/semantic/wisent.el" "cedet/semantic/wisent/comp.el" | 32052 | ;;;;;; "cedet/semantic/util.el" "cedet/semantic/wisent.el" "cedet/semantic/wisent/comp.el" |
| 31876 | ;;;;;; "cedet/semantic/wisent/java-tags.el" "cedet/semantic/wisent/javascript.el" | 32053 | ;;;;;; "cedet/semantic/wisent/java-tags.el" "cedet/semantic/wisent/javascript.el" |
| @@ -31882,52 +32059,51 @@ Zone out, completely. | |||
| 31882 | ;;;;;; "cedet/srecode/el.el" "cedet/srecode/expandproto.el" "cedet/srecode/extract.el" | 32059 | ;;;;;; "cedet/srecode/el.el" "cedet/srecode/expandproto.el" "cedet/srecode/extract.el" |
| 31883 | ;;;;;; "cedet/srecode/fields.el" "cedet/srecode/filters.el" "cedet/srecode/find.el" | 32060 | ;;;;;; "cedet/srecode/fields.el" "cedet/srecode/filters.el" "cedet/srecode/find.el" |
| 31884 | ;;;;;; "cedet/srecode/getset.el" "cedet/srecode/insert.el" "cedet/srecode/java.el" | 32061 | ;;;;;; "cedet/srecode/getset.el" "cedet/srecode/insert.el" "cedet/srecode/java.el" |
| 31885 | ;;;;;; "cedet/srecode/loaddefs.el" "cedet/srecode/map.el" "cedet/srecode/mode.el" | 32062 | ;;;;;; "cedet/srecode/map.el" "cedet/srecode/mode.el" "cedet/srecode/semantic.el" |
| 31886 | ;;;;;; "cedet/srecode/semantic.el" "cedet/srecode/srt-wy.el" "cedet/srecode/srt.el" | 32063 | ;;;;;; "cedet/srecode/srt-wy.el" "cedet/srecode/srt.el" "cedet/srecode/table.el" |
| 31887 | ;;;;;; "cedet/srecode/table.el" "cedet/srecode/template.el" "cedet/srecode/texi.el" | 32064 | ;;;;;; "cedet/srecode/template.el" "cedet/srecode/texi.el" "cus-dep.el" |
| 31888 | ;;;;;; "cus-dep.el" "dframe.el" "dired-aux.el" "dired-x.el" "dos-fns.el" | 32065 | ;;;;;; "dframe.el" "dired-aux.el" "dired-x.el" "dos-fns.el" "dos-vars.el" |
| 31889 | ;;;;;; "dos-vars.el" "dos-w32.el" "dynamic-setting.el" "emacs-lisp/authors.el" | 32066 | ;;;;;; "dos-w32.el" "dynamic-setting.el" "emacs-lisp/authors.el" |
| 31890 | ;;;;;; "emacs-lisp/avl-tree.el" "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el" | 32067 | ;;;;;; "emacs-lisp/avl-tree.el" "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el" |
| 31891 | ;;;;;; "emacs-lisp/cl-extra.el" "emacs-lisp/cl-loaddefs.el" "emacs-lisp/cl-macs.el" | 32068 | ;;;;;; "emacs-lisp/cl-extra.el" "emacs-lisp/cl-macs.el" "emacs-lisp/cl-seq.el" |
| 31892 | ;;;;;; "emacs-lisp/cl-seq.el" "emacs-lisp/cl.el" "emacs-lisp/eieio-base.el" | 32069 | ;;;;;; "emacs-lisp/cl.el" "emacs-lisp/eieio-base.el" "emacs-lisp/eieio-datadebug.el" |
| 31893 | ;;;;;; "emacs-lisp/eieio-datadebug.el" "emacs-lisp/eieio-speedbar.el" | 32070 | ;;;;;; "emacs-lisp/eieio-speedbar.el" "emacs-lisp/find-gc.el" "emacs-lisp/gulp.el" |
| 31894 | ;;;;;; "emacs-lisp/find-gc.el" "emacs-lisp/gulp.el" "emacs-lisp/lisp-mnt.el" | 32071 | ;;;;;; "emacs-lisp/lisp-mnt.el" "emacs-lisp/package-x.el" "emacs-lisp/smie.el" |
| 31895 | ;;;;;; "emacs-lisp/package-x.el" "emacs-lisp/smie.el" "emacs-lisp/tcover-ses.el" | 32072 | ;;;;;; "emacs-lisp/tcover-ses.el" "emacs-lisp/tcover-unsafep.el" |
| 31896 | ;;;;;; "emacs-lisp/tcover-unsafep.el" "emulation/cua-gmrk.el" "emulation/cua-rect.el" | 32073 | ;;;;;; "emulation/cua-gmrk.el" "emulation/cua-rect.el" "emulation/edt-lk201.el" |
| 31897 | ;;;;;; "emulation/edt-lk201.el" "emulation/edt-mapper.el" "emulation/edt-pc.el" | 32074 | ;;;;;; "emulation/edt-mapper.el" "emulation/edt-pc.el" "emulation/edt-vt100.el" |
| 31898 | ;;;;;; "emulation/edt-vt100.el" "emulation/tpu-extras.el" "emulation/viper-cmd.el" | 32075 | ;;;;;; "emulation/tpu-extras.el" "emulation/viper-cmd.el" "emulation/viper-ex.el" |
| 31899 | ;;;;;; "emulation/viper-ex.el" "emulation/viper-init.el" "emulation/viper-keym.el" | 32076 | ;;;;;; "emulation/viper-init.el" "emulation/viper-keym.el" "emulation/viper-macs.el" |
| 31900 | ;;;;;; "emulation/viper-macs.el" "emulation/viper-mous.el" "emulation/viper-util.el" | 32077 | ;;;;;; "emulation/viper-mous.el" "emulation/viper-util.el" "erc/erc-backend.el" |
| 31901 | ;;;;;; "erc/erc-backend.el" "erc/erc-goodies.el" "erc/erc-ibuffer.el" | 32078 | ;;;;;; "erc/erc-goodies.el" "erc/erc-ibuffer.el" "eshell/em-alias.el" |
| 31902 | ;;;;;; "eshell/em-alias.el" "eshell/em-banner.el" "eshell/em-basic.el" | 32079 | ;;;;;; "eshell/em-banner.el" "eshell/em-basic.el" "eshell/em-cmpl.el" |
| 31903 | ;;;;;; "eshell/em-cmpl.el" "eshell/em-dirs.el" "eshell/em-glob.el" | 32080 | ;;;;;; "eshell/em-dirs.el" "eshell/em-glob.el" "eshell/em-hist.el" |
| 31904 | ;;;;;; "eshell/em-hist.el" "eshell/em-ls.el" "eshell/em-pred.el" | 32081 | ;;;;;; "eshell/em-ls.el" "eshell/em-pred.el" "eshell/em-prompt.el" |
| 31905 | ;;;;;; "eshell/em-prompt.el" "eshell/em-rebind.el" "eshell/em-script.el" | 32082 | ;;;;;; "eshell/em-rebind.el" "eshell/em-script.el" "eshell/em-smart.el" |
| 31906 | ;;;;;; "eshell/em-smart.el" "eshell/em-term.el" "eshell/em-tramp.el" | 32083 | ;;;;;; "eshell/em-term.el" "eshell/em-tramp.el" "eshell/em-unix.el" |
| 31907 | ;;;;;; "eshell/em-unix.el" "eshell/em-xtra.el" "eshell/esh-arg.el" | 32084 | ;;;;;; "eshell/em-xtra.el" "eshell/esh-arg.el" "eshell/esh-cmd.el" |
| 31908 | ;;;;;; "eshell/esh-cmd.el" "eshell/esh-ext.el" "eshell/esh-groups.el" | 32085 | ;;;;;; "eshell/esh-ext.el" "eshell/esh-io.el" "eshell/esh-module.el" |
| 31909 | ;;;;;; "eshell/esh-io.el" "eshell/esh-module.el" "eshell/esh-opt.el" | 32086 | ;;;;;; "eshell/esh-opt.el" "eshell/esh-proc.el" "eshell/esh-util.el" |
| 31910 | ;;;;;; "eshell/esh-proc.el" "eshell/esh-util.el" "eshell/esh-var.el" | 32087 | ;;;;;; "eshell/esh-var.el" "ezimage.el" "format-spec.el" "fringe.el" |
| 31911 | ;;;;;; "ezimage.el" "format-spec.el" "fringe.el" "generic-x.el" | 32088 | ;;;;;; "generic-x.el" "gnus/compface.el" "gnus/gnus-async.el" "gnus/gnus-bcklg.el" |
| 31912 | ;;;;;; "gnus/compface.el" "gnus/gnus-async.el" "gnus/gnus-bcklg.el" | ||
| 31913 | ;;;;;; "gnus/gnus-cite.el" "gnus/gnus-cus.el" "gnus/gnus-demon.el" | 32089 | ;;;;;; "gnus/gnus-cite.el" "gnus/gnus-cus.el" "gnus/gnus-demon.el" |
| 31914 | ;;;;;; "gnus/gnus-dup.el" "gnus/gnus-eform.el" "gnus/gnus-ems.el" | 32090 | ;;;;;; "gnus/gnus-dup.el" "gnus/gnus-eform.el" "gnus/gnus-ems.el" |
| 31915 | ;;;;;; "gnus/gnus-int.el" "gnus/gnus-logic.el" "gnus/gnus-mh.el" | 32091 | ;;;;;; "gnus/gnus-icalendar.el" "gnus/gnus-int.el" "gnus/gnus-logic.el" |
| 31916 | ;;;;;; "gnus/gnus-salt.el" "gnus/gnus-score.el" "gnus/gnus-setup.el" | 32092 | ;;;;;; "gnus/gnus-mh.el" "gnus/gnus-salt.el" "gnus/gnus-score.el" |
| 31917 | ;;;;;; "gnus/gnus-srvr.el" "gnus/gnus-topic.el" "gnus/gnus-undo.el" | 32093 | ;;;;;; "gnus/gnus-setup.el" "gnus/gnus-srvr.el" "gnus/gnus-topic.el" |
| 31918 | ;;;;;; "gnus/gnus-util.el" "gnus/gnus-uu.el" "gnus/gnus-vm.el" "gnus/gssapi.el" | 32094 | ;;;;;; "gnus/gnus-undo.el" "gnus/gnus-util.el" "gnus/gnus-uu.el" |
| 31919 | ;;;;;; "gnus/ietf-drums.el" "gnus/legacy-gnus-agent.el" "gnus/mail-parse.el" | 32095 | ;;;;;; "gnus/gnus-vm.el" "gnus/gssapi.el" "gnus/ietf-drums.el" "gnus/legacy-gnus-agent.el" |
| 31920 | ;;;;;; "gnus/mail-prsvr.el" "gnus/mail-source.el" "gnus/mailcap.el" | 32096 | ;;;;;; "gnus/mail-parse.el" "gnus/mail-prsvr.el" "gnus/mail-source.el" |
| 31921 | ;;;;;; "gnus/messcompat.el" "gnus/mm-archive.el" "gnus/mm-bodies.el" | 32097 | ;;;;;; "gnus/mailcap.el" "gnus/messcompat.el" "gnus/mm-archive.el" |
| 31922 | ;;;;;; "gnus/mm-decode.el" "gnus/mm-util.el" "gnus/mm-view.el" "gnus/mml-sec.el" | 32098 | ;;;;;; "gnus/mm-bodies.el" "gnus/mm-decode.el" "gnus/mm-util.el" |
| 31923 | ;;;;;; "gnus/mml-smime.el" "gnus/nnagent.el" "gnus/nnbabyl.el" "gnus/nndir.el" | 32099 | ;;;;;; "gnus/mm-view.el" "gnus/mml-sec.el" "gnus/mml-smime.el" "gnus/nnagent.el" |
| 31924 | ;;;;;; "gnus/nndraft.el" "gnus/nneething.el" "gnus/nngateway.el" | 32100 | ;;;;;; "gnus/nnbabyl.el" "gnus/nndir.el" "gnus/nndraft.el" "gnus/nneething.el" |
| 31925 | ;;;;;; "gnus/nnheader.el" "gnus/nnimap.el" "gnus/nnir.el" "gnus/nnmail.el" | 32101 | ;;;;;; "gnus/nngateway.el" "gnus/nnheader.el" "gnus/nnimap.el" "gnus/nnir.el" |
| 31926 | ;;;;;; "gnus/nnmaildir.el" "gnus/nnmbox.el" "gnus/nnmh.el" "gnus/nnnil.el" | 32102 | ;;;;;; "gnus/nnmail.el" "gnus/nnmaildir.el" "gnus/nnmbox.el" "gnus/nnmh.el" |
| 31927 | ;;;;;; "gnus/nnoo.el" "gnus/nnregistry.el" "gnus/nnrss.el" "gnus/nnspool.el" | 32103 | ;;;;;; "gnus/nnnil.el" "gnus/nnoo.el" "gnus/nnregistry.el" "gnus/nnrss.el" |
| 31928 | ;;;;;; "gnus/nntp.el" "gnus/nnvirtual.el" "gnus/nnweb.el" "gnus/registry.el" | 32104 | ;;;;;; "gnus/nnspool.el" "gnus/nntp.el" "gnus/nnvirtual.el" "gnus/nnweb.el" |
| 31929 | ;;;;;; "gnus/rfc1843.el" "gnus/rfc2045.el" "gnus/rfc2047.el" "gnus/rfc2104.el" | 32105 | ;;;;;; "gnus/registry.el" "gnus/rfc1843.el" "gnus/rfc2045.el" "gnus/rfc2047.el" |
| 31930 | ;;;;;; "gnus/rfc2231.el" "gnus/rtree.el" "gnus/sieve-manage.el" | 32106 | ;;;;;; "gnus/rfc2104.el" "gnus/rfc2231.el" "gnus/rtree.el" "gnus/sieve-manage.el" |
| 31931 | ;;;;;; "gnus/smime.el" "gnus/spam-stat.el" "gnus/spam-wash.el" "hex-util.el" | 32107 | ;;;;;; "gnus/smime.el" "gnus/spam-stat.el" "gnus/spam-wash.el" "hex-util.el" |
| 31932 | ;;;;;; "hfy-cmap.el" "ibuf-ext.el" "international/cp51932.el" "international/eucjp-ms.el" | 32108 | ;;;;;; "hfy-cmap.el" "ibuf-ext.el" "international/cp51932.el" "international/eucjp-ms.el" |
| 31933 | ;;;;;; "international/fontset.el" "international/iso-ascii.el" "international/ja-dic-cnv.el" | 32109 | ;;;;;; "international/fontset.el" "international/iso-ascii.el" "international/ja-dic-cnv.el" |
| @@ -32018,7 +32194,7 @@ Zone out, completely. | |||
| 32018 | ;;;;;; "vc/ediff-vers.el" "vc/ediff-wind.el" "vc/pcvs-info.el" "vc/pcvs-parse.el" | 32194 | ;;;;;; "vc/ediff-vers.el" "vc/ediff-wind.el" "vc/pcvs-info.el" "vc/pcvs-parse.el" |
| 32019 | ;;;;;; "vc/pcvs-util.el" "vc/vc-dav.el" "vcursor.el" "vt-control.el" | 32195 | ;;;;;; "vc/pcvs-util.el" "vc/vc-dav.el" "vcursor.el" "vt-control.el" |
| 32020 | ;;;;;; "vt100-led.el" "w32-common-fns.el" "w32-fns.el" "w32-vars.el" | 32196 | ;;;;;; "vt100-led.el" "w32-common-fns.el" "w32-fns.el" "w32-vars.el" |
| 32021 | ;;;;;; "x-dnd.el") (20945 22525 596830 318000)) | 32197 | ;;;;;; "x-dnd.el") (21027 5557 48411 587000)) |
| 32022 | 32198 | ||
| 32023 | ;;;*** | 32199 | ;;;*** |
| 32024 | 32200 | ||
diff --git a/lisp/loadup.el b/lisp/loadup.el index 7fb9526b360..c32bd00463e 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el | |||
| @@ -139,6 +139,7 @@ | |||
| 139 | ;; In case loaddefs hasn't been generated yet. | 139 | ;; In case loaddefs hasn't been generated yet. |
| 140 | (file-error (load "ldefs-boot.el"))) | 140 | (file-error (load "ldefs-boot.el"))) |
| 141 | 141 | ||
| 142 | (load "emacs-lisp/nadvice") | ||
| 142 | (load "minibuffer") | 143 | (load "minibuffer") |
| 143 | (load "abbrev") ;lisp-mode.el and simple.el use define-abbrev-table. | 144 | (load "abbrev") ;lisp-mode.el and simple.el use define-abbrev-table. |
| 144 | (load "simple") | 145 | (load "simple") |
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index 091b1a03025..7f27599edf2 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el | |||
| @@ -407,8 +407,10 @@ sending immediately. For any other non-nil value, prompt in both | |||
| 407 | cases. You can give a timeout for the prompt; see variable | 407 | cases. You can give a timeout for the prompt; see variable |
| 408 | `feedmail-confirm-outgoing-timeout'." | 408 | `feedmail-confirm-outgoing-timeout'." |
| 409 | :group 'feedmail-misc | 409 | :group 'feedmail-misc |
| 410 | :type 'boolean | 410 | :type '(choice (const nil) |
| 411 | ) | 411 | (const queued) |
| 412 | (const immediate) | ||
| 413 | (other t))) | ||
| 412 | 414 | ||
| 413 | 415 | ||
| 414 | (defcustom feedmail-display-full-frame 'queued | 416 | (defcustom feedmail-display-full-frame 'queued |
| @@ -425,8 +427,10 @@ it can still be interesting to see a lot about them as they are | |||
| 425 | shuttled robotically onward." | 427 | shuttled robotically onward." |
| 426 | :version "24.1" | 428 | :version "24.1" |
| 427 | :group 'feedmail-misc | 429 | :group 'feedmail-misc |
| 428 | :type 'boolean | 430 | :type '(choice (const nil) |
| 429 | ) | 431 | (const queued) |
| 432 | (const immediate) | ||
| 433 | (other t))) | ||
| 430 | 434 | ||
| 431 | 435 | ||
| 432 | (defcustom feedmail-confirm-outgoing-timeout nil | 436 | (defcustom feedmail-confirm-outgoing-timeout nil |
| @@ -483,8 +487,9 @@ and serially, so slow SMTP conversations can add up to a delay. There | |||
| 483 | is an option for either 'first or 'last because you might have a | 487 | is an option for either 'first or 'last because you might have a |
| 484 | delivery agent that processes the addresses backwards." | 488 | delivery agent that processes the addresses backwards." |
| 485 | :group 'feedmail-headers | 489 | :group 'feedmail-headers |
| 486 | :type 'boolean | 490 | :type '(choice (const nil) |
| 487 | ) | 491 | (const first) |
| 492 | (const last))) | ||
| 488 | 493 | ||
| 489 | 494 | ||
| 490 | (defcustom feedmail-fill-to-cc t | 495 | (defcustom feedmail-fill-to-cc t |
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index e29becedb6e..aa244ddae81 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -3725,7 +3725,7 @@ to switch to." | |||
| 3725 | ;; If the frame was probably made for this buffer, the user | 3725 | ;; If the frame was probably made for this buffer, the user |
| 3726 | ;; probably wants to delete it now. | 3726 | ;; probably wants to delete it now. |
| 3727 | ((display-multi-frame-p) | 3727 | ((display-multi-frame-p) |
| 3728 | (delete-frame (selected-frame))) | 3728 | (delete-frame)) |
| 3729 | ;; The previous frame is where normally they have the Rmail buffer | 3729 | ;; The previous frame is where normally they have the Rmail buffer |
| 3730 | ;; displayed. | 3730 | ;; displayed. |
| 3731 | (t (other-frame -1)))) | 3731 | (t (other-frame -1)))) |
| @@ -4768,9 +4768,7 @@ If prefix argument REVERSE is non-nil, sorts in reverse order. | |||
| 4768 | 4768 | ||
| 4769 | ;;;*** | 4769 | ;;;*** |
| 4770 | 4770 | ||
| 4771 | ;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic | 4771 | ;;;### (autoloads nil "rmailsum" "rmailsum.el" "a9b3bbd9b82dd566524a1209b5cdb7dd") |
| 4772 | ;;;;;; rmail-summary-by-regexp rmail-summary-by-recipients rmail-summary-by-labels | ||
| 4773 | ;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "61e7ad0931be1e07034dd57825ff326a") | ||
| 4774 | ;;; Generated autoloads from rmailsum.el | 4772 | ;;; Generated autoloads from rmailsum.el |
| 4775 | 4773 | ||
| 4776 | (autoload 'rmail-summary "rmailsum" "\ | 4774 | (autoload 'rmail-summary "rmailsum" "\ |
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 8dd4120d179..3a0a7824ad8 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el | |||
| @@ -1288,7 +1288,7 @@ advance to the next message." | |||
| 1288 | (prog1 | 1288 | (prog1 |
| 1289 | ;; Is EOB visible in the buffer? | 1289 | ;; Is EOB visible in the buffer? |
| 1290 | (save-excursion | 1290 | (save-excursion |
| 1291 | (let ((ht (window-height (selected-window)))) | 1291 | (let ((ht (window-height))) |
| 1292 | (move-to-window-line (- ht 2)) | 1292 | (move-to-window-line (- ht 2)) |
| 1293 | (end-of-line) | 1293 | (end-of-line) |
| 1294 | (eobp))) | 1294 | (eobp))) |
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index e1dee3295f2..4fdd75c68a6 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -1114,6 +1114,7 @@ external program defined by `sendmail-program'." | |||
| 1114 | (let ((errbuf (if mail-interactive | 1114 | (let ((errbuf (if mail-interactive |
| 1115 | (generate-new-buffer " sendmail errors") | 1115 | (generate-new-buffer " sendmail errors") |
| 1116 | 0)) | 1116 | 0)) |
| 1117 | (error nil) | ||
| 1117 | (tembuf (generate-new-buffer " sendmail temp")) | 1118 | (tembuf (generate-new-buffer " sendmail temp")) |
| 1118 | (multibyte enable-multibyte-characters) | 1119 | (multibyte enable-multibyte-characters) |
| 1119 | (case-fold-search nil) | 1120 | (case-fold-search nil) |
| @@ -1278,10 +1279,13 @@ external program defined by `sendmail-program'." | |||
| 1278 | (exit-value (apply 'call-process-region args))) | 1279 | (exit-value (apply 'call-process-region args))) |
| 1279 | (cond ((or (null exit-value) (eq 0 exit-value))) | 1280 | (cond ((or (null exit-value) (eq 0 exit-value))) |
| 1280 | ((numberp exit-value) | 1281 | ((numberp exit-value) |
| 1282 | (setq error t) | ||
| 1281 | (error "Sending...failed with exit value %d" exit-value)) | 1283 | (error "Sending...failed with exit value %d" exit-value)) |
| 1282 | ((stringp exit-value) | 1284 | ((stringp exit-value) |
| 1285 | (setq error t) | ||
| 1283 | (error "Sending...terminated by signal: %s" exit-value)) | 1286 | (error "Sending...terminated by signal: %s" exit-value)) |
| 1284 | (t | 1287 | (t |
| 1288 | (setq error t) | ||
| 1285 | (error "SENDMAIL-SEND-IT -- fall through: %S" exit-value)))) | 1289 | (error "SENDMAIL-SEND-IT -- fall through: %S" exit-value)))) |
| 1286 | (or fcc-was-found | 1290 | (or fcc-was-found |
| 1287 | (error "No recipients"))) | 1291 | (error "No recipients"))) |
| @@ -1290,12 +1294,15 @@ external program defined by `sendmail-program'." | |||
| 1290 | (goto-char (point-min)) | 1294 | (goto-char (point-min)) |
| 1291 | (while (re-search-forward "\n\n* *" nil t) | 1295 | (while (re-search-forward "\n\n* *" nil t) |
| 1292 | (replace-match "; ")) | 1296 | (replace-match "; ")) |
| 1293 | (if (not (zerop (buffer-size))) | 1297 | (unless (zerop (buffer-size)) |
| 1294 | (error "Sending...failed to %s" | 1298 | (setq error t) |
| 1295 | (buffer-substring (point-min) (point-max))))))) | 1299 | (error "Sending...failed to %s" |
| 1300 | (buffer-substring (point-min) (point-max))))))) | ||
| 1296 | (kill-buffer tembuf) | 1301 | (kill-buffer tembuf) |
| 1297 | (if (bufferp errbuf) | 1302 | (if (and (bufferp errbuf) |
| 1298 | (kill-buffer errbuf))))) | 1303 | (not error)) |
| 1304 | (kill-buffer errbuf) | ||
| 1305 | (switch-to-buffer-other-window errbuf))))) | ||
| 1299 | 1306 | ||
| 1300 | (autoload 'rmail-output-to-rmail-buffer "rmailout") | 1307 | (autoload 'rmail-output-to-rmail-buffer "rmailout") |
| 1301 | 1308 | ||
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index be459fe38d5..34cfc68295e 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -1307,26 +1307,6 @@ mail status in mode line")) | |||
| 1307 | 1307 | ||
| 1308 | ;; The "Tools" menu items | 1308 | ;; The "Tools" menu items |
| 1309 | 1309 | ||
| 1310 | (defun send-mail-item-name () | ||
| 1311 | (let* ((known-send-mail-commands '((sendmail-user-agent . "sendmail") | ||
| 1312 | (mh-e-user-agent . "MH") | ||
| 1313 | (message-user-agent . "Gnus Message") | ||
| 1314 | (gnus-user-agent . "Gnus"))) | ||
| 1315 | (name (assq mail-user-agent known-send-mail-commands))) | ||
| 1316 | (if name | ||
| 1317 | (setq name (cdr name)) | ||
| 1318 | (setq name (symbol-name mail-user-agent)) | ||
| 1319 | (if (string-match "\\(.+\\)-user-agent" name) | ||
| 1320 | (setq name (match-string 1 name)))) | ||
| 1321 | name)) | ||
| 1322 | |||
| 1323 | (defun read-mail-item-name () | ||
| 1324 | (let* ((known-rmail-commands '((rmail . "RMAIL") | ||
| 1325 | (mh-rmail . "MH") | ||
| 1326 | (gnus . "Gnus"))) | ||
| 1327 | (known (assq read-mail-command known-rmail-commands))) | ||
| 1328 | (if known (cdr known) (symbol-name read-mail-command)))) | ||
| 1329 | |||
| 1330 | (defvar menu-bar-games-menu | 1310 | (defvar menu-bar-games-menu |
| 1331 | (let ((menu (make-sparse-keymap "Games"))) | 1311 | (let ((menu (make-sparse-keymap "Games"))) |
| 1332 | 1312 | ||
| @@ -1473,18 +1453,17 @@ mail status in mode line")) | |||
| 1473 | (bindings--define-key menu [directory-search] | 1453 | (bindings--define-key menu [directory-search] |
| 1474 | '(menu-item "Directory Search" eudc-tools-menu)) | 1454 | '(menu-item "Directory Search" eudc-tools-menu)) |
| 1475 | (bindings--define-key menu [compose-mail] | 1455 | (bindings--define-key menu [compose-mail] |
| 1476 | '(menu-item (format "Send Mail (with %s)" (send-mail-item-name)) compose-mail | 1456 | '(menu-item "Compose New Mail" compose-mail |
| 1477 | :visible (and mail-user-agent (not (eq mail-user-agent 'ignore))) | 1457 | :visible (and mail-user-agent (not (eq mail-user-agent 'ignore))) |
| 1478 | :help "Send a mail message")) | 1458 | :help "Start writing a new mail message")) |
| 1479 | (bindings--define-key menu [rmail] | 1459 | (bindings--define-key menu [rmail] |
| 1480 | '(menu-item (format "Read Mail (with %s)" (read-mail-item-name)) | 1460 | '(menu-item "Read Mail" menu-bar-read-mail |
| 1481 | menu-bar-read-mail | ||
| 1482 | :visible (and read-mail-command | 1461 | :visible (and read-mail-command |
| 1483 | (not (eq read-mail-command 'ignore))) | 1462 | (not (eq read-mail-command 'ignore))) |
| 1484 | :help "Read your mail and reply to it")) | 1463 | :help "Read your mail")) |
| 1485 | 1464 | ||
| 1486 | (bindings--define-key menu [gnus] | 1465 | (bindings--define-key menu [gnus] |
| 1487 | '(menu-item "Read Net News (Gnus)" gnus | 1466 | '(menu-item "Read Net News" gnus |
| 1488 | :help "Read network news groups")) | 1467 | :help "Read network news groups")) |
| 1489 | 1468 | ||
| 1490 | (bindings--define-key menu [separator-vc] | 1469 | (bindings--define-key menu [separator-vc] |
diff --git a/lisp/mouse-drag.el b/lisp/mouse-drag.el index 3a29e05c8b1..009cc2efe1a 100644 --- a/lisp/mouse-drag.el +++ b/lisp/mouse-drag.el | |||
| @@ -156,7 +156,7 @@ Keep the cursor on the screen as needed." | |||
| 156 | "Determine if it's wise to enable col-scrolling for the current window. | 156 | "Determine if it's wise to enable col-scrolling for the current window. |
| 157 | Basically, we check for existing horizontal scrolling." | 157 | Basically, we check for existing horizontal scrolling." |
| 158 | (or truncate-lines | 158 | (or truncate-lines |
| 159 | (> (window-hscroll (selected-window)) 0) | 159 | (> (window-hscroll) 0) |
| 160 | (not (window-full-width-p)) | 160 | (not (window-full-width-p)) |
| 161 | (and | 161 | (and |
| 162 | mouse-drag-electric-col-scrolling | 162 | mouse-drag-electric-col-scrolling |
diff --git a/lisp/mpc.el b/lisp/mpc.el index ad7381bb4b7..825eb3c05d4 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el | |||
| @@ -209,8 +209,7 @@ defaults to 6600 and HOST defaults to localhost." | |||
| 209 | 209 | ||
| 210 | (defconst mpc--proc-end-re "^\\(?:OK\\(?: MPD .*\\)?\\|ACK \\(.*\\)\\)\n") | 210 | (defconst mpc--proc-end-re "^\\(?:OK\\(?: MPD .*\\)?\\|ACK \\(.*\\)\\)\n") |
| 211 | 211 | ||
| 212 | (put 'mpc-proc-error 'error-conditions '(mpc-proc-error error)) | 212 | (define-error 'mpc-proc-error "MPD error") |
| 213 | (put 'mpc-proc-error 'error-message "MPD error") | ||
| 214 | 213 | ||
| 215 | (defun mpc--debug (format &rest args) | 214 | (defun mpc--debug (format &rest args) |
| 216 | (if (get-buffer "*MPC-debug*") | 215 | (if (get-buffer "*MPC-debug*") |
| @@ -1513,7 +1512,7 @@ when constructing the set of constraints." | |||
| 1513 | (let* ((newbuf (mpc-tagbrowser-buf tag)) | 1512 | (let* ((newbuf (mpc-tagbrowser-buf tag)) |
| 1514 | (win (get-buffer-window newbuf 0))) | 1513 | (win (get-buffer-window newbuf 0))) |
| 1515 | (if win (select-window win) | 1514 | (if win (select-window win) |
| 1516 | (if (with-current-buffer (window-buffer (selected-window)) | 1515 | (if (with-current-buffer (window-buffer) |
| 1517 | (derived-mode-p 'mpc-tagbrowser-mode)) | 1516 | (derived-mode-p 'mpc-tagbrowser-mode)) |
| 1518 | (setq win (selected-window)) | 1517 | (setq win (selected-window)) |
| 1519 | ;; Find a tagbrowser-mode buffer. | 1518 | ;; Find a tagbrowser-mode buffer. |
| @@ -2618,8 +2617,7 @@ This is used so that they can be compared with `eq', which is needed for | |||
| 2618 | (song-win (get-buffer-window song-buf 0))) | 2617 | (song-win (get-buffer-window song-buf 0))) |
| 2619 | (if song-win | 2618 | (if song-win |
| 2620 | (select-window song-win) | 2619 | (select-window song-win) |
| 2621 | (if (or (window-dedicated-p (selected-window)) | 2620 | (if (or (window-dedicated-p) (window-minibuffer-p)) |
| 2622 | (window-minibuffer-p)) | ||
| 2623 | (ignore-errors (select-frame (make-frame mpc-frame-alist))) | 2621 | (ignore-errors (select-frame (make-frame mpc-frame-alist))) |
| 2624 | (with-current-buffer song-buf | 2622 | (with-current-buffer song-buf |
| 2625 | (setq-local mpc-previous-window-config | 2623 | (setq-local mpc-previous-window-config |
diff --git a/lisp/msb.el b/lisp/msb.el index 4bde993ff84..110a4277376 100644 --- a/lisp/msb.el +++ b/lisp/msb.el | |||
| @@ -386,7 +386,7 @@ This is instead of the groups in `msb-menu-cond'." | |||
| 386 | ;;; | 386 | ;;; |
| 387 | ;;; Some example function to be used for `msb-item-handling-function'. | 387 | ;;; Some example function to be used for `msb-item-handling-function'. |
| 388 | ;;; | 388 | ;;; |
| 389 | (defun msb-item-handler (buffer &optional maxbuf) | 389 | (defun msb-item-handler (_buffer &optional _maxbuf) |
| 390 | "Create one string item, concerning BUFFER, for the buffer menu. | 390 | "Create one string item, concerning BUFFER, for the buffer menu. |
| 391 | The item looks like: | 391 | The item looks like: |
| 392 | *% <buffer-name> | 392 | *% <buffer-name> |
| @@ -410,7 +410,7 @@ Optional second argument MAXBUF is completely ignored." | |||
| 410 | (error "Unknown type of `dired-directory' in buffer %s" | 410 | (error "Unknown type of `dired-directory' in buffer %s" |
| 411 | (buffer-name))))) | 411 | (buffer-name))))) |
| 412 | 412 | ||
| 413 | (defun msb-dired-item-handler (buffer &optional maxbuf) | 413 | (defun msb-dired-item-handler (_buffer &optional _maxbuf) |
| 414 | "Create one string item, concerning a dired BUFFER, for the buffer menu. | 414 | "Create one string item, concerning a dired BUFFER, for the buffer menu. |
| 415 | The item looks like: | 415 | The item looks like: |
| 416 | *% <buffer-name> | 416 | *% <buffer-name> |
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index f6efc56023a..177fdaca150 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; ange-ftp.el --- transparent FTP support for GNU Emacs | 1 | ;;; ange-ftp.el --- transparent FTP support for GNU Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1989-1996, 1998, 2000-2013 Free Software Foundation, | 3 | ;; Copyright (C) 1989-1996, 1998, 2000-2013 Free Software Foundation, Inc. |
| 4 | ;; Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: Andy Norman (ange@hplb.hpl.hp.com) | 5 | ;; Author: Andy Norman (ange@hplb.hpl.hp.com) |
| 7 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| @@ -700,7 +699,7 @@ parenthesized expressions in REGEXP for the components (in that order)." | |||
| 700 | "Regular expression matching the start of a multiline FTP reply.") | 699 | "Regular expression matching the start of a multiline FTP reply.") |
| 701 | 700 | ||
| 702 | (defvar ange-ftp-good-msgs | 701 | (defvar ange-ftp-good-msgs |
| 703 | "^220 \\|^230 \\|^226 \\|^25. \\|^221 \\|^200 \\|^[Hh]ash mark" | 702 | "^220 \\|^230 \\|^226 \\|^25. \\|^221 \\|^200 \\|^[Hh]ash mark\\|^Remote directory:" |
| 704 | "Regular expression matching FTP \"success\" messages.") | 703 | "Regular expression matching FTP \"success\" messages.") |
| 705 | 704 | ||
| 706 | ;; CMS and the odd VMS machine say 200 Port rather than 200 PORT. | 705 | ;; CMS and the odd VMS machine say 200 Port rather than 200 PORT. |
| @@ -724,9 +723,10 @@ parenthesized expressions in REGEXP for the components (in that order)." | |||
| 724 | "^504 Unknown security mechanism\\|" | 723 | "^504 Unknown security mechanism\\|" |
| 725 | "^530 Please login with USER and PASS\\|" ; non kerberized vsFTPd | 724 | "^530 Please login with USER and PASS\\|" ; non kerberized vsFTPd |
| 726 | "^534 Kerberos Authentication not enabled\\|" | 725 | "^534 Kerberos Authentication not enabled\\|" |
| 727 | "^22[789] .*[Pp]assive\\|^200 EPRT\\|^500 .*EPRT") | 726 | "^22[789] .*[Pp]assive\\|^200 EPRT\\|^500 .*EPRT\\|^500 .*EPSV") |
| 728 | "Regular expression matching FTP messages that can be ignored." | 727 | "Regular expression matching FTP messages that can be ignored." |
| 729 | :group 'ange-ftp | 728 | :group 'ange-ftp |
| 729 | :version "24.4" ; add EPSV | ||
| 730 | :type 'regexp) | 730 | :type 'regexp) |
| 731 | 731 | ||
| 732 | (defcustom ange-ftp-fatal-msgs | 732 | (defcustom ange-ftp-fatal-msgs |
| @@ -1097,8 +1097,7 @@ All HOST values should be in lower case.") | |||
| 1097 | (defvar ange-ftp-trample-marker) | 1097 | (defvar ange-ftp-trample-marker) |
| 1098 | 1098 | ||
| 1099 | ;; New error symbols. | 1099 | ;; New error symbols. |
| 1100 | (put 'ftp-error 'error-conditions '(ftp-error file-error error)) | 1100 | (define-error 'ftp-error nil 'file-error) ;"FTP error" |
| 1101 | ;; (put 'ftp-error 'error-message "FTP error") | ||
| 1102 | 1101 | ||
| 1103 | ;;; ------------------------------------------------------------ | 1102 | ;;; ------------------------------------------------------------ |
| 1104 | ;;; Enhanced message support. | 1103 | ;;; Enhanced message support. |
| @@ -3022,6 +3021,9 @@ and LINE is the relevant success or fail line from the FTP-client." | |||
| 3022 | (if (car result) | 3021 | (if (car result) |
| 3023 | (save-match-data | 3022 | (save-match-data |
| 3024 | (and (or (string-match "\"\\([^\"]*\\)\"" line) | 3023 | (and (or (string-match "\"\\([^\"]*\\)\"" line) |
| 3024 | ;; Some clients cache the value and return it in | ||
| 3025 | ;; this way without asking the server. (Bug#15058) | ||
| 3026 | (string-match "^Remote directory: \\(.*\\)" line) | ||
| 3025 | (string-match " \\([^ ]+\\) " line)) ; stone-age VMS servers! | 3027 | (string-match " \\([^ ]+\\) " line)) ; stone-age VMS servers! |
| 3026 | (setq dir (match-string 1 line))))) | 3028 | (setq dir (match-string 1 line))))) |
| 3027 | (cons dir line))) | 3029 | (cons dir line))) |
diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 70c11c3201f..8b4dd2eed5f 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el | |||
| @@ -159,7 +159,7 @@ word(s) will be searched for via `eww-search-prefix'." | |||
| 159 | ((string-match "^image/" (car content-type)) | 159 | ((string-match "^image/" (car content-type)) |
| 160 | (eww-display-image)) | 160 | (eww-display-image)) |
| 161 | (t | 161 | (t |
| 162 | (eww-display-raw charset))) | 162 | (eww-display-raw))) |
| 163 | (setq eww-history-position 0) | 163 | (setq eww-history-position 0) |
| 164 | (cond | 164 | (cond |
| 165 | (point | 165 | (point |
| @@ -199,7 +199,9 @@ word(s) will be searched for via `eww-search-prefix'." | |||
| 199 | 199 | ||
| 200 | (defun eww-display-html (charset url) | 200 | (defun eww-display-html (charset url) |
| 201 | (unless (eq charset 'utf8) | 201 | (unless (eq charset 'utf8) |
| 202 | (decode-coding-region (point) (point-max) charset)) | 202 | (condition-case nil |
| 203 | (decode-coding-region (point) (point-max) charset) | ||
| 204 | (coding-system-error nil))) | ||
| 203 | (let ((document | 205 | (let ((document |
| 204 | (list | 206 | (list |
| 205 | 'base (list (cons 'href url)) | 207 | 'base (list (cons 'href url)) |
| @@ -294,7 +296,7 @@ word(s) will be searched for via `eww-search-prefix'." | |||
| 294 | (list :background (car new-colors)) | 296 | (list :background (car new-colors)) |
| 295 | t)))))) | 297 | t)))))) |
| 296 | 298 | ||
| 297 | (defun eww-display-raw (charset) | 299 | (defun eww-display-raw () |
| 298 | (let ((data (buffer-substring (point) (point-max)))) | 300 | (let ((data (buffer-substring (point) (point-max)))) |
| 299 | (eww-setup-buffer) | 301 | (eww-setup-buffer) |
| 300 | (let ((inhibit-read-only t)) | 302 | (let ((inhibit-read-only t)) |
| @@ -302,7 +304,7 @@ word(s) will be searched for via `eww-search-prefix'." | |||
| 302 | (goto-char (point-min)))) | 304 | (goto-char (point-min)))) |
| 303 | 305 | ||
| 304 | (defun eww-display-image () | 306 | (defun eww-display-image () |
| 305 | (let ((data (buffer-substring (point) (point-max)))) | 307 | (let ((data (shr-parse-image-data))) |
| 306 | (eww-setup-buffer) | 308 | (eww-setup-buffer) |
| 307 | (let ((inhibit-read-only t)) | 309 | (let ((inhibit-read-only t)) |
| 308 | (shr-put-image data nil)) | 310 | (shr-put-image data nil)) |
| @@ -343,7 +345,7 @@ word(s) will be searched for via `eww-search-prefix'." | |||
| 343 | (define-key map [(meta p)] 'eww-previous-bookmark) | 345 | (define-key map [(meta p)] 'eww-previous-bookmark) |
| 344 | 346 | ||
| 345 | (easy-menu-define nil map "" | 347 | (easy-menu-define nil map "" |
| 346 | '("eww" | 348 | '("Eww" |
| 347 | ["Quit" eww-quit t] | 349 | ["Quit" eww-quit t] |
| 348 | ["Reload" eww-reload t] | 350 | ["Reload" eww-reload t] |
| 349 | ["Back to previous page" eww-back-url | 351 | ["Back to previous page" eww-back-url |
| @@ -754,7 +756,6 @@ appears in a <link> or <a> tag." | |||
| 754 | "Change the value of the select drop-down menu under point." | 756 | "Change the value of the select drop-down menu under point." |
| 755 | (interactive) | 757 | (interactive) |
| 756 | (let* ((input (get-text-property (point) 'eww-form)) | 758 | (let* ((input (get-text-property (point) 'eww-form)) |
| 757 | (properties (text-properties-at (point))) | ||
| 758 | (completion-ignore-case t) | 759 | (completion-ignore-case t) |
| 759 | (options | 760 | (options |
| 760 | (delq nil | 761 | (delq nil |
| @@ -928,8 +929,7 @@ The browser to used is specified by the `shr-external-browser' variable." | |||
| 928 | (setq file "!")) | 929 | (setq file "!")) |
| 929 | ((string-match "\\`[.]" file) | 930 | ((string-match "\\`[.]" file) |
| 930 | (setq file (concat "!" file)))) | 931 | (setq file (concat "!" file)))) |
| 931 | (let ((base file) | 932 | (let ((count 1)) |
| 932 | (count 1)) | ||
| 933 | (while (file-exists-p (expand-file-name file directory)) | 933 | (while (file-exists-p (expand-file-name file directory)) |
| 934 | (setq file | 934 | (setq file |
| 935 | (if (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file) | 935 | (if (string-match "\\`\\(.*\\)\\([.][^.]+\\)" file) |
diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el index 243c64ec459..37755806616 100644 --- a/lisp/net/gnutls.el +++ b/lisp/net/gnutls.el | |||
| @@ -111,11 +111,7 @@ trust and key files, and priority string." | |||
| 111 | :type 'gnutls-x509pki | 111 | :type 'gnutls-x509pki |
| 112 | :hostname host)) | 112 | :hostname host)) |
| 113 | 113 | ||
| 114 | (put 'gnutls-error | 114 | (define-error 'gnutls-error "GnuTLS error") |
| 115 | 'error-conditions | ||
| 116 | '(error gnutls-error)) | ||
| 117 | (put 'gnutls-error | ||
| 118 | 'error-message "GnuTLS error") | ||
| 119 | 115 | ||
| 120 | (declare-function gnutls-boot "gnutls.c" (proc type proplist)) | 116 | (declare-function gnutls-boot "gnutls.c" (proc type proplist)) |
| 121 | (declare-function gnutls-errorp "gnutls.c" (error)) | 117 | (declare-function gnutls-errorp "gnutls.c" (error)) |
diff --git a/lisp/net/newst-plainview.el b/lisp/net/newst-plainview.el index c7a3a107078..2ba4e5c2716 100644 --- a/lisp/net/newst-plainview.el +++ b/lisp/net/newst-plainview.el | |||
| @@ -1188,7 +1188,7 @@ The mode-line is changed accordingly." | |||
| 1188 | "Redraw the newsticker window." | 1188 | "Redraw the newsticker window." |
| 1189 | (if (fboundp 'force-window-update) | 1189 | (if (fboundp 'force-window-update) |
| 1190 | (force-window-update (current-buffer)) | 1190 | (force-window-update (current-buffer)) |
| 1191 | (redraw-frame (selected-frame))) | 1191 | (redraw-frame)) |
| 1192 | (run-hooks 'newsticker-buffer-change-hook) | 1192 | (run-hooks 'newsticker-buffer-change-hook) |
| 1193 | (sit-for 0)) | 1193 | (sit-for 0)) |
| 1194 | 1194 | ||
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 7c70ded3eaa..2d8da415295 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -1331,7 +1331,7 @@ if ARG is omitted or nil." | |||
| 1331 | "Return a buffer for PROCESS, either the one selected or the process buffer." | 1331 | "Return a buffer for PROCESS, either the one selected or the process buffer." |
| 1332 | (if rcirc-always-use-server-buffer-flag | 1332 | (if rcirc-always-use-server-buffer-flag |
| 1333 | (process-buffer process) | 1333 | (process-buffer process) |
| 1334 | (let ((buffer (window-buffer (selected-window)))) | 1334 | (let ((buffer (window-buffer))) |
| 1335 | (if (and buffer | 1335 | (if (and buffer |
| 1336 | (with-current-buffer buffer | 1336 | (with-current-buffer buffer |
| 1337 | (and (eq major-mode 'rcirc-mode) | 1337 | (and (eq major-mode 'rcirc-mode) |
diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 89791511e09..9cac618b159 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el | |||
| @@ -59,7 +59,7 @@ fit these criteria." | |||
| 59 | "Character used to draw horizontal table lines. | 59 | "Character used to draw horizontal table lines. |
| 60 | If nil, don't draw horizontal table lines." | 60 | If nil, don't draw horizontal table lines." |
| 61 | :group 'shr | 61 | :group 'shr |
| 62 | :type 'character) | 62 | :type '(choice (const nil) character)) |
| 63 | 63 | ||
| 64 | (defcustom shr-table-vertical-line ?\s | 64 | (defcustom shr-table-vertical-line ?\s |
| 65 | "Character used to draw vertical table lines." | 65 | "Character used to draw vertical table lines." |
| @@ -705,7 +705,7 @@ If EXTERNAL, browse the URL using `shr-external-browser'." | |||
| 705 | (url-store-in-cache image-buffer) | 705 | (url-store-in-cache image-buffer) |
| 706 | (when (or (search-forward "\n\n" nil t) | 706 | (when (or (search-forward "\n\n" nil t) |
| 707 | (search-forward "\r\n\r\n" nil t)) | 707 | (search-forward "\r\n\r\n" nil t)) |
| 708 | (let ((data (buffer-substring (point) (point-max)))) | 708 | (let ((data (shr-parse-image-data))) |
| 709 | (with-current-buffer buffer | 709 | (with-current-buffer buffer |
| 710 | (save-excursion | 710 | (save-excursion |
| 711 | (let ((alt (buffer-substring start end)) | 711 | (let ((alt (buffer-substring start end)) |
| @@ -732,20 +732,28 @@ If EXTERNAL, browse the URL using `shr-external-browser'." | |||
| 732 | (setq payload (base64-decode-string payload))) | 732 | (setq payload (base64-decode-string payload))) |
| 733 | payload))) | 733 | payload))) |
| 734 | 734 | ||
| 735 | (defun shr-put-image (data alt &optional flags) | 735 | (defun shr-put-image (spec alt &optional flags) |
| 736 | "Put image DATA with a string ALT. Return image." | 736 | "Insert image SPEC with a string ALT. Return image. |
| 737 | SPEC is either an image data blob, or a list where the first | ||
| 738 | element is the data blob and the second element is the content-type." | ||
| 737 | (if (display-graphic-p) | 739 | (if (display-graphic-p) |
| 738 | (let* ((size (cdr (assq 'size flags))) | 740 | (let* ((size (cdr (assq 'size flags))) |
| 741 | (data (if (consp spec) | ||
| 742 | (car spec) | ||
| 743 | spec)) | ||
| 744 | (content-type (and (consp spec) | ||
| 745 | (cadr spec))) | ||
| 739 | (start (point)) | 746 | (start (point)) |
| 740 | (image (cond | 747 | (image (cond |
| 741 | ((eq size 'original) | 748 | ((eq size 'original) |
| 742 | (create-image data nil t :ascent 100)) | 749 | (create-image data nil t :ascent 100 |
| 750 | :format content-type)) | ||
| 743 | ((eq size 'full) | 751 | ((eq size 'full) |
| 744 | (ignore-errors | 752 | (ignore-errors |
| 745 | (shr-rescale-image data t))) | 753 | (shr-rescale-image data t content-type))) |
| 746 | (t | 754 | (t |
| 747 | (ignore-errors | 755 | (ignore-errors |
| 748 | (shr-rescale-image data)))))) | 756 | (shr-rescale-image data nil content-type)))))) |
| 749 | (when image | 757 | (when image |
| 750 | ;; When inserting big-ish pictures, put them at the | 758 | ;; When inserting big-ish pictures, put them at the |
| 751 | ;; beginning of the line. | 759 | ;; beginning of the line. |
| @@ -767,11 +775,10 @@ If EXTERNAL, browse the URL using `shr-external-browser'." | |||
| 767 | image) | 775 | image) |
| 768 | (insert alt))) | 776 | (insert alt))) |
| 769 | 777 | ||
| 770 | (defun shr-rescale-image (data &optional force) | 778 | (defun shr-rescale-image (data &optional force content-type) |
| 771 | "Rescale DATA, if too big, to fit the current buffer. | 779 | "Rescale DATA, if too big, to fit the current buffer. |
| 772 | If FORCE, rescale the image anyway." | 780 | If FORCE, rescale the image anyway." |
| 773 | (if (or (not (fboundp 'imagemagick-types)) | 781 | (if (or (not (fboundp 'imagemagick-types)) |
| 774 | (eq (image-type-from-data data) 'gif) | ||
| 775 | (not (get-buffer-window (current-buffer)))) | 782 | (not (get-buffer-window (current-buffer)))) |
| 776 | (create-image data nil t :ascent 100) | 783 | (create-image data nil t :ascent 100) |
| 777 | (let ((edges (window-inside-pixel-edges | 784 | (let ((edges (window-inside-pixel-edges |
| @@ -782,7 +789,8 @@ If FORCE, rescale the image anyway." | |||
| 782 | :max-width (truncate (* shr-max-image-proportion | 789 | :max-width (truncate (* shr-max-image-proportion |
| 783 | (- (nth 2 edges) (nth 0 edges)))) | 790 | (- (nth 2 edges) (nth 0 edges)))) |
| 784 | :max-height (truncate (* shr-max-image-proportion | 791 | :max-height (truncate (* shr-max-image-proportion |
| 785 | (- (nth 3 edges) (nth 1 edges)))))))) | 792 | (- (nth 3 edges) (nth 1 edges)))) |
| 793 | :format content-type)))) | ||
| 786 | 794 | ||
| 787 | ;; url-cache-extract autoloads url-cache. | 795 | ;; url-cache-extract autoloads url-cache. |
| 788 | (declare-function url-cache-create-filename "url-cache" (url)) | 796 | (declare-function url-cache-create-filename "url-cache" (url)) |
| @@ -799,7 +807,17 @@ Return a string with image data." | |||
| 799 | t) | 807 | t) |
| 800 | (when (or (search-forward "\n\n" nil t) | 808 | (when (or (search-forward "\n\n" nil t) |
| 801 | (search-forward "\r\n\r\n" nil t)) | 809 | (search-forward "\r\n\r\n" nil t)) |
| 802 | (buffer-substring (point) (point-max)))))) | 810 | (shr-parse-image-data))))) |
| 811 | |||
| 812 | (defun shr-parse-image-data () | ||
| 813 | (list | ||
| 814 | (buffer-substring (point) (point-max)) | ||
| 815 | (save-excursion | ||
| 816 | (save-restriction | ||
| 817 | (narrow-to-region (point-min) (point)) | ||
| 818 | (let ((content-type (mail-fetch-field "content-type"))) | ||
| 819 | (and content-type | ||
| 820 | (intern content-type obarray))))))) | ||
| 803 | 821 | ||
| 804 | (defun shr-image-displayer (content-function) | 822 | (defun shr-image-displayer (content-function) |
| 805 | "Return a function to display an image. | 823 | "Return a function to display an image. |
| @@ -1488,7 +1506,11 @@ ones, in case fg and bg are nil." | |||
| 1488 | 10)) | 1506 | 10)) |
| 1489 | (when (and fill | 1507 | (when (and fill |
| 1490 | (setq colspan (cdr (assq :colspan (cdr column))))) | 1508 | (setq colspan (cdr (assq :colspan (cdr column))))) |
| 1491 | (setq colspan (string-to-number colspan)) | 1509 | (setq colspan (min (string-to-number colspan) |
| 1510 | ;; The colspan may be wrong, so | ||
| 1511 | ;; truncate it to the length of the | ||
| 1512 | ;; remaining columns. | ||
| 1513 | (- (length widths) i))) | ||
| 1492 | (dotimes (j (1- colspan)) | 1514 | (dotimes (j (1- colspan)) |
| 1493 | (if (> (+ i 1 j) (1- (length widths))) | 1515 | (if (> (+ i 1 j) (1- (length widths))) |
| 1494 | (setq width (aref widths (1- (length widths)))) | 1516 | (setq width (aref widths (1- (length widths)))) |
| @@ -1498,9 +1520,6 @@ ones, in case fg and bg are nil." | |||
| 1498 | (setq width-column (+ width-column (1- colspan)))) | 1520 | (setq width-column (+ width-column (1- colspan)))) |
| 1499 | (when (or column | 1521 | (when (or column |
| 1500 | (not fill)) | 1522 | (not fill)) |
| 1501 | ;; Sanity check for degenerate tables. | ||
| 1502 | (when (zerop width) | ||
| 1503 | (setq width 10)) | ||
| 1504 | (push (shr-render-td (cdr column) width fill) | 1523 | (push (shr-render-td (cdr column) width fill) |
| 1505 | tds)) | 1524 | tds)) |
| 1506 | (setq i (1+ i) | 1525 | (setq i (1+ i) |
| @@ -1509,7 +1528,6 @@ ones, in case fg and bg are nil." | |||
| 1509 | (nreverse trs))) | 1528 | (nreverse trs))) |
| 1510 | 1529 | ||
| 1511 | (defun shr-render-td (cont width fill) | 1530 | (defun shr-render-td (cont width fill) |
| 1512 | (when (= width 0) (debug)) | ||
| 1513 | (with-temp-buffer | 1531 | (with-temp-buffer |
| 1514 | (let ((bgcolor (cdr (assq :bgcolor cont))) | 1532 | (let ((bgcolor (cdr (assq :bgcolor cont))) |
| 1515 | (fgcolor (cdr (assq :fgcolor cont))) | 1533 | (fgcolor (cdr (assq :fgcolor cont))) |
diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el index 4ba8e5b5854..1d4a9b573da 100644 --- a/lisp/net/soap-client.el +++ b/lisp/net/soap-client.el | |||
| @@ -1352,10 +1352,7 @@ This is because it is easier to work with list results in LISP." | |||
| 1352 | 1352 | ||
| 1353 | ;;;; Soap Envelope parsing | 1353 | ;;;; Soap Envelope parsing |
| 1354 | 1354 | ||
| 1355 | (put 'soap-error | 1355 | (define-error 'soap-error "SOAP error") |
| 1356 | 'error-conditions | ||
| 1357 | '(error soap-error)) | ||
| 1358 | (put 'soap-error 'error-message "SOAP error") | ||
| 1359 | 1356 | ||
| 1360 | (defun soap-parse-envelope (node operation wsdl) | 1357 | (defun soap-parse-envelope (node operation wsdl) |
| 1361 | "Parse the SOAP envelope in NODE and return the response. | 1358 | "Parse the SOAP envelope in NODE and return the response. |
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 33e9e5aa44b..a5f59227ef7 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el | |||
| @@ -36,6 +36,8 @@ | |||
| 36 | (require 'tramp) | 36 | (require 'tramp) |
| 37 | (require 'time-date) | 37 | (require 'time-date) |
| 38 | 38 | ||
| 39 | ;; Pacify byte-compiler. | ||
| 40 | (defvar directory-sep-char) | ||
| 39 | (defvar dired-move-to-filename-regexp) | 41 | (defvar dired-move-to-filename-regexp) |
| 40 | 42 | ||
| 41 | (defcustom tramp-adb-program "adb" | 43 | (defcustom tramp-adb-program "adb" |
| @@ -174,7 +176,7 @@ pass to the OPERATION." | |||
| 174 | (tramp-run-real-handler operation args)))) | 176 | (tramp-run-real-handler operation args)))) |
| 175 | 177 | ||
| 176 | ;;;###tramp-autoload | 178 | ;;;###tramp-autoload |
| 177 | (defun tramp-adb-parse-device-names (ignore) | 179 | (defun tramp-adb-parse-device-names (_ignore) |
| 178 | "Return a list of (nil host) tuples allowed to access." | 180 | "Return a list of (nil host) tuples allowed to access." |
| 179 | (with-timeout (10) | 181 | (with-timeout (10) |
| 180 | (with-temp-buffer | 182 | (with-temp-buffer |
| @@ -224,7 +226,7 @@ pass to the OPERATION." | |||
| 224 | 226 | ||
| 225 | ;; This is derived from `tramp-sh-handle-file-truename'. Maybe the | 227 | ;; This is derived from `tramp-sh-handle-file-truename'. Maybe the |
| 226 | ;; code could be shared? | 228 | ;; code could be shared? |
| 227 | (defun tramp-adb-handle-file-truename (filename &optional counter prev-dirs) | 229 | (defun tramp-adb-handle-file-truename (filename) |
| 228 | "Like `file-truename' for Tramp files." | 230 | "Like `file-truename' for Tramp files." |
| 229 | (with-parsed-tramp-file-name (expand-file-name filename) nil | 231 | (with-parsed-tramp-file-name (expand-file-name filename) nil |
| 230 | (with-tramp-file-property v localname "file-truename" | 232 | (with-tramp-file-property v localname "file-truename" |
| @@ -416,7 +418,7 @@ Convert (\"-al\") to (\"-a\" \"-l\"). Remove arguments like \"--dired\"." | |||
| 416 | switches)))))) | 418 | switches)))))) |
| 417 | 419 | ||
| 418 | (defun tramp-adb-handle-insert-directory | 420 | (defun tramp-adb-handle-insert-directory |
| 419 | (filename switches &optional wildcard full-directory-p) | 421 | (filename switches &optional _wildcard _full-directory-p) |
| 420 | "Like `insert-directory' for Tramp files." | 422 | "Like `insert-directory' for Tramp files." |
| 421 | (when (stringp switches) | 423 | (when (stringp switches) |
| 422 | (setq switches (tramp-adb--gnu-switches-to-ash (split-string switches)))) | 424 | (setq switches (tramp-adb--gnu-switches-to-ash (split-string switches)))) |
| @@ -518,7 +520,7 @@ Emacs dired can't find files." | |||
| 518 | (tramp-shell-quote-argument localname)) | 520 | (tramp-shell-quote-argument localname)) |
| 519 | "Couldn't delete %s" directory))) | 521 | "Couldn't delete %s" directory))) |
| 520 | 522 | ||
| 521 | (defun tramp-adb-handle-delete-file (filename &optional trash) | 523 | (defun tramp-adb-handle-delete-file (filename &optional _trash) |
| 522 | "Like `delete-file' for Tramp files." | 524 | "Like `delete-file' for Tramp files." |
| 523 | (setq filename (expand-file-name filename)) | 525 | (setq filename (expand-file-name filename)) |
| 524 | (with-parsed-tramp-file-name filename nil | 526 | (with-parsed-tramp-file-name filename nil |
| @@ -651,7 +653,7 @@ But handle the case, if the \"test\" command is not available." | |||
| 651 | 653 | ||
| 652 | (defun tramp-adb-handle-copy-file | 654 | (defun tramp-adb-handle-copy-file |
| 653 | (filename newname &optional ok-if-already-exists keep-date | 655 | (filename newname &optional ok-if-already-exists keep-date |
| 654 | preserve-uid-gid preserve-extended-attributes) | 656 | _preserve-uid-gid _preserve-extended-attributes) |
| 655 | "Like `copy-file' for Tramp files. | 657 | "Like `copy-file' for Tramp files. |
| 656 | PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." | 658 | PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." |
| 657 | (setq filename (expand-file-name filename) | 659 | (setq filename (expand-file-name filename) |
| @@ -872,7 +874,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." | |||
| 872 | (when p | 874 | (when p |
| 873 | (if (yes-or-no-p "A command is running. Kill it? ") | 875 | (if (yes-or-no-p "A command is running. Kill it? ") |
| 874 | (ignore-errors (kill-process p)) | 876 | (ignore-errors (kill-process p)) |
| 875 | (tramp-compat-user-error "Shell command in progress"))) | 877 | (tramp-user-error p "Shell command in progress"))) |
| 876 | 878 | ||
| 877 | (if current-buffer-p | 879 | (if current-buffer-p |
| 878 | (progn | 880 | (progn |
| @@ -1090,6 +1092,8 @@ FMT and ARGS are passed to `error'." | |||
| 1090 | "Maybe open a connection VEC. | 1092 | "Maybe open a connection VEC. |
| 1091 | Does not do anything if a connection is already open, but re-opens the | 1093 | Does not do anything if a connection is already open, but re-opens the |
| 1092 | connection if a previous connection has died for some reason." | 1094 | connection if a previous connection has died for some reason." |
| 1095 | (tramp-check-proper-host vec) | ||
| 1096 | |||
| 1093 | (let* ((buf (tramp-get-connection-buffer vec)) | 1097 | (let* ((buf (tramp-get-connection-buffer vec)) |
| 1094 | (p (get-buffer-process buf)) | 1098 | (p (get-buffer-process buf)) |
| 1095 | (host (tramp-file-name-host vec)) | 1099 | (host (tramp-file-name-host vec)) |
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index f7f570590c8..b89c5124721 100644 --- a/lisp/net/tramp-cache.el +++ b/lisp/net/tramp-cache.el | |||
| @@ -187,7 +187,7 @@ Remove also properties of all files in subdirectories." | |||
| 187 | 'directory-file-name (list directory)))) | 187 | 'directory-file-name (list directory)))) |
| 188 | (tramp-message key 8 "%s" directory) | 188 | (tramp-message key 8 "%s" directory) |
| 189 | (maphash | 189 | (maphash |
| 190 | (lambda (key value) | 190 | (lambda (key _value) |
| 191 | (when (and (stringp (tramp-file-name-localname key)) | 191 | (when (and (stringp (tramp-file-name-localname key)) |
| 192 | (string-match directory (tramp-file-name-localname key))) | 192 | (string-match directory (tramp-file-name-localname key))) |
| 193 | (remhash key tramp-cache-data))) | 193 | (remhash key tramp-cache-data))) |
| @@ -273,7 +273,7 @@ KEY identifies the connection, it is either a process or a vector." | |||
| 273 | (let ((hash (gethash key tramp-cache-data)) | 273 | (let ((hash (gethash key tramp-cache-data)) |
| 274 | properties) | 274 | properties) |
| 275 | (when (hash-table-p hash) | 275 | (when (hash-table-p hash) |
| 276 | (maphash (lambda (x y) (add-to-list 'properties x 'append)) hash)) | 276 | (maphash (lambda (x _y) (add-to-list 'properties x 'append)) hash)) |
| 277 | properties)) | 277 | properties)) |
| 278 | (setq tramp-cache-data-changed t) | 278 | (setq tramp-cache-data-changed t) |
| 279 | (remhash key tramp-cache-data)) | 279 | (remhash key tramp-cache-data)) |
| @@ -285,6 +285,11 @@ KEY identifies the connection, it is either a process or a vector." | |||
| 285 | (let (result) | 285 | (let (result) |
| 286 | (maphash | 286 | (maphash |
| 287 | (lambda (key value) | 287 | (lambda (key value) |
| 288 | ;; Remove text properties from KEY. | ||
| 289 | (when (vectorp key) | ||
| 290 | (dotimes (i (length key)) | ||
| 291 | (when (stringp (aref key i)) | ||
| 292 | (aset key i (substring-no-properties (aref key i)))))) | ||
| 288 | (let ((tmp (format | 293 | (let ((tmp (format |
| 289 | "(%s %s)" | 294 | "(%s %s)" |
| 290 | (if (processp key) | 295 | (if (processp key) |
| @@ -304,7 +309,7 @@ KEY identifies the connection, it is either a process or a vector." | |||
| 304 | "Return a list of all known connection vectors according to `tramp-cache'." | 309 | "Return a list of all known connection vectors according to `tramp-cache'." |
| 305 | (let (result) | 310 | (let (result) |
| 306 | (maphash | 311 | (maphash |
| 307 | (lambda (key value) | 312 | (lambda (key _value) |
| 308 | (when (and (vectorp key) (null (aref key 3))) | 313 | (when (and (vectorp key) (null (aref key 3))) |
| 309 | (add-to-list 'result key))) | 314 | (add-to-list 'result key))) |
| 310 | tramp-cache-data) | 315 | tramp-cache-data) |
| @@ -368,7 +373,7 @@ This function is added always in `tramp-get-completion-function' | |||
| 368 | for all methods. Resulting data are derived from connection history." | 373 | for all methods. Resulting data are derived from connection history." |
| 369 | (let (res) | 374 | (let (res) |
| 370 | (maphash | 375 | (maphash |
| 371 | (lambda (key value) | 376 | (lambda (key _value) |
| 372 | (if (and (vectorp key) | 377 | (if (and (vectorp key) |
| 373 | (string-equal method (tramp-file-name-method key)) | 378 | (string-equal method (tramp-file-name-method key)) |
| 374 | (not (tramp-file-name-localname key))) | 379 | (not (tramp-file-name-localname key))) |
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index 462f0d88367..937db34a346 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el | |||
| @@ -30,6 +30,10 @@ | |||
| 30 | 30 | ||
| 31 | (require 'tramp) | 31 | (require 'tramp) |
| 32 | 32 | ||
| 33 | ;; Pacify byte-compiler. | ||
| 34 | (defvar reporter-eval-buffer) | ||
| 35 | (defvar reporter-prompt-for-summary-p) | ||
| 36 | |||
| 33 | (defun tramp-list-tramp-buffers () | 37 | (defun tramp-list-tramp-buffers () |
| 34 | "Return a list of all Tramp connection buffers." | 38 | "Return a list of all Tramp connection buffers." |
| 35 | (append | 39 | (append |
| @@ -266,6 +270,7 @@ buffer in your bug report. | |||
| 266 | (goto-char (point-max)) | 270 | (goto-char (point-max)) |
| 267 | 271 | ||
| 268 | ;; Dump buffer local variables. | 272 | ;; Dump buffer local variables. |
| 273 | (insert "\nlocal variables:\n================") | ||
| 269 | (dolist (buffer | 274 | (dolist (buffer |
| 270 | (delq nil | 275 | (delq nil |
| 271 | (mapcar | 276 | (mapcar |
| @@ -273,21 +278,23 @@ buffer in your bug report. | |||
| 273 | (when (string-match "\\*tramp/" (buffer-name b)) b)) | 278 | (when (string-match "\\*tramp/" (buffer-name b)) b)) |
| 274 | (buffer-list)))) | 279 | (buffer-list)))) |
| 275 | (let ((reporter-eval-buffer buffer) | 280 | (let ((reporter-eval-buffer buffer) |
| 276 | (buffer-name (buffer-name buffer)) | ||
| 277 | (elbuf (get-buffer-create " *tmp-reporter-buffer*"))) | 281 | (elbuf (get-buffer-create " *tmp-reporter-buffer*"))) |
| 278 | (with-current-buffer elbuf | 282 | (with-current-buffer elbuf |
| 279 | (emacs-lisp-mode) | 283 | (emacs-lisp-mode) |
| 280 | (erase-buffer) | 284 | (erase-buffer) |
| 281 | (insert "\n(setq\n") | 285 | (insert (format "\n;; %s\n(setq-local\n" (buffer-name buffer))) |
| 282 | (lisp-indent-line) | 286 | (lisp-indent-line) |
| 283 | (tramp-compat-funcall | 287 | (dolist |
| 284 | 'reporter-dump-variable 'buffer-name (current-buffer)) | 288 | (varsym |
| 285 | (dolist (varsym-or-cons-cell (buffer-local-variables buffer)) | 289 | (sort |
| 286 | (let ((varsym (or (car-safe varsym-or-cons-cell) | 290 | (append |
| 287 | varsym-or-cons-cell))) | 291 | (mapcar |
| 288 | (when (string-match "tramp" (symbol-name varsym)) | 292 | 'intern |
| 289 | (tramp-compat-funcall | 293 | (all-completions "tramp-" (buffer-local-variables buffer))) |
| 290 | 'reporter-dump-variable varsym (current-buffer))))) | 294 | ;; Non-tramp variables of interest. |
| 295 | '(default-directory)) | ||
| 296 | 'string<)) | ||
| 297 | (tramp-compat-funcall 'reporter-dump-variable varsym elbuf)) | ||
| 291 | (lisp-indent-line) | 298 | (lisp-indent-line) |
| 292 | (insert ")\n")) | 299 | (insert ")\n")) |
| 293 | (insert-buffer-substring elbuf))) | 300 | (insert-buffer-substring elbuf))) |
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index 2b0ea74c492..8f9d9d8fee5 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el | |||
| @@ -29,9 +29,8 @@ | |||
| 29 | 29 | ||
| 30 | ;;; Code: | 30 | ;;; Code: |
| 31 | 31 | ||
| 32 | ;; Pacify byte-compiler. | ||
| 32 | (eval-when-compile | 33 | (eval-when-compile |
| 33 | |||
| 34 | ;; Pacify byte-compiler. | ||
| 35 | (require 'cl)) | 34 | (require 'cl)) |
| 36 | 35 | ||
| 37 | (eval-and-compile | 36 | (eval-and-compile |
| @@ -187,7 +186,7 @@ | |||
| 187 | ;; `with-temp-message' does not exist in XEmacs. | 186 | ;; `with-temp-message' does not exist in XEmacs. |
| 188 | (if (fboundp 'with-temp-message) | 187 | (if (fboundp 'with-temp-message) |
| 189 | (defalias 'tramp-compat-with-temp-message 'with-temp-message) | 188 | (defalias 'tramp-compat-with-temp-message 'with-temp-message) |
| 190 | (defmacro tramp-compat-with-temp-message (message &rest body) | 189 | (defmacro tramp-compat-with-temp-message (_message &rest body) |
| 191 | "Display MESSAGE temporarily if non-nil while BODY is evaluated." | 190 | "Display MESSAGE temporarily if non-nil while BODY is evaluated." |
| 192 | `(progn ,@body))) | 191 | `(progn ,@body))) |
| 193 | 192 | ||
| @@ -238,14 +237,14 @@ this is the function `temp-directory'." | |||
| 238 | ;; `make-temp-file' exists in Emacs only. On XEmacs, we use our own | 237 | ;; `make-temp-file' exists in Emacs only. On XEmacs, we use our own |
| 239 | ;; implementation with `make-temp-name', creating the temporary file | 238 | ;; implementation with `make-temp-name', creating the temporary file |
| 240 | ;; immediately in order to avoid a security hole. | 239 | ;; immediately in order to avoid a security hole. |
| 241 | (defsubst tramp-compat-make-temp-file (filename &optional dir-flag) | 240 | (defsubst tramp-compat-make-temp-file (f &optional dir-flag) |
| 242 | "Create a temporary file (compat function). | 241 | "Create a temporary file (compat function). |
| 243 | Add the extension of FILENAME, if existing." | 242 | Add the extension of F, if existing." |
| 244 | (let* (file-name-handler-alist | 243 | (let* (file-name-handler-alist |
| 245 | (prefix (expand-file-name | 244 | (prefix (expand-file-name |
| 246 | (symbol-value 'tramp-temp-name-prefix) | 245 | (symbol-value 'tramp-temp-name-prefix) |
| 247 | (tramp-compat-temporary-file-directory))) | 246 | (tramp-compat-temporary-file-directory))) |
| 248 | (extension (file-name-extension filename t)) | 247 | (extension (file-name-extension f t)) |
| 249 | result) | 248 | result) |
| 250 | (condition-case nil | 249 | (condition-case nil |
| 251 | (setq result | 250 | (setq result |
| @@ -519,11 +518,6 @@ EOL-TYPE can be one of `dos', `unix', or `mac'." | |||
| 519 | "`dos', `unix', or `mac'"))))) | 518 | "`dos', `unix', or `mac'"))))) |
| 520 | (t (error "Can't change EOL conversion -- is MULE missing?")))) | 519 | (t (error "Can't change EOL conversion -- is MULE missing?")))) |
| 521 | 520 | ||
| 522 | ;; `user-error' has been added to Emacs 24.3. | ||
| 523 | (defun tramp-compat-user-error (format &rest args) | ||
| 524 | "Signal a pilot error." | ||
| 525 | (apply (if (fboundp 'user-error) 'user-error 'error) format args)) | ||
| 526 | |||
| 527 | (add-hook 'tramp-unload-hook | 521 | (add-hook 'tramp-unload-hook |
| 528 | (lambda () | 522 | (lambda () |
| 529 | (unload-feature 'tramp-compat 'force))) | 523 | (unload-feature 'tramp-compat 'force))) |
diff --git a/lisp/net/tramp-ftp.el b/lisp/net/tramp-ftp.el index 7d266d4d172..9e1be06a2b1 100644 --- a/lisp/net/tramp-ftp.el +++ b/lisp/net/tramp-ftp.el | |||
| @@ -30,11 +30,13 @@ | |||
| 30 | 30 | ||
| 31 | (require 'tramp) | 31 | (require 'tramp) |
| 32 | 32 | ||
| 33 | ;; Pacify byte-compiler. | ||
| 33 | (eval-when-compile | 34 | (eval-when-compile |
| 34 | |||
| 35 | ;; Pacify byte-compiler. | ||
| 36 | (require 'cl) | 35 | (require 'cl) |
| 37 | (require 'custom)) | 36 | (require 'custom)) |
| 37 | (defvar ange-ftp-ftp-name-arg) | ||
| 38 | (defvar ange-ftp-ftp-name-res) | ||
| 39 | (defvar ange-ftp-name-format) | ||
| 38 | 40 | ||
| 39 | ;; Disable Ange-FTP from file-name-handler-alist. | 41 | ;; Disable Ange-FTP from file-name-handler-alist. |
| 40 | ;; To handle EFS, the following functions need to be dealt with: | 42 | ;; To handle EFS, the following functions need to be dealt with: |
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 5bb30b04643..e70400af820 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el | |||
| @@ -97,11 +97,6 @@ | |||
| 97 | ;; option "--without-dbus". Declare used subroutines and variables. | 97 | ;; option "--without-dbus". Declare used subroutines and variables. |
| 98 | (declare-function dbus-get-unique-name "dbusbind.c") | 98 | (declare-function dbus-get-unique-name "dbusbind.c") |
| 99 | 99 | ||
| 100 | ;; Pacify byte-compiler | ||
| 101 | (eval-when-compile | ||
| 102 | (require 'cl) | ||
| 103 | (require 'custom)) | ||
| 104 | |||
| 105 | (require 'tramp) | 100 | (require 'tramp) |
| 106 | 101 | ||
| 107 | (require 'dbus) | 102 | (require 'dbus) |
| @@ -109,6 +104,12 @@ | |||
| 109 | (require 'url-util) | 104 | (require 'url-util) |
| 110 | (require 'zeroconf) | 105 | (require 'zeroconf) |
| 111 | 106 | ||
| 107 | ;; Pacify byte-compiler. | ||
| 108 | (eval-when-compile | ||
| 109 | (require 'cl) | ||
| 110 | (require 'custom)) | ||
| 111 | (defvar ls-lisp-use-insert-directory-program) | ||
| 112 | |||
| 112 | ;;;###tramp-autoload | 113 | ;;;###tramp-autoload |
| 113 | (defcustom tramp-gvfs-methods '("dav" "davs" "obex" "synce") | 114 | (defcustom tramp-gvfs-methods '("dav" "davs" "obex" "synce") |
| 114 | "List of methods for remote files, accessed with GVFS." | 115 | "List of methods for remote files, accessed with GVFS." |
| @@ -489,7 +490,7 @@ Operations not mentioned here will be handled by the default Emacs primitives.") | |||
| 489 | First arg specifies the OPERATION, second arg is a list of arguments to | 490 | First arg specifies the OPERATION, second arg is a list of arguments to |
| 490 | pass to the OPERATION." | 491 | pass to the OPERATION." |
| 491 | (unless tramp-gvfs-enabled | 492 | (unless tramp-gvfs-enabled |
| 492 | (tramp-compat-user-error "Package `tramp-gvfs' not supported")) | 493 | (tramp-user-error nil "Package `tramp-gvfs' not supported")) |
| 493 | (let ((fn (assoc operation tramp-gvfs-file-name-handler-alist))) | 494 | (let ((fn (assoc operation tramp-gvfs-file-name-handler-alist))) |
| 494 | (if fn | 495 | (if fn |
| 495 | (save-match-data (apply (cdr fn) args)) | 496 | (save-match-data (apply (cdr fn) args)) |
| @@ -923,7 +924,7 @@ is no information where to trace the message.") | |||
| 923 | v (concat localname filename) | 924 | v (concat localname filename) |
| 924 | "file-name-all-completions" result)))))))) | 925 | "file-name-all-completions" result)))))))) |
| 925 | 926 | ||
| 926 | (defun tramp-gvfs-handle-file-notify-add-watch (file-name flags callback) | 927 | (defun tramp-gvfs-handle-file-notify-add-watch (file-name _flags _callback) |
| 927 | "Like `file-notify-add-watch' for Tramp files." | 928 | "Like `file-notify-add-watch' for Tramp files." |
| 928 | (setq file-name (expand-file-name file-name)) | 929 | (setq file-name (expand-file-name file-name)) |
| 929 | (with-parsed-tramp-file-name file-name nil | 930 | (with-parsed-tramp-file-name file-name nil |
| @@ -1093,7 +1094,7 @@ is no information where to trace the message.") | |||
| 1093 | (tramp-flush-file-property v localname)))))) | 1094 | (tramp-flush-file-property v localname)))))) |
| 1094 | 1095 | ||
| 1095 | (defun tramp-gvfs-handle-write-region | 1096 | (defun tramp-gvfs-handle-write-region |
| 1096 | (start end filename &optional append visit lockname confirm) | 1097 | (start end filename &optional _append visit _lockname confirm) |
| 1097 | "Like `write-region' for Tramp files." | 1098 | "Like `write-region' for Tramp files." |
| 1098 | (with-parsed-tramp-file-name filename nil | 1099 | (with-parsed-tramp-file-name filename nil |
| 1099 | ;; XEmacs takes a coding system as the seventh argument, not `confirm'. | 1100 | ;; XEmacs takes a coding system as the seventh argument, not `confirm'. |
| @@ -1416,47 +1417,36 @@ It was \"a(say)\", but has changed to \"a{sv})\"." | |||
| 1416 | (port (tramp-file-name-port vec)) | 1417 | (port (tramp-file-name-port vec)) |
| 1417 | (localname (tramp-file-name-localname vec)) | 1418 | (localname (tramp-file-name-localname vec)) |
| 1418 | (ssl (if (string-match "^davs" method) "true" "false")) | 1419 | (ssl (if (string-match "^davs" method) "true" "false")) |
| 1419 | (mount-spec '(:array)) | 1420 | (mount-spec |
| 1420 | (mount-pref "/")) | 1421 | `(:array |
| 1421 | 1422 | ,@(cond | |
| 1422 | (setq | 1423 | ((string-equal "smb" method) |
| 1423 | mount-spec | 1424 | (string-match "^/?\\([^/]+\\)" localname) |
| 1424 | (append | 1425 | (list (tramp-gvfs-mount-spec-entry "type" "smb-share") |
| 1425 | mount-spec | 1426 | (tramp-gvfs-mount-spec-entry "server" host) |
| 1426 | (cond | 1427 | (tramp-gvfs-mount-spec-entry "share" (match-string 1 localname)))) |
| 1427 | ((string-equal "smb" method) | 1428 | ((string-equal "obex" method) |
| 1428 | (string-match "^/?\\([^/]+\\)" localname) | 1429 | (list (tramp-gvfs-mount-spec-entry "type" method) |
| 1429 | (list (tramp-gvfs-mount-spec-entry "type" "smb-share") | 1430 | (tramp-gvfs-mount-spec-entry |
| 1430 | (tramp-gvfs-mount-spec-entry "server" host) | 1431 | "host" (concat "[" (tramp-bluez-address host) "]")))) |
| 1431 | (tramp-gvfs-mount-spec-entry "share" (match-string 1 localname)))) | 1432 | ((string-match "\\`dav" method) |
| 1432 | ((string-equal "obex" method) | 1433 | (list (tramp-gvfs-mount-spec-entry "type" "dav") |
| 1433 | (list (tramp-gvfs-mount-spec-entry "type" method) | 1434 | (tramp-gvfs-mount-spec-entry "host" host) |
| 1434 | (tramp-gvfs-mount-spec-entry | 1435 | (tramp-gvfs-mount-spec-entry "ssl" ssl))) |
| 1435 | "host" (concat "[" (tramp-bluez-address host) "]")))) | 1436 | (t |
| 1436 | ((string-match "^dav" method) | 1437 | (list (tramp-gvfs-mount-spec-entry "type" method) |
| 1437 | (list (tramp-gvfs-mount-spec-entry "type" "dav") | 1438 | (tramp-gvfs-mount-spec-entry "host" host)))) |
| 1438 | (tramp-gvfs-mount-spec-entry "host" host) | 1439 | ,@(when user |
| 1439 | (tramp-gvfs-mount-spec-entry "ssl" ssl))) | 1440 | (list (tramp-gvfs-mount-spec-entry "user" user))) |
| 1440 | (t | 1441 | ,@(when domain |
| 1441 | (list (tramp-gvfs-mount-spec-entry "type" method) | 1442 | (list (tramp-gvfs-mount-spec-entry "domain" domain))) |
| 1442 | (tramp-gvfs-mount-spec-entry "host" host)))))) | 1443 | ,@(when port |
| 1443 | 1444 | (list (tramp-gvfs-mount-spec-entry "port" (number-to-string port)))))) | |
| 1444 | (when user | 1445 | (mount-pref |
| 1445 | (add-to-list | 1446 | (if (and (string-match "\\`dav" method) |
| 1446 | 'mount-spec (tramp-gvfs-mount-spec-entry "user" user) 'append)) | 1447 | (string-match "^/?[^/]+" localname)) |
| 1447 | 1448 | (match-string 0 localname) | |
| 1448 | (when domain | 1449 | "/"))) |
| 1449 | (add-to-list | ||
| 1450 | 'mount-spec (tramp-gvfs-mount-spec-entry "domain" domain) 'append)) | ||
| 1451 | |||
| 1452 | (when port | ||
| 1453 | (add-to-list | ||
| 1454 | 'mount-spec (tramp-gvfs-mount-spec-entry "port" (number-to-string port)) | ||
| 1455 | 'append)) | ||
| 1456 | |||
| 1457 | (when (and (string-match "^dav" method) | ||
| 1458 | (string-match "^/?[^/]+" localname)) | ||
| 1459 | (setq mount-pref (match-string 0 localname))) | ||
| 1460 | 1450 | ||
| 1461 | ;; Return. | 1451 | ;; Return. |
| 1462 | `(:struct ,(tramp-gvfs-dbus-string-to-byte-array mount-pref) ,mount-spec))) | 1452 | `(:struct ,(tramp-gvfs-dbus-string-to-byte-array mount-pref) ,mount-spec))) |
| @@ -1468,6 +1458,7 @@ It was \"a(say)\", but has changed to \"a{sv})\"." | |||
| 1468 | "Maybe open a connection VEC. | 1458 | "Maybe open a connection VEC. |
| 1469 | Does not do anything if a connection is already open, but re-opens the | 1459 | Does not do anything if a connection is already open, but re-opens the |
| 1470 | connection if a previous connection has died for some reason." | 1460 | connection if a previous connection has died for some reason." |
| 1461 | (tramp-check-proper-host vec) | ||
| 1471 | 1462 | ||
| 1472 | ;; We set the file name, in case there are incoming D-Bus signals or | 1463 | ;; We set the file name, in case there are incoming D-Bus signals or |
| 1473 | ;; D-Bus errors. | 1464 | ;; D-Bus errors. |
| @@ -1653,7 +1644,7 @@ be used." | |||
| 1653 | :system nil nil tramp-bluez-interface-adapter "DeviceFound" | 1644 | :system nil nil tramp-bluez-interface-adapter "DeviceFound" |
| 1654 | 'tramp-bluez-device-found) | 1645 | 'tramp-bluez-device-found) |
| 1655 | 1646 | ||
| 1656 | (defun tramp-bluez-parse-device-names (ignore) | 1647 | (defun tramp-bluez-parse-device-names (_ignore) |
| 1657 | "Return a list of (nil host) tuples allowed to access." | 1648 | "Return a list of (nil host) tuples allowed to access." |
| 1658 | (mapcar | 1649 | (mapcar |
| 1659 | (lambda (x) (list nil (car x))) | 1650 | (lambda (x) (list nil (car x))) |
| @@ -1667,14 +1658,14 @@ be used." | |||
| 1667 | 1658 | ||
| 1668 | ;; D-Bus zeroconf functions. | 1659 | ;; D-Bus zeroconf functions. |
| 1669 | 1660 | ||
| 1670 | (defun tramp-zeroconf-parse-workstation-device-names (ignore) | 1661 | (defun tramp-zeroconf-parse-workstation-device-names (_ignore) |
| 1671 | "Return a list of (user host) tuples allowed to access." | 1662 | "Return a list of (user host) tuples allowed to access." |
| 1672 | (mapcar | 1663 | (mapcar |
| 1673 | (lambda (x) | 1664 | (lambda (x) |
| 1674 | (list nil (zeroconf-service-host x))) | 1665 | (list nil (zeroconf-service-host x))) |
| 1675 | (zeroconf-list-services "_workstation._tcp"))) | 1666 | (zeroconf-list-services "_workstation._tcp"))) |
| 1676 | 1667 | ||
| 1677 | (defun tramp-zeroconf-parse-webdav-device-names (ignore) | 1668 | (defun tramp-zeroconf-parse-webdav-device-names (_ignore) |
| 1678 | "Return a list of (user host) tuples allowed to access." | 1669 | "Return a list of (user host) tuples allowed to access." |
| 1679 | (mapcar | 1670 | (mapcar |
| 1680 | (lambda (x) | 1671 | (lambda (x) |
| @@ -1716,15 +1707,15 @@ They are retrieved from the hal daemon." | |||
| 1716 | (when (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t | 1707 | (when (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t |
| 1717 | :system tramp-hal-service device tramp-hal-interface-device | 1708 | :system tramp-hal-service device tramp-hal-interface-device |
| 1718 | "PropertyExists" "sync.plugin") | 1709 | "PropertyExists" "sync.plugin") |
| 1719 | (add-to-list | 1710 | (pushnew |
| 1720 | 'tramp-synce-devices | ||
| 1721 | (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t | 1711 | (with-tramp-dbus-call-method tramp-gvfs-dbus-event-vector t |
| 1722 | :system tramp-hal-service device tramp-hal-interface-device | 1712 | :system tramp-hal-service device tramp-hal-interface-device |
| 1723 | "GetPropertyString" "pda.pocketpc.name")))) | 1713 | "GetPropertyString" "pda.pocketpc.name") |
| 1714 | tramp-synce-devices :test #'equal))) | ||
| 1724 | (tramp-message tramp-gvfs-dbus-event-vector 10 "%s" tramp-synce-devices) | 1715 | (tramp-message tramp-gvfs-dbus-event-vector 10 "%s" tramp-synce-devices) |
| 1725 | tramp-synce-devices)) | 1716 | tramp-synce-devices)) |
| 1726 | 1717 | ||
| 1727 | (defun tramp-synce-parse-device-names (ignore) | 1718 | (defun tramp-synce-parse-device-names (_ignore) |
| 1728 | "Return a list of (nil host) tuples allowed to access." | 1719 | "Return a list of (nil host) tuples allowed to access." |
| 1729 | (mapcar | 1720 | (mapcar |
| 1730 | (lambda (x) (list nil x)) | 1721 | (lambda (x) (list nil x)) |
diff --git a/lisp/net/tramp-gw.el b/lisp/net/tramp-gw.el index 13f2964f938..53dbdbc45d4 100644 --- a/lisp/net/tramp-gw.el +++ b/lisp/net/tramp-gw.el | |||
| @@ -33,16 +33,11 @@ | |||
| 33 | 33 | ||
| 34 | (require 'tramp) | 34 | (require 'tramp) |
| 35 | 35 | ||
| 36 | ;; Pacify byte-compiler | 36 | ;; Pacify byte-compiler. |
| 37 | (eval-when-compile | 37 | (eval-when-compile |
| 38 | (require 'cl) | 38 | (require 'cl) |
| 39 | (require 'custom)) | 39 | (require 'custom)) |
| 40 | 40 | (defvar socks-noproxy) | |
| 41 | ;; Avoid byte-compiler warnings if the byte-compiler supports this. | ||
| 42 | ;; Currently, XEmacs supports this. | ||
| 43 | (eval-when-compile | ||
| 44 | (when (featurep 'xemacs) | ||
| 45 | (byte-compiler-options (warnings (- unused-vars))))) | ||
| 46 | 41 | ||
| 47 | ;; We don't add the following methods to `tramp-methods', in order to | 42 | ;; We don't add the following methods to `tramp-methods', in order to |
| 48 | ;; exclude them from file name completion. | 43 | ;; exclude them from file name completion. |
| @@ -96,7 +91,7 @@ | |||
| 96 | (defvar tramp-gw-aux-proc nil | 91 | (defvar tramp-gw-aux-proc nil |
| 97 | "Process listening on local port, as mediation between SSH and the gateway.") | 92 | "Process listening on local port, as mediation between SSH and the gateway.") |
| 98 | 93 | ||
| 99 | (defun tramp-gw-gw-proc-sentinel (proc event) | 94 | (defun tramp-gw-gw-proc-sentinel (proc _event) |
| 100 | "Delete auxiliary process when we are deleted." | 95 | "Delete auxiliary process when we are deleted." |
| 101 | (unless (memq (process-status proc) '(run open)) | 96 | (unless (memq (process-status proc) '(run open)) |
| 102 | (tramp-message | 97 | (tramp-message |
| @@ -105,7 +100,7 @@ | |||
| 105 | (p (tramp-get-connection-property proc "process" nil))) | 100 | (p (tramp-get-connection-property proc "process" nil))) |
| 106 | (when (processp p) (delete-process p))))) | 101 | (when (processp p) (delete-process p))))) |
| 107 | 102 | ||
| 108 | (defun tramp-gw-aux-proc-sentinel (proc event) | 103 | (defun tramp-gw-aux-proc-sentinel (proc _event) |
| 109 | "Activate the different filters for involved gateway and auxiliary processes." | 104 | "Activate the different filters for involved gateway and auxiliary processes." |
| 110 | (when (memq (process-status proc) '(run open)) | 105 | (when (memq (process-status proc) '(run open)) |
| 111 | ;; A new process has been spawned from `tramp-gw-aux-proc'. | 106 | ;; A new process has been spawned from `tramp-gw-aux-proc'. |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index f9e68d0dad0..8ca94122af1 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -26,21 +26,15 @@ | |||
| 26 | 26 | ||
| 27 | ;;; Code: | 27 | ;;; Code: |
| 28 | 28 | ||
| 29 | (eval-when-compile (require 'cl)) ; ignore-errors | ||
| 30 | (require 'tramp) | 29 | (require 'tramp) |
| 31 | 30 | ||
| 32 | ;; Pacify byte-compiler. The function is needed on XEmacs only. I'm | 31 | ;; Pacify byte-compiler. |
| 33 | ;; not sure at all that this is the right way to do it, but let's hope | 32 | (eval-when-compile |
| 34 | ;; it works for now, and wait for a guru to point out the Right Way to | 33 | (require 'cl) |
| 35 | ;; achieve this. | 34 | (require 'dired)) |
| 36 | ;;(eval-when-compile | 35 | (defvar directory-sep-char) |
| 37 | ;; (unless (fboundp 'dired-insert-set-properties) | 36 | (defvar tramp-gw-tunnel-method) |
| 38 | ;; (fset 'dired-insert-set-properties 'ignore))) | 37 | (defvar tramp-gw-socks-method) |
| 39 | ;; Gerd suggests this: | ||
| 40 | (eval-when-compile (require 'dired)) | ||
| 41 | ;; Note that dired is required at run-time, too, when it is needed. | ||
| 42 | ;; It is only needed on XEmacs for the function | ||
| 43 | ;; `dired-insert-set-properties'. | ||
| 44 | 38 | ||
| 45 | (defcustom tramp-inline-compress-start-size 4096 | 39 | (defcustom tramp-inline-compress-start-size 4096 |
| 46 | "The minimum size of compressing where inline transfer. | 40 | "The minimum size of compressing where inline transfer. |
| @@ -938,7 +932,7 @@ target of the symlink differ." | |||
| 938 | (tramp-shell-quote-argument l-localname)) | 932 | (tramp-shell-quote-argument l-localname)) |
| 939 | t)))) | 933 | t)))) |
| 940 | 934 | ||
| 941 | (defun tramp-sh-handle-file-truename (filename &optional counter prev-dirs) | 935 | (defun tramp-sh-handle-file-truename (filename) |
| 942 | "Like `file-truename' for Tramp files." | 936 | "Like `file-truename' for Tramp files." |
| 943 | (with-parsed-tramp-file-name (expand-file-name filename) nil | 937 | (with-parsed-tramp-file-name (expand-file-name filename) nil |
| 944 | (tramp-make-tramp-file-name method user host | 938 | (tramp-make-tramp-file-name method user host |
| @@ -1240,14 +1234,14 @@ target of the symlink differ." | |||
| 1240 | 1234 | ||
| 1241 | ;; This function makes the same assumption as | 1235 | ;; This function makes the same assumption as |
| 1242 | ;; `tramp-sh-handle-set-visited-file-modtime'. | 1236 | ;; `tramp-sh-handle-set-visited-file-modtime'. |
| 1243 | (defun tramp-sh-handle-verify-visited-file-modtime (buf) | 1237 | (defun tramp-sh-handle-verify-visited-file-modtime (&optional buf) |
| 1244 | "Like `verify-visited-file-modtime' for Tramp files. | 1238 | "Like `verify-visited-file-modtime' for Tramp files. |
| 1245 | At the time `verify-visited-file-modtime' calls this function, we | 1239 | At the time `verify-visited-file-modtime' calls this function, we |
| 1246 | already know that the buffer is visiting a file and that | 1240 | already know that the buffer is visiting a file and that |
| 1247 | `visited-file-modtime' does not return 0. Do not call this | 1241 | `visited-file-modtime' does not return 0. Do not call this |
| 1248 | function directly, unless those two cases are already taken care | 1242 | function directly, unless those two cases are already taken care |
| 1249 | of." | 1243 | of." |
| 1250 | (with-current-buffer buf | 1244 | (with-current-buffer (or buf (current-buffer)) |
| 1251 | (let ((f (buffer-file-name))) | 1245 | (let ((f (buffer-file-name))) |
| 1252 | ;; There is no file visiting the buffer, or the buffer has no | 1246 | ;; There is no file visiting the buffer, or the buffer has no |
| 1253 | ;; recorded last modification time, or there is no established | 1247 | ;; recorded last modification time, or there is no established |
| @@ -1837,7 +1831,7 @@ tramp-sh-handle-file-name-all-completions: internal error accessing `%s': `%s'" | |||
| 1837 | 'copy-file (list filename newname ok-if-already-exists keep-date))))) | 1831 | 'copy-file (list filename newname ok-if-already-exists keep-date))))) |
| 1838 | 1832 | ||
| 1839 | (defun tramp-sh-handle-copy-directory | 1833 | (defun tramp-sh-handle-copy-directory |
| 1840 | (dirname newname &optional keep-date parents copy-contents) | 1834 | (dirname newname &optional keep-date parents _copy-contents) |
| 1841 | "Like `copy-directory' for Tramp files." | 1835 | "Like `copy-directory' for Tramp files." |
| 1842 | (let ((t1 (tramp-tramp-file-p dirname)) | 1836 | (let ((t1 (tramp-tramp-file-p dirname)) |
| 1843 | (t2 (tramp-tramp-file-p newname))) | 1837 | (t2 (tramp-tramp-file-p newname))) |
| @@ -1911,8 +1905,7 @@ file names." | |||
| 1911 | (t2 (tramp-tramp-file-p newname)) | 1905 | (t2 (tramp-tramp-file-p newname)) |
| 1912 | (length (nth 7 (file-attributes (file-truename filename)))) | 1906 | (length (nth 7 (file-attributes (file-truename filename)))) |
| 1913 | (attributes (and preserve-extended-attributes | 1907 | (attributes (and preserve-extended-attributes |
| 1914 | (apply 'file-extended-attributes (list filename)))) | 1908 | (apply 'file-extended-attributes (list filename))))) |
| 1915 | pr tm) | ||
| 1916 | 1909 | ||
| 1917 | (with-parsed-tramp-file-name (if t1 filename newname) nil | 1910 | (with-parsed-tramp-file-name (if t1 filename newname) nil |
| 1918 | (when (and (not ok-if-already-exists) (file-exists-p newname)) | 1911 | (when (and (not ok-if-already-exists) (file-exists-p newname)) |
| @@ -2433,7 +2426,7 @@ This is like `dired-recursive-delete-directory' for Tramp files." | |||
| 2433 | (tramp-error | 2426 | (tramp-error |
| 2434 | v 'file-error "Failed to recursively delete %s" filename)))) | 2427 | v 'file-error "Failed to recursively delete %s" filename)))) |
| 2435 | 2428 | ||
| 2436 | (defun tramp-sh-handle-dired-compress-file (file &rest ok-flag) | 2429 | (defun tramp-sh-handle-dired-compress-file (file &rest _ok-flag) |
| 2437 | "Like `dired-compress-file' for Tramp files." | 2430 | "Like `dired-compress-file' for Tramp files." |
| 2438 | ;; OK-FLAG is valid for XEmacs only, but not implemented. | 2431 | ;; OK-FLAG is valid for XEmacs only, but not implemented. |
| 2439 | ;; Code stolen mainly from dired-aux.el. | 2432 | ;; Code stolen mainly from dired-aux.el. |
| @@ -2507,8 +2500,8 @@ This is like `dired-recursive-delete-directory' for Tramp files." | |||
| 2507 | 'file-name-nondirectory (list localname))) | 2500 | 'file-name-nondirectory (list localname))) |
| 2508 | (setq localname (tramp-run-real-handler | 2501 | (setq localname (tramp-run-real-handler |
| 2509 | 'file-name-directory (list localname)))) | 2502 | 'file-name-directory (list localname)))) |
| 2510 | (unless full-directory-p | 2503 | (unless (or full-directory-p (member "-d" switches)) |
| 2511 | (setq switches (add-to-list 'switches "-d" 'append))) | 2504 | (setq switches (append switches '("-d")))) |
| 2512 | (setq switches (mapconcat 'tramp-shell-quote-argument switches " ")) | 2505 | (setq switches (mapconcat 'tramp-shell-quote-argument switches " ")) |
| 2513 | (when wildcard | 2506 | (when wildcard |
| 2514 | (setq switches (concat switches " " wildcard))) | 2507 | (setq switches (concat switches " " wildcard))) |
| @@ -2978,7 +2971,7 @@ the result will be a local, non-Tramp, filename." | |||
| 2978 | (inhibit-file-name-operation 'insert-file-contents)) | 2971 | (inhibit-file-name-operation 'insert-file-contents)) |
| 2979 | (unwind-protect | 2972 | (unwind-protect |
| 2980 | (progn | 2973 | (progn |
| 2981 | (fset 'find-buffer-file-type (lambda (filename) t)) | 2974 | (fset 'find-buffer-file-type (lambda (_filename) t)) |
| 2982 | (insert-file-contents filename visit beg end replace)) | 2975 | (insert-file-contents filename visit beg end replace)) |
| 2983 | ;; Save exit. | 2976 | ;; Save exit. |
| 2984 | (if find-buffer-file-type-function | 2977 | (if find-buffer-file-type-function |
| @@ -3383,7 +3376,7 @@ Fall back to normal file name handler if no Tramp handler exists." | |||
| 3383 | ;; Default file name handlers, we don't care. | 3376 | ;; Default file name handlers, we don't care. |
| 3384 | (t (tramp-run-real-handler operation args))))))) | 3377 | (t (tramp-run-real-handler operation args))))))) |
| 3385 | 3378 | ||
| 3386 | (defun tramp-sh-handle-file-notify-add-watch (file-name flags callback) | 3379 | (defun tramp-sh-handle-file-notify-add-watch (file-name flags _callback) |
| 3387 | "Like `file-notify-add-watch' for Tramp files." | 3380 | "Like `file-notify-add-watch' for Tramp files." |
| 3388 | (setq file-name (expand-file-name file-name)) | 3381 | (setq file-name (expand-file-name file-name)) |
| 3389 | (with-parsed-tramp-file-name file-name nil | 3382 | (with-parsed-tramp-file-name file-name nil |
| @@ -3749,7 +3742,7 @@ file exists and nonzero exit status otherwise." | |||
| 3749 | Looks at process PROC to see if a shell prompt appears in TIMEOUT | 3742 | Looks at process PROC to see if a shell prompt appears in TIMEOUT |
| 3750 | seconds. If not, it produces an error message with the given ERROR-ARGS." | 3743 | seconds. If not, it produces an error message with the given ERROR-ARGS." |
| 3751 | (let ((vec (tramp-get-connection-property proc "vector" nil))) | 3744 | (let ((vec (tramp-get-connection-property proc "vector" nil))) |
| 3752 | (condition-case err | 3745 | (condition-case nil |
| 3753 | (tramp-wait-for-regexp | 3746 | (tramp-wait-for-regexp |
| 3754 | proc timeout | 3747 | proc timeout |
| 3755 | (format | 3748 | (format |
| @@ -4204,9 +4197,6 @@ Goes through the list `tramp-inline-compress-commands'." | |||
| 4204 | (tramp-message | 4197 | (tramp-message |
| 4205 | vec 2 "Couldn't find an inline transfer compress command"))))) | 4198 | vec 2 "Couldn't find an inline transfer compress command"))))) |
| 4206 | 4199 | ||
| 4207 | (defvar tramp-gw-tunnel-method) | ||
| 4208 | (defvar tramp-gw-socks-method) | ||
| 4209 | |||
| 4210 | (defun tramp-compute-multi-hops (vec) | 4200 | (defun tramp-compute-multi-hops (vec) |
| 4211 | "Expands VEC according to `tramp-default-proxies-alist'. | 4201 | "Expands VEC according to `tramp-default-proxies-alist'. |
| 4212 | Gateway hops are already opened." | 4202 | Gateway hops are already opened." |
| @@ -4262,7 +4252,7 @@ Gateway hops are already opened." | |||
| 4262 | ?h (or (tramp-file-name-host (car target-alist)) "")))) | 4252 | ?h (or (tramp-file-name-host (car target-alist)) "")))) |
| 4263 | (with-parsed-tramp-file-name proxy l | 4253 | (with-parsed-tramp-file-name proxy l |
| 4264 | ;; Add the hop. | 4254 | ;; Add the hop. |
| 4265 | (add-to-list 'target-alist l) | 4255 | (pushnew l target-alist :test #'equal) |
| 4266 | ;; Start next search. | 4256 | ;; Start next search. |
| 4267 | (setq choices tramp-default-proxies-alist))))) | 4257 | (setq choices tramp-default-proxies-alist))))) |
| 4268 | 4258 | ||
| @@ -4280,11 +4270,11 @@ Gateway hops are already opened." | |||
| 4280 | vec 'file-error | 4270 | vec 'file-error |
| 4281 | "Connection `%s' is not supported for gateway access." hop)) | 4271 | "Connection `%s' is not supported for gateway access." hop)) |
| 4282 | ;; Open the gateway connection. | 4272 | ;; Open the gateway connection. |
| 4283 | (add-to-list | 4273 | (pushnew |
| 4284 | 'target-alist | ||
| 4285 | (vector | 4274 | (vector |
| 4286 | (tramp-file-name-method hop) (tramp-file-name-user hop) | 4275 | (tramp-file-name-method hop) (tramp-file-name-user hop) |
| 4287 | (tramp-compat-funcall 'tramp-gw-open-connection vec gw hop) nil nil)) | 4276 | (tramp-compat-funcall 'tramp-gw-open-connection vec gw hop) nil nil) |
| 4277 | target-alist :test #'equal) | ||
| 4288 | ;; For the password prompt, we need the correct values. | 4278 | ;; For the password prompt, we need the correct values. |
| 4289 | ;; Therefore, we must remember the gateway vector. But we | 4279 | ;; Therefore, we must remember the gateway vector. But we |
| 4290 | ;; cannot do it as connection property, because it shouldn't | 4280 | ;; cannot do it as connection property, because it shouldn't |
| @@ -4336,6 +4326,8 @@ Gateway hops are already opened." | |||
| 4336 | "Maybe open a connection VEC. | 4326 | "Maybe open a connection VEC. |
| 4337 | Does not do anything if a connection is already open, but re-opens the | 4327 | Does not do anything if a connection is already open, but re-opens the |
| 4338 | connection if a previous connection has died for some reason." | 4328 | connection if a previous connection has died for some reason." |
| 4329 | (tramp-check-proper-host vec) | ||
| 4330 | |||
| 4339 | (catch 'uname-changed | 4331 | (catch 'uname-changed |
| 4340 | (let ((p (tramp-get-connection-process vec)) | 4332 | (let ((p (tramp-get-connection-process vec)) |
| 4341 | (process-name (tramp-get-connection-property vec "process-name" nil)) | 4333 | (process-name (tramp-get-connection-property vec "process-name" nil)) |
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 29847556dfe..f05a54f46f7 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el | |||
| @@ -27,9 +27,12 @@ | |||
| 27 | 27 | ||
| 28 | ;;; Code: | 28 | ;;; Code: |
| 29 | 29 | ||
| 30 | (eval-when-compile (require 'cl)) ; block, return | ||
| 31 | (require 'tramp) | 30 | (require 'tramp) |
| 32 | 31 | ||
| 32 | ;; Pacify byte-compiler. | ||
| 33 | (eval-when-compile | ||
| 34 | (require 'cl)) | ||
| 35 | |||
| 33 | ;; Define SMB method ... | 36 | ;; Define SMB method ... |
| 34 | ;;;###tramp-autoload | 37 | ;;;###tramp-autoload |
| 35 | (defconst tramp-smb-method "smb" | 38 | (defconst tramp-smb-method "smb" |
| @@ -355,7 +358,7 @@ pass to the OPERATION." | |||
| 355 | (throw 'tramp-action 'ok))))) | 358 | (throw 'tramp-action 'ok))))) |
| 356 | 359 | ||
| 357 | (defun tramp-smb-handle-copy-directory | 360 | (defun tramp-smb-handle-copy-directory |
| 358 | (dirname newname &optional keep-date parents copy-contents) | 361 | (dirname newname &optional keep-date parents _copy-contents) |
| 359 | "Like `copy-directory' for Tramp files." | 362 | "Like `copy-directory' for Tramp files." |
| 360 | (setq dirname (expand-file-name dirname) | 363 | (setq dirname (expand-file-name dirname) |
| 361 | newname (expand-file-name newname)) | 364 | newname (expand-file-name newname)) |
| @@ -492,7 +495,7 @@ pass to the OPERATION." | |||
| 492 | 495 | ||
| 493 | (defun tramp-smb-handle-copy-file | 496 | (defun tramp-smb-handle-copy-file |
| 494 | (filename newname &optional ok-if-already-exists keep-date | 497 | (filename newname &optional ok-if-already-exists keep-date |
| 495 | preserve-uid-gid preserve-extended-attributes) | 498 | _preserve-uid-gid _preserve-extended-attributes) |
| 496 | "Like `copy-file' for Tramp files. | 499 | "Like `copy-file' for Tramp files. |
| 497 | KEEP-DATE has no effect in case NEWNAME resides on an SMB server. | 500 | KEEP-DATE has no effect in case NEWNAME resides on an SMB server. |
| 498 | PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." | 501 | PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." |
| @@ -571,7 +574,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." | |||
| 571 | (tramp-error | 574 | (tramp-error |
| 572 | v 'file-error "%s `%s'" (match-string 0) directory)))))) | 575 | v 'file-error "%s `%s'" (match-string 0) directory)))))) |
| 573 | 576 | ||
| 574 | (defun tramp-smb-handle-delete-file (filename &optional trash) | 577 | (defun tramp-smb-handle-delete-file (filename &optional _trash) |
| 575 | "Like `delete-file' for Tramp files." | 578 | "Like `delete-file' for Tramp files." |
| 576 | (setq filename (expand-file-name filename)) | 579 | (setq filename (expand-file-name filename)) |
| 577 | (when (file-exists-p filename) | 580 | (when (file-exists-p filename) |
| @@ -1361,14 +1364,14 @@ Result is a list of (LOCALNAME MODE SIZE MONTH DAY TIME YEAR)." | |||
| 1361 | (while (not (eobp)) | 1364 | (while (not (eobp)) |
| 1362 | (setq entry (tramp-smb-read-file-entry share)) | 1365 | (setq entry (tramp-smb-read-file-entry share)) |
| 1363 | (forward-line) | 1366 | (forward-line) |
| 1364 | (when entry (add-to-list 'res entry)))) | 1367 | (when entry (pushnew entry res :test #'equal)))) |
| 1365 | 1368 | ||
| 1366 | ;; Cache share entries. | 1369 | ;; Cache share entries. |
| 1367 | (unless share | 1370 | (unless share |
| 1368 | (tramp-set-connection-property v "share-cache" res))) | 1371 | (tramp-set-connection-property v "share-cache" res))) |
| 1369 | 1372 | ||
| 1370 | ;; Add directory itself. | 1373 | ;; Add directory itself. |
| 1371 | (add-to-list 'res '("" "drwxrwxrwx" 0 (0 0))) | 1374 | (pushnew '("" "drwxrwxrwx" 0 (0 0)) res :test #'equal) |
| 1372 | 1375 | ||
| 1373 | ;; There's a very strange error (debugged with XEmacs 21.4.14) | 1376 | ;; There's a very strange error (debugged with XEmacs 21.4.14) |
| 1374 | ;; If there's no short delay, it returns nil. No idea about. | 1377 | ;; If there's no short delay, it returns nil. No idea about. |
| @@ -1497,7 +1500,7 @@ Result is the list (LOCALNAME MODE SIZE MTIME)." | |||
| 1497 | "%s%s" | 1500 | "%s%s" |
| 1498 | (if (string-match "D" mode) "d" "-") | 1501 | (if (string-match "D" mode) "d" "-") |
| 1499 | (mapconcat | 1502 | (mapconcat |
| 1500 | (lambda (x) "") " " | 1503 | (lambda (_x) "") " " |
| 1501 | (concat "r" (if (string-match "R" mode) "-" "w") "x")))) | 1504 | (concat "r" (if (string-match "R" mode) "-" "w") "x")))) |
| 1502 | line (substring line 0 -6)) | 1505 | line (substring line 0 -6)) |
| 1503 | (return)) | 1506 | (return)) |
| @@ -1561,6 +1564,8 @@ Does not do anything if a connection is already open, but re-opens the | |||
| 1561 | connection if a previous connection has died for some reason. | 1564 | connection if a previous connection has died for some reason. |
| 1562 | If ARGUMENT is non-nil, use it as argument for | 1565 | If ARGUMENT is non-nil, use it as argument for |
| 1563 | `tramp-smb-winexe-program', and suppress any checks." | 1566 | `tramp-smb-winexe-program', and suppress any checks." |
| 1567 | (tramp-check-proper-host vec) | ||
| 1568 | |||
| 1564 | (let* ((share (tramp-smb-get-share vec)) | 1569 | (let* ((share (tramp-smb-get-share vec)) |
| 1565 | (buf (tramp-get-connection-buffer vec)) | 1570 | (buf (tramp-get-connection-buffer vec)) |
| 1566 | (p (get-buffer-process buf))) | 1571 | (p (get-buffer-process buf))) |
diff --git a/lisp/net/tramp-uu.el b/lisp/net/tramp-uu.el index c64d8dfa046..6cf5baeccd8 100644 --- a/lisp/net/tramp-uu.el +++ b/lisp/net/tramp-uu.el | |||
| @@ -28,11 +28,11 @@ | |||
| 28 | 28 | ||
| 29 | ;;; Code: | 29 | ;;; Code: |
| 30 | 30 | ||
| 31 | (defvar tramp-uu-b64-alphabet | 31 | (defconst tramp-uu-b64-alphabet |
| 32 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" | 32 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" |
| 33 | "Mapping from base64-encoded character to the byte it represents.") | 33 | "Mapping from base64-encoded character to the byte it represents.") |
| 34 | 34 | ||
| 35 | (defvar tramp-uu-b64-char-to-byte | 35 | (defconst tramp-uu-b64-char-to-byte |
| 36 | (let ((i 0)) | 36 | (let ((i 0)) |
| 37 | (mapcar (lambda (c) | 37 | (mapcar (lambda (c) |
| 38 | (prog1 | 38 | (prog1 |
| @@ -55,7 +55,6 @@ | |||
| 55 | ;; First we base64 encode the region, then we transmogrify that into | 55 | ;; First we base64 encode the region, then we transmogrify that into |
| 56 | ;; uu encoding. | 56 | ;; uu encoding. |
| 57 | (let ((len (base64-encode-region beg end t)) | 57 | (let ((len (base64-encode-region beg end t)) |
| 58 | (padding 0) | ||
| 59 | i c) | 58 | i c) |
| 60 | (save-excursion | 59 | (save-excursion |
| 61 | (goto-char beg) | 60 | (goto-char beg) |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 8ce5f2eae9b..6c3ae376dc3 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -57,9 +57,17 @@ | |||
| 57 | 57 | ||
| 58 | ;;; Code: | 58 | ;;; Code: |
| 59 | 59 | ||
| 60 | (eval-when-compile (require 'cl)) ; ignore-errors | ||
| 61 | (require 'tramp-compat) | 60 | (require 'tramp-compat) |
| 62 | 61 | ||
| 62 | ;; Pacify byte-compiler. | ||
| 63 | (eval-when-compile | ||
| 64 | (require 'cl)) | ||
| 65 | (defvar bkup-backup-directory-info) | ||
| 66 | (defvar directory-sep-char) | ||
| 67 | (defvar eshell-path-env) | ||
| 68 | (defvar file-notify-descriptors) | ||
| 69 | (defvar outline-regexp) | ||
| 70 | |||
| 63 | ;;; User Customizable Internal Variables: | 71 | ;;; User Customizable Internal Variables: |
| 64 | 72 | ||
| 65 | (defgroup tramp nil | 73 | (defgroup tramp nil |
| @@ -1112,6 +1120,12 @@ calling HANDLER.") | |||
| 1112 | 1120 | ||
| 1113 | ;;; Internal functions which must come first: | 1121 | ;;; Internal functions which must come first: |
| 1114 | 1122 | ||
| 1123 | (defsubst tramp-user-error (vec-or-proc format &rest args) | ||
| 1124 | "Signal a pilot error." | ||
| 1125 | (apply | ||
| 1126 | 'tramp-error vec-or-proc | ||
| 1127 | (if (fboundp 'user-error) 'user-error 'error) format args)) | ||
| 1128 | |||
| 1115 | ;; Conversion functions between external representation and | 1129 | ;; Conversion functions between external representation and |
| 1116 | ;; internal data structure. Convenience functions for internal | 1130 | ;; internal data structure. Convenience functions for internal |
| 1117 | ;; data structure. | 1131 | ;; data structure. |
| @@ -1224,30 +1238,38 @@ their replacement." | |||
| 1224 | (if noninteractive | 1238 | (if noninteractive |
| 1225 | (warn "Method %s is obsolete, using %s" | 1239 | (warn "Method %s is obsolete, using %s" |
| 1226 | result (substring result 0 -1)) | 1240 | result (substring result 0 -1)) |
| 1227 | (unless (y-or-n-p (format "Method %s is obsolete, use %s? " | 1241 | (unless (y-or-n-p (format "Method \"%s\" is obsolete, use \"%s\"? " |
| 1228 | result (substring result 0 -1))) | 1242 | result (substring result 0 -1))) |
| 1229 | (tramp-compat-user-error "Method \"%s\" not supported" result))) | 1243 | (tramp-user-error nil "Method \"%s\" not supported" result))) |
| 1230 | (add-to-list 'tramp-warned-obsolete-methods result)) | 1244 | (add-to-list 'tramp-warned-obsolete-methods result)) |
| 1231 | ;; This works with the current set of `tramp-obsolete-methods'. | 1245 | ;; This works with the current set of `tramp-obsolete-methods'. |
| 1232 | ;; Must be improved, if their are more sophisticated replacements. | 1246 | ;; Must be improved, if their are more sophisticated replacements. |
| 1233 | (setq result (substring result 0 -1))) | 1247 | (setq result (substring result 0 -1))) |
| 1234 | result)) | 1248 | ;; We must mark, whether a default value has been used. |
| 1249 | (if (or method (null result)) | ||
| 1250 | result | ||
| 1251 | (propertize result 'tramp-default t)))) | ||
| 1235 | 1252 | ||
| 1236 | (defun tramp-find-user (method user host) | 1253 | (defun tramp-find-user (method user host) |
| 1237 | "Return the right user string to use. | 1254 | "Return the right user string to use. |
| 1238 | This is USER, if non-nil. Otherwise, do a lookup in | 1255 | This is USER, if non-nil. Otherwise, do a lookup in |
| 1239 | `tramp-default-user-alist'." | 1256 | `tramp-default-user-alist'." |
| 1240 | (or user | 1257 | (let ((result |
| 1241 | (let ((choices tramp-default-user-alist) | 1258 | (or user |
| 1242 | luser item) | 1259 | (let ((choices tramp-default-user-alist) |
| 1243 | (while choices | 1260 | luser item) |
| 1244 | (setq item (pop choices)) | 1261 | (while choices |
| 1245 | (when (and (string-match (or (nth 0 item) "") (or method "")) | 1262 | (setq item (pop choices)) |
| 1246 | (string-match (or (nth 1 item) "") (or host ""))) | 1263 | (when (and (string-match (or (nth 0 item) "") (or method "")) |
| 1247 | (setq luser (nth 2 item)) | 1264 | (string-match (or (nth 1 item) "") (or host ""))) |
| 1248 | (setq choices nil))) | 1265 | (setq luser (nth 2 item)) |
| 1249 | luser) | 1266 | (setq choices nil))) |
| 1250 | tramp-default-user)) | 1267 | luser) |
| 1268 | tramp-default-user))) | ||
| 1269 | ;; We must mark, whether a default value has been used. | ||
| 1270 | (if (or user (null result)) | ||
| 1271 | result | ||
| 1272 | (propertize result 'tramp-default t)))) | ||
| 1251 | 1273 | ||
| 1252 | (defun tramp-find-host (method user host) | 1274 | (defun tramp-find-host (method user host) |
| 1253 | "Return the right host string to use. | 1275 | "Return the right host string to use. |
| @@ -1264,6 +1286,18 @@ This is HOST, if non-nil. Otherwise, it is `tramp-default-host'." | |||
| 1264 | lhost) | 1286 | lhost) |
| 1265 | tramp-default-host)) | 1287 | tramp-default-host)) |
| 1266 | 1288 | ||
| 1289 | (defun tramp-check-proper-host (vec) | ||
| 1290 | "Check host name of VEC." | ||
| 1291 | (let ((method (tramp-file-name-method vec)) | ||
| 1292 | (user (tramp-file-name-user vec)) | ||
| 1293 | (host (tramp-file-name-host vec))) | ||
| 1294 | (when (and (equal tramp-syntax 'ftp) host | ||
| 1295 | (or (null method) (get-text-property 0 'tramp-default method)) | ||
| 1296 | (or (null user) (get-text-property 0 'tramp-default user)) | ||
| 1297 | (member host (mapcar 'car tramp-methods))) | ||
| 1298 | (tramp-cleanup-connection vec) | ||
| 1299 | (tramp-user-error vec "Host name must not match method \"%s\"" host)))) | ||
| 1300 | |||
| 1267 | (defun tramp-dissect-file-name (name &optional nodefault) | 1301 | (defun tramp-dissect-file-name (name &optional nodefault) |
| 1268 | "Return a `tramp-file-name' structure. | 1302 | "Return a `tramp-file-name' structure. |
| 1269 | The structure consists of remote method, remote user, remote host | 1303 | The structure consists of remote method, remote user, remote host |
| @@ -1272,7 +1306,7 @@ non-nil, the file name parts are not expanded to their default | |||
| 1272 | values." | 1306 | values." |
| 1273 | (save-match-data | 1307 | (save-match-data |
| 1274 | (let ((match (string-match (nth 0 tramp-file-name-structure) name))) | 1308 | (let ((match (string-match (nth 0 tramp-file-name-structure) name))) |
| 1275 | (unless match (tramp-compat-user-error "Not a Tramp file name: %s" name)) | 1309 | (unless match (tramp-user-error nil "Not a Tramp file name: \"%s\"" name)) |
| 1276 | (let ((method (match-string (nth 1 tramp-file-name-structure) name)) | 1310 | (let ((method (match-string (nth 1 tramp-file-name-structure) name)) |
| 1277 | (user (match-string (nth 2 tramp-file-name-structure) name)) | 1311 | (user (match-string (nth 2 tramp-file-name-structure) name)) |
| 1278 | (host (match-string (nth 3 tramp-file-name-structure) name)) | 1312 | (host (match-string (nth 3 tramp-file-name-structure) name)) |
| @@ -1282,12 +1316,7 @@ values." | |||
| 1282 | (when (string-match tramp-prefix-ipv6-regexp host) | 1316 | (when (string-match tramp-prefix-ipv6-regexp host) |
| 1283 | (setq host (replace-match "" nil t host))) | 1317 | (setq host (replace-match "" nil t host))) |
| 1284 | (when (string-match tramp-postfix-ipv6-regexp host) | 1318 | (when (string-match tramp-postfix-ipv6-regexp host) |
| 1285 | (setq host (replace-match "" nil t host))) | 1319 | (setq host (replace-match "" nil t host)))) |
| 1286 | (when (and (equal tramp-syntax 'ftp) (null method) (null user) | ||
| 1287 | (member host (mapcar 'car tramp-methods)) | ||
| 1288 | (not (tramp-completion-mode-p))) | ||
| 1289 | (tramp-compat-user-error | ||
| 1290 | "Host name must not match method `%s'" host))) | ||
| 1291 | (if nodefault | 1320 | (if nodefault |
| 1292 | (vector method user host localname hop) | 1321 | (vector method user host localname hop) |
| 1293 | (vector | 1322 | (vector |
| @@ -1417,10 +1446,10 @@ The outline level is equal to the verbosity of the Tramp message." | |||
| 1417 | (set (make-local-variable 'outline-level) 'tramp-debug-outline-level)) | 1446 | (set (make-local-variable 'outline-level) 'tramp-debug-outline-level)) |
| 1418 | (current-buffer))) | 1447 | (current-buffer))) |
| 1419 | 1448 | ||
| 1420 | (defsubst tramp-debug-message (vec fmt-string &rest args) | 1449 | (defsubst tramp-debug-message (vec fmt-string &rest arguments) |
| 1421 | "Append message to debug buffer. | 1450 | "Append message to debug buffer. |
| 1422 | Message is formatted with FMT-STRING as control string and the remaining | 1451 | Message is formatted with FMT-STRING as control string and the remaining |
| 1423 | ARGS to actually emit the message (if applicable)." | 1452 | ARGUMENTS to actually emit the message (if applicable)." |
| 1424 | (when (get-buffer (tramp-buffer-name vec)) | 1453 | (when (get-buffer (tramp-buffer-name vec)) |
| 1425 | (with-current-buffer (tramp-get-debug-buffer vec) | 1454 | (with-current-buffer (tramp-get-debug-buffer vec) |
| 1426 | (goto-char (point-max)) | 1455 | (goto-char (point-max)) |
| @@ -1462,7 +1491,8 @@ ARGS to actually emit the message (if applicable)." | |||
| 1462 | "tramp-debug-message" | 1491 | "tramp-debug-message" |
| 1463 | "tramp-error" | 1492 | "tramp-error" |
| 1464 | "tramp-error-with-buffer" | 1493 | "tramp-error-with-buffer" |
| 1465 | "tramp-message") | 1494 | "tramp-message" |
| 1495 | "tramp-user-error") | ||
| 1466 | t) | 1496 | t) |
| 1467 | "$") | 1497 | "$") |
| 1468 | fn))) | 1498 | fn))) |
| @@ -1480,14 +1510,14 @@ ARGS to actually emit the message (if applicable)." | |||
| 1480 | ; (1+ (count-lines (point-min) (cdr ffn))))))) | 1510 | ; (1+ (count-lines (point-min) (cdr ffn))))))) |
| 1481 | (insert (format "%s " fn))) | 1511 | (insert (format "%s " fn))) |
| 1482 | ;; The message. | 1512 | ;; The message. |
| 1483 | (insert (apply 'format fmt-string args))))) | 1513 | (insert (apply 'format fmt-string arguments))))) |
| 1484 | 1514 | ||
| 1485 | (defvar tramp-message-show-message t | 1515 | (defvar tramp-message-show-message t |
| 1486 | "Show Tramp message in the minibuffer. | 1516 | "Show Tramp message in the minibuffer. |
| 1487 | This variable is used to disable messages from `tramp-error'. | 1517 | This variable is used to disable messages from `tramp-error'. |
| 1488 | The messages are visible anyway, because an error is raised.") | 1518 | The messages are visible anyway, because an error is raised.") |
| 1489 | 1519 | ||
| 1490 | (defsubst tramp-message (vec-or-proc level fmt-string &rest args) | 1520 | (defsubst tramp-message (vec-or-proc level fmt-string &rest arguments) |
| 1491 | "Emit a message depending on verbosity level. | 1521 | "Emit a message depending on verbosity level. |
| 1492 | VEC-OR-PROC identifies the Tramp buffer to use. It can be either a | 1522 | VEC-OR-PROC identifies the Tramp buffer to use. It can be either a |
| 1493 | vector or a process. LEVEL says to be quiet if `tramp-verbose' is | 1523 | vector or a process. LEVEL says to be quiet if `tramp-verbose' is |
| @@ -1498,7 +1528,7 @@ The message is also logged into the debug buffer when `tramp-verbose' | |||
| 1498 | is greater than or equal 4. | 1528 | is greater than or equal 4. |
| 1499 | 1529 | ||
| 1500 | Calls functions `message' and `tramp-debug-message' with FMT-STRING as | 1530 | Calls functions `message' and `tramp-debug-message' with FMT-STRING as |
| 1501 | control string and the remaining ARGS to actually emit the message (if | 1531 | control string and the remaining ARGUMENTS to actually emit the message (if |
| 1502 | applicable)." | 1532 | applicable)." |
| 1503 | (ignore-errors | 1533 | (ignore-errors |
| 1504 | (when (<= level tramp-verbose) | 1534 | (when (<= level tramp-verbose) |
| @@ -1514,7 +1544,7 @@ applicable)." | |||
| 1514 | ((= level 2) "Warning: ") | 1544 | ((= level 2) "Warning: ") |
| 1515 | (t "Tramp: ")) | 1545 | (t "Tramp: ")) |
| 1516 | fmt-string) | 1546 | fmt-string) |
| 1517 | args)) | 1547 | arguments)) |
| 1518 | ;; Log only when there is a minimum level. | 1548 | ;; Log only when there is a minimum level. |
| 1519 | (when (>= tramp-verbose 4) | 1549 | (when (>= tramp-verbose 4) |
| 1520 | (when (and vec-or-proc | 1550 | (when (and vec-or-proc |
| @@ -1527,17 +1557,21 @@ applicable)." | |||
| 1527 | (apply 'tramp-debug-message | 1557 | (apply 'tramp-debug-message |
| 1528 | vec-or-proc | 1558 | vec-or-proc |
| 1529 | (concat (format "(%d) # " level) fmt-string) | 1559 | (concat (format "(%d) # " level) fmt-string) |
| 1530 | args))))))) | 1560 | arguments))))))) |
| 1531 | 1561 | ||
| 1532 | (defsubst tramp-backtrace (vec-or-proc) | 1562 | (defsubst tramp-backtrace (&optional vec-or-proc) |
| 1533 | "Dump a backtrace into the debug buffer. | 1563 | "Dump a backtrace into the debug buffer. |
| 1534 | This function is meant for debugging purposes." | 1564 | If VEC-OR-PROC is nil, the buffer *debug tramp* is used. This |
| 1535 | (tramp-message vec-or-proc 10 "\n%s" (with-output-to-string (backtrace)))) | 1565 | function is meant for debugging purposes." |
| 1536 | 1566 | (if vec-or-proc | |
| 1537 | (defsubst tramp-error (vec-or-proc signal fmt-string &rest args) | 1567 | (tramp-message vec-or-proc 10 "\n%s" (with-output-to-string (backtrace))) |
| 1568 | (if (<= 10 tramp-verbose) | ||
| 1569 | (with-output-to-temp-buffer "*debug tramp*" (backtrace))))) | ||
| 1570 | |||
| 1571 | (defsubst tramp-error (vec-or-proc signal fmt-string &rest arguments) | ||
| 1538 | "Emit an error. | 1572 | "Emit an error. |
| 1539 | VEC-OR-PROC identifies the connection to use, SIGNAL is the | 1573 | VEC-OR-PROC identifies the connection to use, SIGNAL is the |
| 1540 | signal identifier to be raised, remaining args passed to | 1574 | signal identifier to be raised, remaining arguments passed to |
| 1541 | `tramp-message'. Finally, signal SIGNAL is raised." | 1575 | `tramp-message'. Finally, signal SIGNAL is raised." |
| 1542 | (let (tramp-message-show-message) | 1576 | (let (tramp-message-show-message) |
| 1543 | (tramp-backtrace vec-or-proc) | 1577 | (tramp-backtrace vec-or-proc) |
| @@ -1546,16 +1580,16 @@ signal identifier to be raised, remaining args passed to | |||
| 1546 | (error-message-string | 1580 | (error-message-string |
| 1547 | (list signal | 1581 | (list signal |
| 1548 | (get signal 'error-message) | 1582 | (get signal 'error-message) |
| 1549 | (apply 'format fmt-string args)))) | 1583 | (apply 'format fmt-string arguments)))) |
| 1550 | (signal signal (list (apply 'format fmt-string args))))) | 1584 | (signal signal (list (apply 'format fmt-string arguments))))) |
| 1551 | 1585 | ||
| 1552 | (defsubst tramp-error-with-buffer | 1586 | (defsubst tramp-error-with-buffer |
| 1553 | (buffer vec-or-proc signal fmt-string &rest args) | 1587 | (buf vec-or-proc signal fmt-string &rest arguments) |
| 1554 | "Emit an error, and show BUFFER. | 1588 | "Emit an error, and show BUF. |
| 1555 | If BUFFER is nil, show the connection buffer. Wait for 30\", or until | 1589 | If BUF is nil, show the connection buf. Wait for 30\", or until |
| 1556 | an input event arrives. The other arguments are passed to `tramp-error'." | 1590 | an input event arrives. The other arguments are passed to `tramp-error'." |
| 1557 | (save-window-excursion | 1591 | (save-window-excursion |
| 1558 | (let* ((buf (or (and (bufferp buffer) buffer) | 1592 | (let* ((buf (or (and (bufferp buf) buf) |
| 1559 | (and (processp vec-or-proc) (process-buffer vec-or-proc)) | 1593 | (and (processp vec-or-proc) (process-buffer vec-or-proc)) |
| 1560 | (and (vectorp vec-or-proc) | 1594 | (and (vectorp vec-or-proc) |
| 1561 | (tramp-get-connection-buffer vec-or-proc)))) | 1595 | (tramp-get-connection-buffer vec-or-proc)))) |
| @@ -1563,7 +1597,7 @@ an input event arrives. The other arguments are passed to `tramp-error'." | |||
| 1563 | (and buf (with-current-buffer buf | 1597 | (and buf (with-current-buffer buf |
| 1564 | (tramp-dissect-file-name default-directory)))))) | 1598 | (tramp-dissect-file-name default-directory)))))) |
| 1565 | (unwind-protect | 1599 | (unwind-protect |
| 1566 | (apply 'tramp-error vec-or-proc signal fmt-string args) | 1600 | (apply 'tramp-error vec-or-proc signal fmt-string arguments) |
| 1567 | ;; Save exit. | 1601 | ;; Save exit. |
| 1568 | (when (and buf | 1602 | (when (and buf |
| 1569 | tramp-message-show-message | 1603 | tramp-message-show-message |
| @@ -1572,7 +1606,7 @@ an input event arrives. The other arguments are passed to `tramp-error'." | |||
| 1572 | (let ((enable-recursive-minibuffers t)) | 1606 | (let ((enable-recursive-minibuffers t)) |
| 1573 | ;; `tramp-error' does not show messages. So we must do it | 1607 | ;; `tramp-error' does not show messages. So we must do it |
| 1574 | ;; ourselves. | 1608 | ;; ourselves. |
| 1575 | (message fmt-string args) | 1609 | (message fmt-string arguments) |
| 1576 | ;; Show buffer. | 1610 | ;; Show buffer. |
| 1577 | (pop-to-buffer buf) | 1611 | (pop-to-buffer buf) |
| 1578 | (discard-input) | 1612 | (discard-input) |
| @@ -1598,18 +1632,19 @@ Remaining args are Lisp expressions to be evaluated (inside an implicit | |||
| 1598 | 1632 | ||
| 1599 | If VAR is nil, then we bind `v' to the structure and `method', `user', | 1633 | If VAR is nil, then we bind `v' to the structure and `method', `user', |
| 1600 | `host', `localname', `hop' to the components." | 1634 | `host', `localname', `hop' to the components." |
| 1601 | `(let* ((,(or var 'v) (tramp-dissect-file-name ,filename)) | 1635 | (let ((bindings |
| 1602 | (,(if var (intern (concat (symbol-name var) "-method")) 'method) | 1636 | (mapcar (lambda (elem) |
| 1603 | (tramp-file-name-method ,(or var 'v))) | 1637 | `(,(if var (intern (format "%s-%s" var elem)) elem) |
| 1604 | (,(if var (intern (concat (symbol-name var) "-user")) 'user) | 1638 | (,(intern (format "tramp-file-name-%s" elem)) |
| 1605 | (tramp-file-name-user ,(or var 'v))) | 1639 | ,(or var 'v)))) |
| 1606 | (,(if var (intern (concat (symbol-name var) "-host")) 'host) | 1640 | '(method user host localname hop)))) |
| 1607 | (tramp-file-name-host ,(or var 'v))) | 1641 | `(let* ((,(or var 'v) (tramp-dissect-file-name ,filename)) |
| 1608 | (,(if var (intern (concat (symbol-name var) "-localname")) 'localname) | 1642 | ,@bindings) |
| 1609 | (tramp-file-name-localname ,(or var 'v))) | 1643 | ;; We don't know which of those vars will be used, so we bind them all, |
| 1610 | (,(if var (intern (concat (symbol-name var) "-hop")) 'hop) | 1644 | ;; and then add here a dummy use of all those variables, so we don't get |
| 1611 | (tramp-file-name-hop ,(or var 'v)))) | 1645 | ;; flooded by warnings about those vars `body' didn't use. |
| 1612 | ,@body)) | 1646 | (ignore ,@(mapcar #'car bindings)) |
| 1647 | ,@body))) | ||
| 1613 | 1648 | ||
| 1614 | (put 'with-parsed-tramp-file-name 'lisp-indent-function 2) | 1649 | (put 'with-parsed-tramp-file-name 'lisp-indent-function 2) |
| 1615 | (put 'with-parsed-tramp-file-name 'edebug-form-spec '(form symbolp body)) | 1650 | (put 'with-parsed-tramp-file-name 'edebug-form-spec '(form symbolp body)) |
| @@ -1627,24 +1662,27 @@ If VAR is nil, then we bind `v' to the structure and `method', `user', | |||
| 1627 | If LEVEL does not fit for visible messages, there are only traces | 1662 | If LEVEL does not fit for visible messages, there are only traces |
| 1628 | without a visible progress reporter." | 1663 | without a visible progress reporter." |
| 1629 | (declare (indent 3) (debug t)) | 1664 | (declare (indent 3) (debug t)) |
| 1630 | `(let ((result "failed") | 1665 | `(progn |
| 1631 | pr tm) | ||
| 1632 | (tramp-message ,vec ,level "%s..." ,message) | 1666 | (tramp-message ,vec ,level "%s..." ,message) |
| 1633 | ;; We start a pulsing progress reporter after 3 seconds. Feature | 1667 | (let ((result "failed") |
| 1634 | ;; introduced in Emacs 24.1. | 1668 | (tm |
| 1635 | (when (and tramp-message-show-message | 1669 | ;; We start a pulsing progress reporter after 3 seconds. Feature |
| 1636 | ;; Display only when there is a minimum level. | 1670 | ;; introduced in Emacs 24.1. |
| 1637 | (<= ,level (min tramp-verbose 3))) | 1671 | (when (and tramp-message-show-message |
| 1638 | (ignore-errors | 1672 | ;; Display only when there is a minimum level. |
| 1639 | (setq pr (tramp-compat-funcall 'make-progress-reporter ,message) | 1673 | (<= ,level (min tramp-verbose 3))) |
| 1640 | tm (when pr | 1674 | (ignore-errors |
| 1641 | (run-at-time 3 0.1 'tramp-progress-reporter-update pr))))) | 1675 | (let ((pr (tramp-compat-funcall |
| 1642 | (unwind-protect | 1676 | #'make-progress-reporter ,message))) |
| 1643 | ;; Execute the body. | 1677 | (when pr |
| 1644 | (prog1 (progn ,@body) (setq result "done")) | 1678 | (run-at-time 3 0.1 |
| 1645 | ;; Stop progress reporter. | 1679 | #'tramp-progress-reporter-update pr))))))) |
| 1646 | (if tm (tramp-compat-funcall 'cancel-timer tm)) | 1680 | (unwind-protect |
| 1647 | (tramp-message ,vec ,level "%s...%s" ,message result)))) | 1681 | ;; Execute the body. |
| 1682 | (prog1 (progn ,@body) (setq result "done")) | ||
| 1683 | ;; Stop progress reporter. | ||
| 1684 | (if tm (tramp-compat-funcall 'cancel-timer tm)) | ||
| 1685 | (tramp-message ,vec ,level "%s...%s" ,message result))))) | ||
| 1648 | 1686 | ||
| 1649 | (tramp-compat-font-lock-add-keywords | 1687 | (tramp-compat-font-lock-add-keywords |
| 1650 | 'emacs-lisp-mode '("\\<with-tramp-progress-reporter\\>")) | 1688 | 'emacs-lisp-mode '("\\<with-tramp-progress-reporter\\>")) |
| @@ -3206,7 +3244,7 @@ User is always nil." | |||
| 3206 | (when p | 3244 | (when p |
| 3207 | (if (yes-or-no-p "A command is running. Kill it? ") | 3245 | (if (yes-or-no-p "A command is running. Kill it? ") |
| 3208 | (ignore-errors (kill-process p)) | 3246 | (ignore-errors (kill-process p)) |
| 3209 | (tramp-compat-user-error "Shell command in progress"))) | 3247 | (tramp-user-error p "Shell command in progress"))) |
| 3210 | 3248 | ||
| 3211 | (if current-buffer-p | 3249 | (if current-buffer-p |
| 3212 | (progn | 3250 | (progn |
| @@ -3281,7 +3319,7 @@ beginning of local filename are not substituted." | |||
| 3281 | (setq filename (concat filename "/")))) | 3319 | (setq filename (concat filename "/")))) |
| 3282 | (tramp-run-real-handler 'substitute-in-file-name (list filename))))) | 3320 | (tramp-run-real-handler 'substitute-in-file-name (list filename))))) |
| 3283 | 3321 | ||
| 3284 | (defun tramp-handle-unhandled-file-name-directory (filename) | 3322 | (defun tramp-handle-unhandled-file-name-directory (_filename) |
| 3285 | "Like `unhandled-file-name-directory' for Tramp files." | 3323 | "Like `unhandled-file-name-directory' for Tramp files." |
| 3286 | ;; With Emacs 23, we could simply return `nil'. But we must keep it | 3324 | ;; With Emacs 23, we could simply return `nil'. But we must keep it |
| 3287 | ;; for backward compatibility. | 3325 | ;; for backward compatibility. |
| @@ -3341,7 +3379,7 @@ of." | |||
| 3341 | ;; only if that agrees with the buffer's record. | 3379 | ;; only if that agrees with the buffer's record. |
| 3342 | (t (equal mt '(-1 65535)))))))))) | 3380 | (t (equal mt '(-1 65535)))))))))) |
| 3343 | 3381 | ||
| 3344 | (defun tramp-handle-file-notify-add-watch (filename flags callback) | 3382 | (defun tramp-handle-file-notify-add-watch (filename _flags _callback) |
| 3345 | "Like `file-notify-add-watch' for Tramp files." | 3383 | "Like `file-notify-add-watch' for Tramp files." |
| 3346 | ;; This is the default handler. tramp-gvfs.el and tramp-sh.el have | 3384 | ;; This is the default handler. tramp-gvfs.el and tramp-sh.el have |
| 3347 | ;; its own one. | 3385 | ;; its own one. |
| @@ -3350,7 +3388,6 @@ of." | |||
| 3350 | (tramp-error | 3388 | (tramp-error |
| 3351 | v 'file-notify-error "File notification not supported for `%s'" filename))) | 3389 | v 'file-notify-error "File notification not supported for `%s'" filename))) |
| 3352 | 3390 | ||
| 3353 | (defvar file-notify-descriptors) | ||
| 3354 | (defun tramp-handle-file-notify-rm-watch (proc) | 3391 | (defun tramp-handle-file-notify-rm-watch (proc) |
| 3355 | "Like `file-notify-rm-watch' for Tramp files." | 3392 | "Like `file-notify-rm-watch' for Tramp files." |
| 3356 | ;; The descriptor must be a process object. | 3393 | ;; The descriptor must be a process object. |
| @@ -3365,7 +3402,7 @@ of." | |||
| 3365 | ;; prompts from the remote host. See the variable | 3402 | ;; prompts from the remote host. See the variable |
| 3366 | ;; `tramp-actions-before-shell' for usage of these functions. | 3403 | ;; `tramp-actions-before-shell' for usage of these functions. |
| 3367 | 3404 | ||
| 3368 | (defun tramp-action-login (proc vec) | 3405 | (defun tramp-action-login (_proc vec) |
| 3369 | "Send the login name." | 3406 | "Send the login name." |
| 3370 | (when (not (stringp tramp-current-user)) | 3407 | (when (not (stringp tramp-current-user)) |
| 3371 | (setq tramp-current-user | 3408 | (setq tramp-current-user |
| @@ -3392,11 +3429,11 @@ of." | |||
| 3392 | ;; Hide password prompt. | 3429 | ;; Hide password prompt. |
| 3393 | (narrow-to-region (point-max) (point-max))))) | 3430 | (narrow-to-region (point-max) (point-max))))) |
| 3394 | 3431 | ||
| 3395 | (defun tramp-action-succeed (proc vec) | 3432 | (defun tramp-action-succeed (_proc _vec) |
| 3396 | "Signal success in finding shell prompt." | 3433 | "Signal success in finding shell prompt." |
| 3397 | (throw 'tramp-action 'ok)) | 3434 | (throw 'tramp-action 'ok)) |
| 3398 | 3435 | ||
| 3399 | (defun tramp-action-permission-denied (proc vec) | 3436 | (defun tramp-action-permission-denied (proc _vec) |
| 3400 | "Signal permission denied." | 3437 | "Signal permission denied." |
| 3401 | (kill-process proc) | 3438 | (kill-process proc) |
| 3402 | (throw 'tramp-action 'permission-denied)) | 3439 | (throw 'tramp-action 'permission-denied)) |
| @@ -3429,7 +3466,7 @@ See also `tramp-action-yesno'." | |||
| 3429 | (tramp-message vec 6 "\n%s" (buffer-string))) | 3466 | (tramp-message vec 6 "\n%s" (buffer-string))) |
| 3430 | (tramp-send-string vec (concat "y" tramp-local-end-of-line))))) | 3467 | (tramp-send-string vec (concat "y" tramp-local-end-of-line))))) |
| 3431 | 3468 | ||
| 3432 | (defun tramp-action-terminal (proc vec) | 3469 | (defun tramp-action-terminal (_proc vec) |
| 3433 | "Tell the remote host which terminal type to use. | 3470 | "Tell the remote host which terminal type to use. |
| 3434 | The terminal type can be configured with `tramp-terminal-type'." | 3471 | The terminal type can be configured with `tramp-terminal-type'." |
| 3435 | (tramp-message vec 5 "Setting `%s' as terminal type." tramp-terminal-type) | 3472 | (tramp-message vec 5 "Setting `%s' as terminal type." tramp-terminal-type) |
| @@ -3437,7 +3474,7 @@ The terminal type can be configured with `tramp-terminal-type'." | |||
| 3437 | (tramp-message vec 6 "\n%s" (buffer-string))) | 3474 | (tramp-message vec 6 "\n%s" (buffer-string))) |
| 3438 | (tramp-send-string vec (concat tramp-terminal-type tramp-local-end-of-line))) | 3475 | (tramp-send-string vec (concat tramp-terminal-type tramp-local-end-of-line))) |
| 3439 | 3476 | ||
| 3440 | (defun tramp-action-process-alive (proc vec) | 3477 | (defun tramp-action-process-alive (proc _vec) |
| 3441 | "Check, whether a process has finished." | 3478 | "Check, whether a process has finished." |
| 3442 | (unless (memq (process-status proc) '(run open)) | 3479 | (unless (memq (process-status proc) '(run open)) |
| 3443 | (throw 'tramp-action 'process-died))) | 3480 | (throw 'tramp-action 'process-died))) |
| @@ -4182,9 +4219,6 @@ Only works for Bourne-like shells." | |||
| 4182 | 4219 | ||
| 4183 | ;;; Integration of eshell.el: | 4220 | ;;; Integration of eshell.el: |
| 4184 | 4221 | ||
| 4185 | (eval-when-compile | ||
| 4186 | (defvar eshell-path-env)) | ||
| 4187 | |||
| 4188 | ;; eshell.el keeps the path in `eshell-path-env'. We must change it | 4222 | ;; eshell.el keeps the path in `eshell-path-env'. We must change it |
| 4189 | ;; when `default-directory' points to another host. | 4223 | ;; when `default-directory' points to another host. |
| 4190 | (defun tramp-eshell-directory-change () | 4224 | (defun tramp-eshell-directory-change () |
diff --git a/lisp/nxml/nxml-outln.el b/lisp/nxml/nxml-outln.el index dab22f7559f..5fe6cfefa83 100644 --- a/lisp/nxml/nxml-outln.el +++ b/lisp/nxml/nxml-outln.el | |||
| @@ -1008,13 +1008,8 @@ immediately after the section's start-tag." | |||
| 1008 | (defun nxml-outline-error (&rest args) | 1008 | (defun nxml-outline-error (&rest args) |
| 1009 | (signal 'nxml-outline-error args)) | 1009 | (signal 'nxml-outline-error args)) |
| 1010 | 1010 | ||
| 1011 | (put 'nxml-outline-error | 1011 | (define-error 'nxml-outline-error |
| 1012 | 'error-conditions | 1012 | "Cannot create outline of buffer that is not well-formed" 'nxml-error) |
| 1013 | '(error nxml-error nxml-outline-error)) | ||
| 1014 | |||
| 1015 | (put 'nxml-outline-error | ||
| 1016 | 'error-message | ||
| 1017 | "Cannot create outline of buffer that is not well-formed") | ||
| 1018 | 1013 | ||
| 1019 | ;;; Debugging | 1014 | ;;; Debugging |
| 1020 | 1015 | ||
diff --git a/lisp/nxml/nxml-rap.el b/lisp/nxml/nxml-rap.el index ac4e9ac4cd9..398c107cf01 100644 --- a/lisp/nxml/nxml-rap.el +++ b/lisp/nxml/nxml-rap.el | |||
| @@ -402,13 +402,8 @@ expected `%s'" | |||
| 402 | (defun nxml-scan-error (&rest args) | 402 | (defun nxml-scan-error (&rest args) |
| 403 | (signal 'nxml-scan-error args)) | 403 | (signal 'nxml-scan-error args)) |
| 404 | 404 | ||
| 405 | (put 'nxml-scan-error | 405 | (define-error 'nxml-scan-error |
| 406 | 'error-conditions | 406 | "Scan over element that is not well-formed" 'nxml-error) |
| 407 | '(error nxml-error nxml-scan-error)) | ||
| 408 | |||
| 409 | (put 'nxml-scan-error | ||
| 410 | 'error-message | ||
| 411 | "Scan over element that is not well-formed") | ||
| 412 | 407 | ||
| 413 | (provide 'nxml-rap) | 408 | (provide 'nxml-rap) |
| 414 | 409 | ||
diff --git a/lisp/nxml/nxml-util.el b/lisp/nxml/nxml-util.el index 6ba6d21f7ed..c410aa12c83 100644 --- a/lisp/nxml/nxml-util.el +++ b/lisp/nxml/nxml-util.el | |||
| @@ -45,7 +45,7 @@ | |||
| 45 | 45 | ||
| 46 | (defmacro nxml-debug-clear-inside (start end) | 46 | (defmacro nxml-debug-clear-inside (start end) |
| 47 | (when nxml-debug | 47 | (when nxml-debug |
| 48 | `(loop for overlay in (overlays-in ,start ,end) | 48 | `(cl-loop for overlay in (overlays-in ,start ,end) |
| 49 | if (overlay-get overlay 'nxml-inside-debug) | 49 | if (overlay-get overlay 'nxml-inside-debug) |
| 50 | do (delete-overlay overlay) | 50 | do (delete-overlay overlay) |
| 51 | finally (nxml-debug-change "nxml-clear-inside" ,start ,end)))) | 51 | finally (nxml-debug-change "nxml-clear-inside" ,start ,end)))) |
| @@ -101,13 +101,8 @@ This is the inverse of `nxml-make-namespace'." | |||
| 101 | (signal (or error-symbol 'nxml-file-parse-error) | 101 | (signal (or error-symbol 'nxml-file-parse-error) |
| 102 | (list file pos message))) | 102 | (list file pos message))) |
| 103 | 103 | ||
| 104 | (put 'nxml-file-parse-error | 104 | (define-error 'nxml-error nil) |
| 105 | 'error-conditions | 105 | (define-error 'nxml-file-parse-error "Error parsing file" 'nxml-error) |
| 106 | '(error nxml-file-parse-error)) | ||
| 107 | |||
| 108 | (put 'nxml-parse-file-error | ||
| 109 | 'error-message | ||
| 110 | "Error parsing file") | ||
| 111 | 106 | ||
| 112 | (provide 'nxml-util) | 107 | (provide 'nxml-util) |
| 113 | 108 | ||
diff --git a/lisp/nxml/rng-cmpct.el b/lisp/nxml/rng-cmpct.el index 111dab82633..6697195cebb 100644 --- a/lisp/nxml/rng-cmpct.el +++ b/lisp/nxml/rng-cmpct.el | |||
| @@ -45,13 +45,8 @@ Return a pattern." | |||
| 45 | 45 | ||
| 46 | ;;; Error handling | 46 | ;;; Error handling |
| 47 | 47 | ||
| 48 | (put 'rng-c-incorrect-schema | 48 | (define-error 'rng-c-incorrect-schema |
| 49 | 'error-conditions | 49 | "Incorrect schema" '(rng-error nxml-file-parse-error)) |
| 50 | '(error rng-error nxml-file-parse-error rng-c-incorrect-schema)) | ||
| 51 | |||
| 52 | (put 'rng-c-incorrect-schema | ||
| 53 | 'error-message | ||
| 54 | "Incorrect schema") | ||
| 55 | 50 | ||
| 56 | (defun rng-c-signal-incorrect-schema (filename pos message) | 51 | (defun rng-c-signal-incorrect-schema (filename pos message) |
| 57 | (nxml-signal-file-parse-error filename | 52 | (nxml-signal-file-parse-error filename |
diff --git a/lisp/nxml/rng-match.el b/lisp/nxml/rng-match.el index 3c949ada668..36bd23b3768 100644 --- a/lisp/nxml/rng-match.el +++ b/lisp/nxml/rng-match.el | |||
| @@ -1541,14 +1541,7 @@ nullable and y1 isn't, return a choice | |||
| 1541 | (signal 'rng-compile-error | 1541 | (signal 'rng-compile-error |
| 1542 | (list (apply 'format args)))) | 1542 | (list (apply 'format args)))) |
| 1543 | 1543 | ||
| 1544 | (put 'rng-compile-error | 1544 | (define-error 'rng-compile-error "Incorrect schema" 'rng-error) |
| 1545 | 'error-conditions | ||
| 1546 | '(error rng-error rng-compile-error)) | ||
| 1547 | |||
| 1548 | (put 'rng-compile-error | ||
| 1549 | 'error-message | ||
| 1550 | "Incorrect schema") | ||
| 1551 | |||
| 1552 | 1545 | ||
| 1553 | ;;; External API | 1546 | ;;; External API |
| 1554 | 1547 | ||
diff --git a/lisp/nxml/rng-uri.el b/lisp/nxml/rng-uri.el index b5f6983ab7f..8c0d409d520 100644 --- a/lisp/nxml/rng-uri.el +++ b/lisp/nxml/rng-uri.el | |||
| @@ -127,8 +127,7 @@ Signal an error if URI is not a valid file URL." | |||
| 127 | (defun rng-uri-error (&rest args) | 127 | (defun rng-uri-error (&rest args) |
| 128 | (signal 'rng-uri-error (list (apply 'format args)))) | 128 | (signal 'rng-uri-error (list (apply 'format args)))) |
| 129 | 129 | ||
| 130 | (put 'rng-uri-error 'error-conditions '(error rng-uri-error)) | 130 | (define-error 'rng-uri-error "Invalid URI") |
| 131 | (put 'rng-uri-error 'error-message "Invalid URI") | ||
| 132 | 131 | ||
| 133 | (defun rng-uri-split (str) | 132 | (defun rng-uri-split (str) |
| 134 | (and (string-match "\\`\\(?:\\([^:/?#]+\\):\\)?\ | 133 | (and (string-match "\\`\\(?:\\([^:/?#]+\\):\\)?\ |
diff --git a/lisp/nxml/rng-util.el b/lisp/nxml/rng-util.el index 0d97f9c3f12..7af6ae231c5 100644 --- a/lisp/nxml/rng-util.el +++ b/lisp/nxml/rng-util.el | |||
| @@ -165,6 +165,8 @@ HIST, if non-nil, specifies a history list as with `completing-read'." | |||
| 165 | (setq string (substring string 0 -1))) | 165 | (setq string (substring string 0 -1))) |
| 166 | string) | 166 | string) |
| 167 | 167 | ||
| 168 | (define-error 'rng-error nil) | ||
| 169 | |||
| 168 | (provide 'rng-util) | 170 | (provide 'rng-util) |
| 169 | 171 | ||
| 170 | ;;; rng-util.el ends here | 172 | ;;; rng-util.el ends here |
diff --git a/lisp/nxml/xmltok.el b/lisp/nxml/xmltok.el index b80335362a1..9bfcd21618d 100644 --- a/lisp/nxml/xmltok.el +++ b/lisp/nxml/xmltok.el | |||
| @@ -1435,13 +1435,8 @@ If LIMIT is non-nil, then do not consider characters beyond LIMIT." | |||
| 1435 | (defun xmltok-current-token-string () | 1435 | (defun xmltok-current-token-string () |
| 1436 | (buffer-substring-no-properties xmltok-start (point))) | 1436 | (buffer-substring-no-properties xmltok-start (point))) |
| 1437 | 1437 | ||
| 1438 | (put 'xmltok-markup-declaration-parse-error | 1438 | (define-error 'xmltok-markup-declaration-parse-error |
| 1439 | 'error-conditions | 1439 | "Syntax error in markup declaration") |
| 1440 | '(error xmltok-markup-declaration-parse-error)) | ||
| 1441 | |||
| 1442 | (put 'xmltok-markup-declaration-parse-error | ||
| 1443 | 'error-message | ||
| 1444 | "Syntax error in markup declaration") | ||
| 1445 | 1440 | ||
| 1446 | (defun xmltok-markup-declaration-parse-error () | 1441 | (defun xmltok-markup-declaration-parse-error () |
| 1447 | (signal 'xmltok-markup-declaration-parse-error nil)) | 1442 | (signal 'xmltok-markup-declaration-parse-error nil)) |
diff --git a/lisp/nxml/xsd-regexp.el b/lisp/nxml/xsd-regexp.el index f63b2e6defb..8c0b26cdab9 100644 --- a/lisp/nxml/xsd-regexp.el +++ b/lisp/nxml/xsd-regexp.el | |||
| @@ -466,13 +466,8 @@ whose value is a range-list." | |||
| 466 | (- (length str) | 466 | (- (length str) |
| 467 | (length xsdre-current-regexp)))))))) | 467 | (length xsdre-current-regexp)))))))) |
| 468 | 468 | ||
| 469 | (put 'xsdre-invalid-regexp | 469 | (define-error 'xsdre-invalid-regexp |
| 470 | 'error-conditions | 470 | "Invalid W3C XML Schema Datatypes regular expression") |
| 471 | '(error xsdre-invalid-regexp)) | ||
| 472 | |||
| 473 | (put 'xsdre-invalid-regexp | ||
| 474 | 'error-message | ||
| 475 | "Invalid W3C XML Schema Datatypes regular expression") | ||
| 476 | 471 | ||
| 477 | (defun xsdre-parse-regexp () | 472 | (defun xsdre-parse-regexp () |
| 478 | (let ((branches nil)) | 473 | (let ((branches nil)) |
| @@ -686,13 +681,7 @@ whose value is a range-list." | |||
| 686 | 681 | ||
| 687 | ;; This error condition is used only internally. | 682 | ;; This error condition is used only internally. |
| 688 | 683 | ||
| 689 | (put 'xsdre-parse-error | 684 | (define-error 'xsdre-parse-error "Internal error in parsing XSD regexp") |
| 690 | 'error-conditions | ||
| 691 | '(error xsdre-parse-error)) | ||
| 692 | |||
| 693 | (put 'xsdre-parse-error | ||
| 694 | 'error-message | ||
| 695 | "Internal error in parsing XSD regexp") | ||
| 696 | 685 | ||
| 697 | ;;; Character class data | 686 | ;;; Character class data |
| 698 | 687 | ||
diff --git a/lisp/obsolete/scribe.el b/lisp/obsolete/scribe.el index 8396cce3e27..2ba1bb4aa76 100644 --- a/lisp/obsolete/scribe.el +++ b/lisp/obsolete/scribe.el | |||
| @@ -144,7 +144,9 @@ Interesting variables: | |||
| 144 | (set (make-local-variable 'sentence-end) | 144 | (set (make-local-variable 'sentence-end) |
| 145 | "\\([.?!]\\|@:\\)[]\"')}]*\\($\\| $\\|\t\\| \\)[ \t\n]*") | 145 | "\\([.?!]\\|@:\\)[]\"')}]*\\($\\| $\\|\t\\| \\)[ \t\n]*") |
| 146 | (set (make-local-variable 'compile-command) | 146 | (set (make-local-variable 'compile-command) |
| 147 | (concat "scribe " (buffer-file-name)))) | 147 | (concat "scribe " |
| 148 | (if buffer-file-name | ||
| 149 | (shell-quote-argument (buffer-file-name)))))) | ||
| 148 | 150 | ||
| 149 | (defun scribe-tab () | 151 | (defun scribe-tab () |
| 150 | (interactive) | 152 | (interactive) |
diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el index f2abc00e3f5..609585c9522 100644 --- a/lisp/play/gomoku.el +++ b/lisp/play/gomoku.el | |||
| @@ -948,13 +948,13 @@ If the game is finished, this command requests for another game." | |||
| 948 | 948 | ||
| 949 | (defun gomoku-max-width () | 949 | (defun gomoku-max-width () |
| 950 | "Largest possible board width for the current window." | 950 | "Largest possible board width for the current window." |
| 951 | (1+ (/ (- (window-width (selected-window)) | 951 | (1+ (/ (- (window-width) |
| 952 | gomoku-x-offset gomoku-x-offset 1) | 952 | gomoku-x-offset gomoku-x-offset 1) |
| 953 | gomoku-square-width))) | 953 | gomoku-square-width))) |
| 954 | 954 | ||
| 955 | (defun gomoku-max-height () | 955 | (defun gomoku-max-height () |
| 956 | "Largest possible board height for the current window." | 956 | "Largest possible board height for the current window." |
| 957 | (1+ (/ (- (window-height (selected-window)) | 957 | (1+ (/ (- (window-height) |
| 958 | gomoku-y-offset gomoku-y-offset 2) | 958 | gomoku-y-offset gomoku-y-offset 2) |
| 959 | ;; 2 instead of 1 because WINDOW-HEIGHT includes the mode line ! | 959 | ;; 2 instead of 1 because WINDOW-HEIGHT includes the mode line ! |
| 960 | gomoku-square-height))) | 960 | gomoku-square-height))) |
diff --git a/lisp/play/landmark.el b/lisp/play/landmark.el index 0845ea2c300..cf86d7a9de5 100644 --- a/lisp/play/landmark.el +++ b/lisp/play/landmark.el | |||
| @@ -843,13 +843,13 @@ If the game is finished, this command requests for another game." | |||
| 843 | 843 | ||
| 844 | (defun landmark-max-width () | 844 | (defun landmark-max-width () |
| 845 | "Largest possible board width for the current window." | 845 | "Largest possible board width for the current window." |
| 846 | (1+ (/ (- (window-width (selected-window)) | 846 | (1+ (/ (- (window-width) |
| 847 | landmark-x-offset landmark-x-offset 1) | 847 | landmark-x-offset landmark-x-offset 1) |
| 848 | landmark-square-width))) | 848 | landmark-square-width))) |
| 849 | 849 | ||
| 850 | (defun landmark-max-height () | 850 | (defun landmark-max-height () |
| 851 | "Largest possible board height for the current window." | 851 | "Largest possible board height for the current window." |
| 852 | (1+ (/ (- (window-height (selected-window)) | 852 | (1+ (/ (- (window-height) |
| 853 | landmark-y-offset landmark-y-offset 2) | 853 | landmark-y-offset landmark-y-offset 2) |
| 854 | ;; 2 instead of 1 because WINDOW-HEIGHT includes the mode line ! | 854 | ;; 2 instead of 1 because WINDOW-HEIGHT includes the mode line ! |
| 855 | landmark-square-height))) | 855 | landmark-square-height))) |
diff --git a/lisp/play/life.el b/lisp/play/life.el index a52c5477bb7..a73f3a58e66 100644 --- a/lisp/play/life.el +++ b/lisp/play/life.el | |||
| @@ -290,8 +290,7 @@ generations (this defaults to 1)." | |||
| 290 | (life-display-generation 0) | 290 | (life-display-generation 0) |
| 291 | (signal 'life-extinct nil)) | 291 | (signal 'life-extinct nil)) |
| 292 | 292 | ||
| 293 | (put 'life-extinct 'error-conditions '(life-extinct quit)) | 293 | (define-error 'life-extinct "All life has perished" 'quit) ;FIXME: quit really? |
| 294 | (put 'life-extinct 'error-message "All life has perished") | ||
| 295 | 294 | ||
| 296 | (provide 'life) | 295 | (provide 'life) |
| 297 | 296 | ||
diff --git a/lisp/play/zone.el b/lisp/play/zone.el index 1724ebdf198..0f333392b9a 100644 --- a/lisp/play/zone.el +++ b/lisp/play/zone.el | |||
| @@ -110,7 +110,7 @@ If the element is a function or a list of a function and a number, | |||
| 110 | (let ((f (selected-frame)) | 110 | (let ((f (selected-frame)) |
| 111 | (outbuf (get-buffer-create "*zone*")) | 111 | (outbuf (get-buffer-create "*zone*")) |
| 112 | (text (buffer-substring (window-start) (window-end))) | 112 | (text (buffer-substring (window-start) (window-end))) |
| 113 | (wp (1+ (- (window-point (selected-window)) | 113 | (wp (1+ (- (window-point) |
| 114 | (window-start))))) | 114 | (window-start))))) |
| 115 | (put 'zone 'orig-buffer (current-buffer)) | 115 | (put 'zone 'orig-buffer (current-buffer)) |
| 116 | (switch-to-buffer outbuf) | 116 | (switch-to-buffer outbuf) |
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index 805444d08b9..33b21d6cc07 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el | |||
| @@ -130,6 +130,8 @@ | |||
| 130 | (defvar ispell-check-comments) | 130 | (defvar ispell-check-comments) |
| 131 | (defvar skeleton-further-elements) | 131 | (defvar skeleton-further-elements) |
| 132 | 132 | ||
| 133 | (define-error 'ada-mode-errors nil) | ||
| 134 | |||
| 133 | (defun ada-mode-version () | 135 | (defun ada-mode-version () |
| 134 | "Return Ada mode version." | 136 | "Return Ada mode version." |
| 135 | (interactive) | 137 | (interactive) |
diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el index e44b7c191bf..1ca83a97a59 100644 --- a/lisp/progmodes/ada-xref.el +++ b/lisp/progmodes/ada-xref.el | |||
| @@ -342,9 +342,9 @@ CROSS-PREFIX is the prefix to use for the `gnatls' command." | |||
| 342 | ) | 342 | ) |
| 343 | (kill-buffer nil)))) | 343 | (kill-buffer nil)))) |
| 344 | 344 | ||
| 345 | (set 'ada-xref-runtime-library-specs-path | 345 | (setq ada-xref-runtime-library-specs-path |
| 346 | (reverse ada-xref-runtime-library-specs-path)) | 346 | (reverse ada-xref-runtime-library-specs-path)) |
| 347 | (set 'ada-xref-runtime-library-ali-path | 347 | (setq ada-xref-runtime-library-ali-path |
| 348 | (reverse ada-xref-runtime-library-ali-path)) | 348 | (reverse ada-xref-runtime-library-ali-path)) |
| 349 | )) | 349 | )) |
| 350 | 350 | ||
| @@ -582,8 +582,8 @@ as defined in the project file." | |||
| 582 | 582 | ||
| 583 | (while dirs | 583 | (while dirs |
| 584 | (if (file-directory-p (car dirs)) | 584 | (if (file-directory-p (car dirs)) |
| 585 | (set 'list (append list (file-name-all-completions string (car dirs))))) | 585 | (setq list (append list (file-name-all-completions string (car dirs))))) |
| 586 | (set 'dirs (cdr dirs))) | 586 | (setq dirs (cdr dirs))) |
| 587 | (cond ((equal flag 'lambda) | 587 | (cond ((equal flag 'lambda) |
| 588 | (assoc string list)) | 588 | (assoc string list)) |
| 589 | (flag | 589 | (flag |
| @@ -702,11 +702,11 @@ is non-nil, prompt the user to select one. If none are found, return | |||
| 702 | 702 | ||
| 703 | ((file-exists-p first-choice) | 703 | ((file-exists-p first-choice) |
| 704 | ;; filename.adp | 704 | ;; filename.adp |
| 705 | (set 'selected first-choice)) | 705 | (setq selected first-choice)) |
| 706 | 706 | ||
| 707 | ((= (length prj-files) 1) | 707 | ((= (length prj-files) 1) |
| 708 | ;; Exactly one project file was found in the current directory | 708 | ;; Exactly one project file was found in the current directory |
| 709 | (set 'selected (car prj-files))) | 709 | (setq selected (car prj-files))) |
| 710 | 710 | ||
| 711 | ((and (> (length prj-files) 1) (not no-user-question)) | 711 | ((and (> (length prj-files) 1) (not no-user-question)) |
| 712 | ;; multiple project files in current directory, ask the user | 712 | ;; multiple project files in current directory, ask the user |
| @@ -732,7 +732,7 @@ is non-nil, prompt the user to select one. If none are found, return | |||
| 732 | (> choice (length prj-files))) | 732 | (> choice (length prj-files))) |
| 733 | (setq choice (string-to-number | 733 | (setq choice (string-to-number |
| 734 | (read-from-minibuffer "Enter No. of your choice: ")))) | 734 | (read-from-minibuffer "Enter No. of your choice: ")))) |
| 735 | (set 'selected (nth (1- choice) prj-files)))) | 735 | (setq selected (nth (1- choice) prj-files)))) |
| 736 | 736 | ||
| 737 | ((= (length prj-files) 0) | 737 | ((= (length prj-files) 0) |
| 738 | ;; No project file in the current directory; ask user | 738 | ;; No project file in the current directory; ask user |
| @@ -742,7 +742,7 @@ is non-nil, prompt the user to select one. If none are found, return | |||
| 742 | (concat "project file [" ada-last-prj-file "]:") | 742 | (concat "project file [" ada-last-prj-file "]:") |
| 743 | nil ada-last-prj-file)) | 743 | nil ada-last-prj-file)) |
| 744 | (unless (string= ada-last-prj-file "") | 744 | (unless (string= ada-last-prj-file "") |
| 745 | (set 'selected ada-last-prj-file)))) | 745 | (setq selected ada-last-prj-file)))) |
| 746 | ))) | 746 | ))) |
| 747 | 747 | ||
| 748 | (or selected "default.adp") | 748 | (or selected "default.adp") |
| @@ -792,9 +792,9 @@ is non-nil, prompt the user to select one. If none are found, return | |||
| 792 | 792 | ||
| 793 | (setq prj-file (expand-file-name prj-file)) | 793 | (setq prj-file (expand-file-name prj-file)) |
| 794 | (if (string= (file-name-extension prj-file) "gpr") | 794 | (if (string= (file-name-extension prj-file) "gpr") |
| 795 | (set 'project (ada-gnat-parse-gpr project prj-file)) | 795 | (setq project (ada-gnat-parse-gpr project prj-file)) |
| 796 | 796 | ||
| 797 | (set 'project (ada-parse-prj-file-1 prj-file project)) | 797 | (setq project (ada-parse-prj-file-1 prj-file project)) |
| 798 | ) | 798 | ) |
| 799 | 799 | ||
| 800 | ;; Store the project properties | 800 | ;; Store the project properties |
| @@ -842,7 +842,7 @@ Return new value of PROJECT." | |||
| 842 | (substitute-in-file-name (match-string 2))))) | 842 | (substitute-in-file-name (match-string 2))))) |
| 843 | 843 | ||
| 844 | ((string= (match-string 1) "build_dir") | 844 | ((string= (match-string 1) "build_dir") |
| 845 | (set 'project | 845 | (setq project |
| 846 | (plist-put project 'build_dir | 846 | (plist-put project 'build_dir |
| 847 | (file-name-as-directory (match-string 2))))) | 847 | (file-name-as-directory (match-string 2))))) |
| 848 | 848 | ||
| @@ -884,7 +884,7 @@ Return new value of PROJECT." | |||
| 884 | 884 | ||
| 885 | (t | 885 | (t |
| 886 | ;; any other field in the file is just copied | 886 | ;; any other field in the file is just copied |
| 887 | (set 'project (plist-put project | 887 | (setq project (plist-put project |
| 888 | (intern (match-string 1)) | 888 | (intern (match-string 1)) |
| 889 | (match-string 2)))))) | 889 | (match-string 2)))))) |
| 890 | 890 | ||
| @@ -900,21 +900,21 @@ Return new value of PROJECT." | |||
| 900 | (let ((sep (plist-get project 'ada_project_path_sep))) | 900 | (let ((sep (plist-get project 'ada_project_path_sep))) |
| 901 | (setq ada_project_path (reverse ada_project_path)) | 901 | (setq ada_project_path (reverse ada_project_path)) |
| 902 | (setq ada_project_path (mapconcat 'identity ada_project_path sep)) | 902 | (setq ada_project_path (mapconcat 'identity ada_project_path sep)) |
| 903 | (set 'project (plist-put project 'ada_project_path ada_project_path)) | 903 | (setq project (plist-put project 'ada_project_path ada_project_path)) |
| 904 | ;; env var needed now for ada-gnat-parse-gpr | 904 | ;; env var needed now for ada-gnat-parse-gpr |
| 905 | (setenv "ADA_PROJECT_PATH" ada_project_path))) | 905 | (setenv "ADA_PROJECT_PATH" ada_project_path))) |
| 906 | 906 | ||
| 907 | (if debug_post_cmd (set 'project (plist-put project 'debug_post_cmd (reverse debug_post_cmd)))) | 907 | (if debug_post_cmd (setq project (plist-put project 'debug_post_cmd (reverse debug_post_cmd)))) |
| 908 | (if debug_pre_cmd (set 'project (plist-put project 'debug_pre_cmd (reverse debug_pre_cmd)))) | 908 | (if debug_pre_cmd (setq project (plist-put project 'debug_pre_cmd (reverse debug_pre_cmd)))) |
| 909 | (if casing (set 'project (plist-put project 'casing (reverse casing)))) | 909 | (if casing (setq project (plist-put project 'casing (reverse casing)))) |
| 910 | (if check_cmd (set 'project (plist-put project 'check_cmd (reverse check_cmd)))) | 910 | (if check_cmd (setq project (plist-put project 'check_cmd (reverse check_cmd)))) |
| 911 | (if comp_cmd (set 'project (plist-put project 'comp_cmd (reverse comp_cmd)))) | 911 | (if comp_cmd (setq project (plist-put project 'comp_cmd (reverse comp_cmd)))) |
| 912 | (if make_cmd (set 'project (plist-put project 'make_cmd (reverse make_cmd)))) | 912 | (if make_cmd (setq project (plist-put project 'make_cmd (reverse make_cmd)))) |
| 913 | (if run_cmd (set 'project (plist-put project 'run_cmd (reverse run_cmd)))) | 913 | (if run_cmd (setq project (plist-put project 'run_cmd (reverse run_cmd)))) |
| 914 | 914 | ||
| 915 | (if gpr_file | 915 | (if gpr_file |
| 916 | (progn | 916 | (progn |
| 917 | (set 'project (ada-gnat-parse-gpr project gpr_file)) | 917 | (setq project (ada-gnat-parse-gpr project gpr_file)) |
| 918 | ;; append Ada source and object directories to others from Emacs project file | 918 | ;; append Ada source and object directories to others from Emacs project file |
| 919 | (setq src_dir (append (plist-get project 'src_dir) src_dir)) | 919 | (setq src_dir (append (plist-get project 'src_dir) src_dir)) |
| 920 | (setq obj_dir (append (plist-get project 'obj_dir) obj_dir)) | 920 | (setq obj_dir (append (plist-get project 'obj_dir) obj_dir)) |
| @@ -930,8 +930,8 @@ Return new value of PROJECT." | |||
| 930 | (ada-initialize-runtime-library (or (ada-xref-get-project-field 'cross_prefix) "")) | 930 | (ada-initialize-runtime-library (or (ada-xref-get-project-field 'cross_prefix) "")) |
| 931 | ;;) | 931 | ;;) |
| 932 | 932 | ||
| 933 | (if obj_dir (set 'project (plist-put project 'obj_dir (reverse obj_dir)))) | 933 | (if obj_dir (setq project (plist-put project 'obj_dir (reverse obj_dir)))) |
| 934 | (if src_dir (set 'project (plist-put project 'src_dir (reverse src_dir)))) | 934 | (if src_dir (setq project (plist-put project 'src_dir (reverse src_dir)))) |
| 935 | 935 | ||
| 936 | project | 936 | project |
| 937 | )) | 937 | )) |
| @@ -1052,9 +1052,9 @@ existing buffer `*gnatfind*', if there is one." | |||
| 1052 | (if old-contents | 1052 | (if old-contents |
| 1053 | (progn | 1053 | (progn |
| 1054 | (goto-char 1) | 1054 | (goto-char 1) |
| 1055 | (set 'buffer-read-only nil) | 1055 | (setq buffer-read-only nil) |
| 1056 | (insert old-contents) | 1056 | (insert old-contents) |
| 1057 | (set 'buffer-read-only t) | 1057 | (setq buffer-read-only t) |
| 1058 | (goto-char (point-max))))) | 1058 | (goto-char (point-max))))) |
| 1059 | ) | 1059 | ) |
| 1060 | ) | 1060 | ) |
| @@ -1142,7 +1142,7 @@ If OTHER-FRAME is non-nil, display the cross-reference in another frame." | |||
| 1142 | (condition-case err | 1142 | (condition-case err |
| 1143 | (ada-find-in-ali identlist other-frame) | 1143 | (ada-find-in-ali identlist other-frame) |
| 1144 | ;; File not found: print explicit error message | 1144 | ;; File not found: print explicit error message |
| 1145 | (error-file-not-found | 1145 | (ada-error-file-not-found |
| 1146 | (message (concat (error-message-string err) | 1146 | (message (concat (error-message-string err) |
| 1147 | (nthcdr 1 err)))) | 1147 | (nthcdr 1 err)))) |
| 1148 | 1148 | ||
| @@ -1194,9 +1194,9 @@ project file." | |||
| 1194 | (objects (getenv "ADA_OBJECTS_PATH")) | 1194 | (objects (getenv "ADA_OBJECTS_PATH")) |
| 1195 | (build-dir (ada-xref-get-project-field 'build_dir))) | 1195 | (build-dir (ada-xref-get-project-field 'build_dir))) |
| 1196 | (if include | 1196 | (if include |
| 1197 | (set 'include (concat path-separator include))) | 1197 | (setq include (concat path-separator include))) |
| 1198 | (if objects | 1198 | (if objects |
| 1199 | (set 'objects (concat path-separator objects))) | 1199 | (setq objects (concat path-separator objects))) |
| 1200 | (cons | 1200 | (cons |
| 1201 | (concat "ADA_INCLUDE_PATH=" | 1201 | (concat "ADA_INCLUDE_PATH=" |
| 1202 | (mapconcat (lambda(x) (expand-file-name x build-dir)) | 1202 | (mapconcat (lambda(x) (expand-file-name x build-dir)) |
| @@ -1303,7 +1303,7 @@ If ARG is non-nil, ask for user confirmation." | |||
| 1303 | 1303 | ||
| 1304 | ;; Guess the command if it wasn't specified | 1304 | ;; Guess the command if it wasn't specified |
| 1305 | (if (not command) | 1305 | (if (not command) |
| 1306 | (set 'command (list (file-name-sans-extension (buffer-name))))) | 1306 | (setq command (list (file-name-sans-extension (buffer-name))))) |
| 1307 | 1307 | ||
| 1308 | ;; Modify the command to run remotely | 1308 | ;; Modify the command to run remotely |
| 1309 | (setq command (ada-remote (mapconcat 'identity command | 1309 | (setq command (ada-remote (mapconcat 'identity command |
| @@ -1316,7 +1316,7 @@ If ARG is non-nil, ask for user confirmation." | |||
| 1316 | 1316 | ||
| 1317 | ;; Run the command | 1317 | ;; Run the command |
| 1318 | (with-current-buffer (get-buffer-create "*run*") | 1318 | (with-current-buffer (get-buffer-create "*run*") |
| 1319 | (set 'buffer-read-only nil) | 1319 | (setq buffer-read-only nil) |
| 1320 | 1320 | ||
| 1321 | (erase-buffer) | 1321 | (erase-buffer) |
| 1322 | (start-process "run" (current-buffer) shell-file-name | 1322 | (start-process "run" (current-buffer) shell-file-name |
| @@ -1352,7 +1352,7 @@ project file." | |||
| 1352 | 1352 | ||
| 1353 | ;; If the command was not given in the project file, start a bare gdb | 1353 | ;; If the command was not given in the project file, start a bare gdb |
| 1354 | (if (not cmd) | 1354 | (if (not cmd) |
| 1355 | (set 'cmd (concat ada-prj-default-debugger | 1355 | (setq cmd (concat ada-prj-default-debugger |
| 1356 | " " | 1356 | " " |
| 1357 | (or executable-name | 1357 | (or executable-name |
| 1358 | (file-name-sans-extension (buffer-file-name)))))) | 1358 | (file-name-sans-extension (buffer-file-name)))))) |
| @@ -1368,18 +1368,18 @@ project file." | |||
| 1368 | ;; chance to fully manage it. Then it works fine with Enlightenment | 1368 | ;; chance to fully manage it. Then it works fine with Enlightenment |
| 1369 | ;; as well | 1369 | ;; as well |
| 1370 | (let ((frame (make-frame '((visibility . nil))))) | 1370 | (let ((frame (make-frame '((visibility . nil))))) |
| 1371 | (set 'cmd (concat | 1371 | (setq cmd (concat |
| 1372 | cmd " --editor-window=" | 1372 | cmd " --editor-window=" |
| 1373 | (cdr (assoc 'outer-window-id (frame-parameters frame))))) | 1373 | (cdr (assoc 'outer-window-id (frame-parameters frame))))) |
| 1374 | (select-frame frame))) | 1374 | (select-frame frame))) |
| 1375 | 1375 | ||
| 1376 | ;; Add a -fullname switch | 1376 | ;; Add a -fullname switch |
| 1377 | ;; Use the remote machine | 1377 | ;; Use the remote machine |
| 1378 | (set 'cmd (ada-remote (concat cmd " -fullname "))) | 1378 | (setq cmd (ada-remote (concat cmd " -fullname "))) |
| 1379 | 1379 | ||
| 1380 | ;; Ask for confirmation if required | 1380 | ;; Ask for confirmation if required |
| 1381 | (if (or arg ada-xref-confirm-compile) | 1381 | (if (or arg ada-xref-confirm-compile) |
| 1382 | (set 'cmd (read-from-minibuffer "enter command to debug: " cmd))) | 1382 | (setq cmd (read-from-minibuffer "enter command to debug: " cmd))) |
| 1383 | 1383 | ||
| 1384 | (let ((old-comint-exec (symbol-function 'comint-exec))) | 1384 | (let ((old-comint-exec (symbol-function 'comint-exec))) |
| 1385 | 1385 | ||
| @@ -1387,13 +1387,13 @@ project file." | |||
| 1387 | ;; FIXME: This is evil but luckily a nop under Emacs-21.3.50 ! -stef | 1387 | ;; FIXME: This is evil but luckily a nop under Emacs-21.3.50 ! -stef |
| 1388 | (fset 'gud-gdb-massage-args (lambda (_file args) args)) | 1388 | (fset 'gud-gdb-massage-args (lambda (_file args) args)) |
| 1389 | 1389 | ||
| 1390 | (set 'pre-cmd (mapconcat 'identity pre-cmd ada-command-separator)) | 1390 | (setq pre-cmd (mapconcat 'identity pre-cmd ada-command-separator)) |
| 1391 | (if (not (equal pre-cmd "")) | 1391 | (if (not (equal pre-cmd "")) |
| 1392 | (setq pre-cmd (concat pre-cmd ada-command-separator))) | 1392 | (setq pre-cmd (concat pre-cmd ada-command-separator))) |
| 1393 | 1393 | ||
| 1394 | (set 'post-cmd (mapconcat 'identity post-cmd "\n")) | 1394 | (setq post-cmd (mapconcat 'identity post-cmd "\n")) |
| 1395 | (if post-cmd | 1395 | (if post-cmd |
| 1396 | (set 'post-cmd (concat post-cmd "\n"))) | 1396 | (setq post-cmd (concat post-cmd "\n"))) |
| 1397 | 1397 | ||
| 1398 | 1398 | ||
| 1399 | ;; Temporarily replaces the definition of `comint-exec' so that we | 1399 | ;; Temporarily replaces the definition of `comint-exec' so that we |
| @@ -1403,7 +1403,7 @@ project file." | |||
| 1403 | `(lambda (buffer name command startfile switches) | 1403 | `(lambda (buffer name command startfile switches) |
| 1404 | (let (compilation-buffer-name-function) | 1404 | (let (compilation-buffer-name-function) |
| 1405 | (save-excursion | 1405 | (save-excursion |
| 1406 | (set 'compilation-buffer-name-function | 1406 | (setq compilation-buffer-name-function |
| 1407 | (lambda(x) (buffer-name buffer))) | 1407 | (lambda(x) (buffer-name buffer))) |
| 1408 | (compile (ada-quote-cmd | 1408 | (compile (ada-quote-cmd |
| 1409 | (concat ,pre-cmd | 1409 | (concat ,pre-cmd |
| @@ -1498,12 +1498,12 @@ by replacing the file extension with `.ali'." | |||
| 1498 | "Search for FILE in DIR-LIST." | 1498 | "Search for FILE in DIR-LIST." |
| 1499 | (let (found) | 1499 | (let (found) |
| 1500 | (while (and (not found) dir-list) | 1500 | (while (and (not found) dir-list) |
| 1501 | (set 'found (concat (file-name-as-directory (car dir-list)) | 1501 | (setq found (concat (file-name-as-directory (car dir-list)) |
| 1502 | (file-name-nondirectory file))) | 1502 | (file-name-nondirectory file))) |
| 1503 | 1503 | ||
| 1504 | (unless (file-exists-p found) | 1504 | (unless (file-exists-p found) |
| 1505 | (set 'found nil)) | 1505 | (setq found nil)) |
| 1506 | (set 'dir-list (cdr dir-list))) | 1506 | (setq dir-list (cdr dir-list))) |
| 1507 | found)) | 1507 | found)) |
| 1508 | 1508 | ||
| 1509 | (defun ada-find-ali-file-in-dir (file) | 1509 | (defun ada-find-ali-file-in-dir (file) |
| @@ -1558,11 +1558,11 @@ the project file." | |||
| 1558 | (while specs | 1558 | (while specs |
| 1559 | (if (string-match (concat (regexp-quote (car specs)) "$") | 1559 | (if (string-match (concat (regexp-quote (car specs)) "$") |
| 1560 | file) | 1560 | file) |
| 1561 | (set 'is-spec t)) | 1561 | (setq is-spec t)) |
| 1562 | (set 'specs (cdr specs))))) | 1562 | (setq specs (cdr specs))))) |
| 1563 | 1563 | ||
| 1564 | (if is-spec | 1564 | (if is-spec |
| 1565 | (set 'ali-file-name | 1565 | (setq ali-file-name |
| 1566 | (ada-find-ali-file-in-dir | 1566 | (ada-find-ali-file-in-dir |
| 1567 | (concat (file-name-base (ada-other-file-name)) ".ali")))) | 1567 | (concat (file-name-base (ada-other-file-name)) ".ali")))) |
| 1568 | 1568 | ||
| @@ -1589,8 +1589,8 @@ the project file." | |||
| 1589 | (while (and (not ali-file-name) | 1589 | (while (and (not ali-file-name) |
| 1590 | (string-match "^\\(.*\\)[.-][^.-]*" parent-name)) | 1590 | (string-match "^\\(.*\\)[.-][^.-]*" parent-name)) |
| 1591 | 1591 | ||
| 1592 | (set 'parent-name (match-string 1 parent-name)) | 1592 | (setq parent-name (match-string 1 parent-name)) |
| 1593 | (set 'ali-file-name (ada-find-ali-file-in-dir | 1593 | (setq ali-file-name (ada-find-ali-file-in-dir |
| 1594 | (concat parent-name ".ali"))) | 1594 | (concat parent-name ".ali"))) |
| 1595 | ) | 1595 | ) |
| 1596 | ali-file-name))) | 1596 | ali-file-name))) |
| @@ -1637,7 +1637,7 @@ Search in project file for possible paths." | |||
| 1637 | (let ((filename (ada-find-src-file-in-dir file))) | 1637 | (let ((filename (ada-find-src-file-in-dir file))) |
| 1638 | (if filename | 1638 | (if filename |
| 1639 | (expand-file-name filename) | 1639 | (expand-file-name filename) |
| 1640 | (signal 'error-file-not-found (file-name-nondirectory file))) | 1640 | (signal 'ada-error-file-not-found (file-name-nondirectory file))) |
| 1641 | ))) | 1641 | ))) |
| 1642 | 1642 | ||
| 1643 | (defun ada-find-file-number-in-ali (file) | 1643 | (defun ada-find-file-number-in-ali (file) |
| @@ -1686,18 +1686,18 @@ macros `ada-name-of', `ada-line-of', `ada-column-of', `ada-file-of',..." | |||
| 1686 | (if (and (= (char-before) ?\") | 1686 | (if (and (= (char-before) ?\") |
| 1687 | (= (char-after (+ (length (match-string 0)) (point))) ?\")) | 1687 | (= (char-after (+ (length (match-string 0)) (point))) ?\")) |
| 1688 | (forward-char -1)) | 1688 | (forward-char -1)) |
| 1689 | (set 'identifier (regexp-quote (concat "\"" (match-string 0) "\"")))) | 1689 | (setq identifier (regexp-quote (concat "\"" (match-string 0) "\"")))) |
| 1690 | 1690 | ||
| 1691 | (if (ada-in-string-p) | 1691 | (if (ada-in-string-p) |
| 1692 | (error "Inside string or character constant")) | 1692 | (error "Inside string or character constant")) |
| 1693 | (if (looking-at (concat ada-keywords "[^a-zA-Z_]")) | 1693 | (if (looking-at (concat ada-keywords "[^a-zA-Z_]")) |
| 1694 | (error "No cross-reference available for reserved keyword")) | 1694 | (error "No cross-reference available for reserved keyword")) |
| 1695 | (if (looking-at "[a-zA-Z0-9_]+") | 1695 | (if (looking-at "[a-zA-Z0-9_]+") |
| 1696 | (set 'identifier (match-string 0)) | 1696 | (setq identifier (match-string 0)) |
| 1697 | (error "No identifier around"))) | 1697 | (error "No identifier around"))) |
| 1698 | 1698 | ||
| 1699 | ;; Build the identlist | 1699 | ;; Build the identlist |
| 1700 | (set 'identlist (ada-make-identlist)) | 1700 | (setq identlist (ada-make-identlist)) |
| 1701 | (ada-set-name identlist (downcase identifier)) | 1701 | (ada-set-name identlist (downcase identifier)) |
| 1702 | (ada-set-line identlist | 1702 | (ada-set-line identlist |
| 1703 | (number-to-string (count-lines 1 (point)))) | 1703 | (number-to-string (count-lines 1 (point)))) |
| @@ -1725,7 +1725,7 @@ Information is extracted from the ali file." | |||
| 1725 | (concat "^X [0-9]+ " (file-name-nondirectory (ada-file-of identlist))) | 1725 | (concat "^X [0-9]+ " (file-name-nondirectory (ada-file-of identlist))) |
| 1726 | nil t) | 1726 | nil t) |
| 1727 | (let ((bound (save-excursion (re-search-forward "^X " nil t)))) | 1727 | (let ((bound (save-excursion (re-search-forward "^X " nil t)))) |
| 1728 | (set 'declaration-found | 1728 | (setq declaration-found |
| 1729 | (re-search-forward | 1729 | (re-search-forward |
| 1730 | (concat "^" (ada-line-of identlist) | 1730 | (concat "^" (ada-line-of identlist) |
| 1731 | "." (ada-column-of identlist) | 1731 | "." (ada-column-of identlist) |
| @@ -1743,7 +1743,7 @@ Information is extracted from the ali file." | |||
| 1743 | ;; Since we already know the number of the file, search for a direct | 1743 | ;; Since we already know the number of the file, search for a direct |
| 1744 | ;; reference to it | 1744 | ;; reference to it |
| 1745 | (goto-char (point-min)) | 1745 | (goto-char (point-min)) |
| 1746 | (set 'declaration-found t) | 1746 | (setq declaration-found t) |
| 1747 | (ada-set-ali-index | 1747 | (ada-set-ali-index |
| 1748 | identlist | 1748 | identlist |
| 1749 | (number-to-string (ada-find-file-number-in-ali | 1749 | (number-to-string (ada-find-file-number-in-ali |
| @@ -1771,7 +1771,7 @@ Information is extracted from the ali file." | |||
| 1771 | ;; If still not found, then either the declaration is unknown | 1771 | ;; If still not found, then either the declaration is unknown |
| 1772 | ;; or the source file has been modified since the ali file was | 1772 | ;; or the source file has been modified since the ali file was |
| 1773 | ;; created | 1773 | ;; created |
| 1774 | (set 'declaration-found nil) | 1774 | (setq declaration-found nil) |
| 1775 | ) | 1775 | ) |
| 1776 | ) | 1776 | ) |
| 1777 | 1777 | ||
| @@ -1786,7 +1786,7 @@ Information is extracted from the ali file." | |||
| 1786 | (beginning-of-line)) | 1786 | (beginning-of-line)) |
| 1787 | (unless (looking-at (concat "[0-9]+.[0-9]+[ *]" | 1787 | (unless (looking-at (concat "[0-9]+.[0-9]+[ *]" |
| 1788 | (ada-name-of identlist) "[ <{=\(\[]")) | 1788 | (ada-name-of identlist) "[ <{=\(\[]")) |
| 1789 | (set 'declaration-found nil)))) | 1789 | (setq declaration-found nil)))) |
| 1790 | 1790 | ||
| 1791 | ;; Still no success ! The ali file must be too old, and we need to | 1791 | ;; Still no success ! The ali file must be too old, and we need to |
| 1792 | ;; use a basic algorithm based on guesses. Note that this only happens | 1792 | ;; use a basic algorithm based on guesses. Note that this only happens |
| @@ -1794,7 +1794,7 @@ Information is extracted from the ali file." | |||
| 1794 | ;; automatically | 1794 | ;; automatically |
| 1795 | (unless declaration-found | 1795 | (unless declaration-found |
| 1796 | (if (ada-xref-find-in-modified-ali identlist) | 1796 | (if (ada-xref-find-in-modified-ali identlist) |
| 1797 | (set 'declaration-found t) | 1797 | (setq declaration-found t) |
| 1798 | ;; No more idea to find the declaration. Give up | 1798 | ;; No more idea to find the declaration. Give up |
| 1799 | (progn | 1799 | (progn |
| 1800 | (kill-buffer ali-buffer) | 1800 | (kill-buffer ali-buffer) |
| @@ -1814,7 +1814,7 @@ Information is extracted from the ali file." | |||
| 1814 | (forward-line 1) | 1814 | (forward-line 1) |
| 1815 | (beginning-of-line) | 1815 | (beginning-of-line) |
| 1816 | (while (looking-at "^\\.\\(.*\\)") | 1816 | (while (looking-at "^\\.\\(.*\\)") |
| 1817 | (set 'current-line (concat current-line (match-string 1))) | 1817 | (setq current-line (concat current-line (match-string 1))) |
| 1818 | (forward-line 1)) | 1818 | (forward-line 1)) |
| 1819 | ) | 1819 | ) |
| 1820 | 1820 | ||
| @@ -1828,7 +1828,7 @@ Information is extracted from the ali file." | |||
| 1828 | (ada-file-of identlist))) | 1828 | (ada-file-of identlist))) |
| 1829 | 1829 | ||
| 1830 | ;; Else clean up the ali file | 1830 | ;; Else clean up the ali file |
| 1831 | (error-file-not-found | 1831 | (ada-error-file-not-found |
| 1832 | (signal (car err) (cdr err))) | 1832 | (signal (car err) (cdr err))) |
| 1833 | (error | 1833 | (error |
| 1834 | (kill-buffer ali-buffer) | 1834 | (kill-buffer ali-buffer) |
| @@ -1860,7 +1860,7 @@ This function is disabled for operators, and only works for identifiers." | |||
| 1860 | (goto-char (point-max)) | 1860 | (goto-char (point-max)) |
| 1861 | (while (re-search-backward my-regexp nil t) | 1861 | (while (re-search-backward my-regexp nil t) |
| 1862 | (save-excursion | 1862 | (save-excursion |
| 1863 | (set 'line-ali (count-lines 1 (point))) | 1863 | (setq line-ali (count-lines 1 (point))) |
| 1864 | (beginning-of-line) | 1864 | (beginning-of-line) |
| 1865 | ;; have a look at the line and column numbers | 1865 | ;; have a look at the line and column numbers |
| 1866 | (if (looking-at "^\\([0-9]+\\).\\([0-9]+\\)[ *]") | 1866 | (if (looking-at "^\\([0-9]+\\).\\([0-9]+\\)[ *]") |
| @@ -1948,7 +1948,7 @@ opens a new window to show the declaration." | |||
| 1948 | 1948 | ||
| 1949 | ;; Get all the possible locations | 1949 | ;; Get all the possible locations |
| 1950 | (string-match "^\\([0-9]+\\)[a-zA-Z+*]\\([0-9]+\\)[ *]" ali-line) | 1950 | (string-match "^\\([0-9]+\\)[a-zA-Z+*]\\([0-9]+\\)[ *]" ali-line) |
| 1951 | (set 'locations (list (list (match-string 1 ali-line) ;; line | 1951 | (setq locations (list (list (match-string 1 ali-line) ;; line |
| 1952 | (match-string 2 ali-line) ;; column | 1952 | (match-string 2 ali-line) ;; column |
| 1953 | (ada-declare-file-of identlist)))) | 1953 | (ada-declare-file-of identlist)))) |
| 1954 | (while (string-match "\\([0-9]+\\)[bc]\\(<[^>]+>\\)?\\([0-9]+\\)" | 1954 | (while (string-match "\\([0-9]+\\)[bc]\\(<[^>]+>\\)?\\([0-9]+\\)" |
| @@ -1968,16 +1968,16 @@ opens a new window to show the declaration." | |||
| 1968 | (goto-char (point-min)) | 1968 | (goto-char (point-min)) |
| 1969 | (re-search-forward "^D \\([a-zA-Z0-9_.-]+\\)" nil t | 1969 | (re-search-forward "^D \\([a-zA-Z0-9_.-]+\\)" nil t |
| 1970 | (string-to-number file-number)) | 1970 | (string-to-number file-number)) |
| 1971 | (set 'file (match-string 1)) | 1971 | (setq file (match-string 1)) |
| 1972 | ) | 1972 | ) |
| 1973 | ;; Else get the nearest file | 1973 | ;; Else get the nearest file |
| 1974 | (set 'file (ada-declare-file-of identlist))) | 1974 | (setq file (ada-declare-file-of identlist))) |
| 1975 | 1975 | ||
| 1976 | (set 'locations (append locations (list (list line col file))))) | 1976 | (setq locations (append locations (list (list line col file))))) |
| 1977 | 1977 | ||
| 1978 | ;; Add the specs at the end again, so that from the last body we go to | 1978 | ;; Add the specs at the end again, so that from the last body we go to |
| 1979 | ;; the specs | 1979 | ;; the specs |
| 1980 | (set 'locations (append locations (list (car locations)))) | 1980 | (setq locations (append locations (list (car locations)))) |
| 1981 | 1981 | ||
| 1982 | ;; Find the new location we want to go to. | 1982 | ;; Find the new location we want to go to. |
| 1983 | ;; If we are on none of the locations listed, we simply go to the specs. | 1983 | ;; If we are on none of the locations listed, we simply go to the specs. |
| @@ -1996,10 +1996,10 @@ opens a new window to show the declaration." | |||
| 1996 | col (nth 1 locations) | 1996 | col (nth 1 locations) |
| 1997 | file (nth 2 locations) | 1997 | file (nth 2 locations) |
| 1998 | locations nil) | 1998 | locations nil) |
| 1999 | (set 'locations (cdr locations)))) | 1999 | (setq locations (cdr locations)))) |
| 2000 | 2000 | ||
| 2001 | ;; Find the file in the source path | 2001 | ;; Find the file in the source path |
| 2002 | (set 'file (ada-get-ada-file-name file (ada-file-of identlist))) | 2002 | (setq file (ada-get-ada-file-name file (ada-file-of identlist))) |
| 2003 | 2003 | ||
| 2004 | ;; Kill the .ali buffer | 2004 | ;; Kill the .ali buffer |
| 2005 | (kill-buffer (current-buffer)) | 2005 | (kill-buffer (current-buffer)) |
| @@ -2044,10 +2044,10 @@ the declaration and documentation of the subprograms one is using." | |||
| 2044 | " " | 2044 | " " |
| 2045 | (shell-quote-argument (file-name-as-directory (car dirs))) | 2045 | (shell-quote-argument (file-name-as-directory (car dirs))) |
| 2046 | "*.ali"))) | 2046 | "*.ali"))) |
| 2047 | (set 'dirs (cdr dirs))) | 2047 | (setq dirs (cdr dirs))) |
| 2048 | 2048 | ||
| 2049 | ;; Now parse the output | 2049 | ;; Now parse the output |
| 2050 | (set 'case-fold-search t) | 2050 | (setq case-fold-search t) |
| 2051 | (goto-char (point-min)) | 2051 | (goto-char (point-min)) |
| 2052 | (while (re-search-forward regexp nil t) | 2052 | (while (re-search-forward regexp nil t) |
| 2053 | (save-excursion | 2053 | (save-excursion |
| @@ -2058,12 +2058,12 @@ the declaration and documentation of the subprograms one is using." | |||
| 2058 | (setq line (match-string 1) | 2058 | (setq line (match-string 1) |
| 2059 | column (match-string 2)) | 2059 | column (match-string 2)) |
| 2060 | (re-search-backward "^X [0-9]+ \\(.*\\)$") | 2060 | (re-search-backward "^X [0-9]+ \\(.*\\)$") |
| 2061 | (set 'file (list (match-string 1) line column)) | 2061 | (setq file (list (match-string 1) line column)) |
| 2062 | 2062 | ||
| 2063 | ;; There could be duplicate choices, because of the structure | 2063 | ;; There could be duplicate choices, because of the structure |
| 2064 | ;; of the .ali files | 2064 | ;; of the .ali files |
| 2065 | (unless (member file list) | 2065 | (unless (member file list) |
| 2066 | (set 'list (append list (list file)))))))) | 2066 | (setq list (append list (list file)))))))) |
| 2067 | 2067 | ||
| 2068 | ;; Current buffer is still "*grep*" | 2068 | ;; Current buffer is still "*grep*" |
| 2069 | (kill-buffer "*grep*") | 2069 | (kill-buffer "*grep*") |
| @@ -2078,7 +2078,7 @@ the declaration and documentation of the subprograms one is using." | |||
| 2078 | 2078 | ||
| 2079 | ;; Only one choice => Do the cross-reference | 2079 | ;; Only one choice => Do the cross-reference |
| 2080 | ((= (length list) 1) | 2080 | ((= (length list) 1) |
| 2081 | (set 'file (ada-find-src-file-in-dir (caar list))) | 2081 | (setq file (ada-find-src-file-in-dir (caar list))) |
| 2082 | (if file | 2082 | (if file |
| 2083 | (ada-xref-change-buffer file | 2083 | (ada-xref-change-buffer file |
| 2084 | (string-to-number (nth 1 (car list))) | 2084 | (string-to-number (nth 1 (car list))) |
| @@ -2117,17 +2117,17 @@ the declaration and documentation of the subprograms one is using." | |||
| 2117 | (string-to-number | 2117 | (string-to-number |
| 2118 | (read-from-minibuffer "Enter No. of your choice: ")))) | 2118 | (read-from-minibuffer "Enter No. of your choice: ")))) |
| 2119 | ) | 2119 | ) |
| 2120 | (set 'choice (1- choice)) | 2120 | (setq choice (1- choice)) |
| 2121 | (kill-buffer "*choice list*") | 2121 | (kill-buffer "*choice list*") |
| 2122 | 2122 | ||
| 2123 | (set 'file (ada-find-src-file-in-dir (car (nth choice list)))) | 2123 | (setq file (ada-find-src-file-in-dir (car (nth choice list)))) |
| 2124 | (if file | 2124 | (if file |
| 2125 | (ada-xref-change-buffer file | 2125 | (ada-xref-change-buffer file |
| 2126 | (string-to-number (nth 1 (nth choice list))) | 2126 | (string-to-number (nth 1 (nth choice list))) |
| 2127 | (string-to-number (nth 2 (nth choice list))) | 2127 | (string-to-number (nth 2 (nth choice list))) |
| 2128 | identlist | 2128 | identlist |
| 2129 | other-frame) | 2129 | other-frame) |
| 2130 | (signal 'error-file-not-found (car (nth choice list)))) | 2130 | (signal 'ada-error-file-not-found (car (nth choice list)))) |
| 2131 | (message "This is only a (good) guess at the cross-reference.") | 2131 | (message "This is only a (good) guess at the cross-reference.") |
| 2132 | )))) | 2132 | )))) |
| 2133 | 2133 | ||
| @@ -2144,7 +2144,7 @@ If OTHER-FRAME is non-nil, creates a new frame to show the file." | |||
| 2144 | (if ada-xref-other-buffer | 2144 | (if ada-xref-other-buffer |
| 2145 | (if other-frame | 2145 | (if other-frame |
| 2146 | (find-file-other-frame file) | 2146 | (find-file-other-frame file) |
| 2147 | (set 'declaration-buffer (find-file-noselect file)) | 2147 | (setq declaration-buffer (find-file-noselect file)) |
| 2148 | (set-buffer declaration-buffer) | 2148 | (set-buffer declaration-buffer) |
| 2149 | (switch-to-buffer-other-window declaration-buffer) | 2149 | (switch-to-buffer-other-window declaration-buffer) |
| 2150 | ) | 2150 | ) |
| @@ -2362,12 +2362,8 @@ For instance, it creates the gnat-specific menus, sets some hooks for | |||
| 2362 | (add-hook 'ada-mode-hook 'ada-xref-initialize) | 2362 | (add-hook 'ada-mode-hook 'ada-xref-initialize) |
| 2363 | 2363 | ||
| 2364 | ;; Define a new error type | 2364 | ;; Define a new error type |
| 2365 | (put 'error-file-not-found | 2365 | (define-error 'ada-error-file-not-found |
| 2366 | 'error-conditions | 2366 | "File not found in src-dir (check project file): " 'ada-mode-errors) |
| 2367 | '(error ada-mode-errors error-file-not-found)) | ||
| 2368 | (put 'error-file-not-found | ||
| 2369 | 'error-message | ||
| 2370 | "File not found in src-dir (check project file): ") | ||
| 2371 | 2367 | ||
| 2372 | (provide 'ada-xref) | 2368 | (provide 'ada-xref) |
| 2373 | 2369 | ||
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 56680f23a8e..bf90db54002 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el | |||
| @@ -178,10 +178,6 @@ | |||
| 178 | (set-buffer-modified-p nil))))))) | 178 | (set-buffer-modified-p nil))))))) |
| 179 | (put 'save-buffer-state-x 'lisp-indent-function 0) | 179 | (put 'save-buffer-state-x 'lisp-indent-function 0) |
| 180 | 180 | ||
| 181 | ;; get rid of byte-compile warnings | ||
| 182 | (eval-when-compile | ||
| 183 | (require 'cc-mode)) | ||
| 184 | |||
| 185 | (defvar outline-level) | 181 | (defvar outline-level) |
| 186 | (defvar imenu-use-markers) | 182 | (defvar imenu-use-markers) |
| 187 | (defvar imenu-create-index-function) | 183 | (defvar imenu-create-index-function) |
diff --git a/lisp/progmodes/bat-mode.el b/lisp/progmodes/bat-mode.el new file mode 100644 index 00000000000..60b332170b0 --- /dev/null +++ b/lisp/progmodes/bat-mode.el | |||
| @@ -0,0 +1,186 @@ | |||
| 1 | ;;; bat-mode.el --- Major mode for editing DOS/Windows scripts | ||
| 2 | |||
| 3 | ;; Copyright (C) 2003, 2008-2013 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Author: Arni Magnusson <arnima@hafro.is> | ||
| 6 | ;; Keywords: languages | ||
| 7 | |||
| 8 | ;; This file is part of GNU Emacs. | ||
| 9 | |||
| 10 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 11 | ;; it under the terms of the GNU General Public License as published by | ||
| 12 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 13 | ;; (at your option) any later version. | ||
| 14 | |||
| 15 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | ;; GNU General Public License for more details. | ||
| 19 | |||
| 20 | ;; You should have received a copy of the GNU General Public License | ||
| 21 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 22 | |||
| 23 | ;;; Commentary: | ||
| 24 | ;; | ||
| 25 | ;; Major mode for editing DOS/Windows scripts (batch files). Provides syntax | ||
| 26 | ;; highlighting, a basic template, access to DOS help pages, imenu/outline | ||
| 27 | ;; navigation, and the ability to run scripts from within Emacs. The syntax | ||
| 28 | ;; groups for highlighting are: | ||
| 29 | ;; | ||
| 30 | ;; Face Example | ||
| 31 | ;; bat-label-face :LABEL | ||
| 32 | ;; font-lock-comment-face rem | ||
| 33 | ;; font-lock-builtin-face copy | ||
| 34 | ;; font-lock-keyword-face goto | ||
| 35 | ;; font-lock-warning-face cp | ||
| 36 | ;; font-lock-constant-face [call] prog | ||
| 37 | ;; font-lock-variable-name-face %var% | ||
| 38 | ;; font-lock-type-face -option | ||
| 39 | ;; | ||
| 40 | ;; Usage: | ||
| 41 | ;; | ||
| 42 | ;; See documentation of function `bat-mode'. | ||
| 43 | ;; | ||
| 44 | ;; Separate package `dos-indent' (Matthew Fidler) provides rudimentary | ||
| 45 | ;; indentation, see http://www.emacswiki.org/emacs/dos-indent.el. | ||
| 46 | ;; | ||
| 47 | ;; Acknowledgements: | ||
| 48 | ;; | ||
| 49 | ;; Inspired by `batch-mode' (Agnar Renolen) and `cmd-mode' (Tadamegu Furukawa). | ||
| 50 | |||
| 51 | ;;; Code: | ||
| 52 | |||
| 53 | ;; 1 Preamble | ||
| 54 | |||
| 55 | (defgroup bat-mode nil | ||
| 56 | "Major mode for editing DOS/Windows batch files." | ||
| 57 | :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces) | ||
| 58 | :group 'languages) | ||
| 59 | |||
| 60 | ;; 2 User variables | ||
| 61 | |||
| 62 | (defface bat-label-face '((t :weight bold)) | ||
| 63 | "Font Lock mode face used to highlight labels in batch files.") | ||
| 64 | |||
| 65 | ;; 3 Internal variables | ||
| 66 | |||
| 67 | (defvar bat-font-lock-keywords | ||
| 68 | (eval-when-compile | ||
| 69 | (let ((COMMANDS | ||
| 70 | '("assoc" "at" "attrib" "cd" "cls" "color" "copy" "date" "del" "dir" | ||
| 71 | "doskey" "echo" "endlocal" "erase" "fc" "find" "findstr" "format" | ||
| 72 | "ftype" "label" "md" "mkdir" "more" "move" "net" "path" "pause" | ||
| 73 | "popd" "prompt" "pushd" "rd" "ren" "rename" "replace" "rmdir" "set" | ||
| 74 | "setlocal" "shift" "sort" "subst" "time" "title" "tree" "type" | ||
| 75 | "ver" "vol" "xcopy")) | ||
| 76 | (CONTROLFLOW | ||
| 77 | '("call" "cmd" "defined" "do" "else" "equ" "exist" "exit" "for" "geq" | ||
| 78 | "goto" "gtr" "if" "in" "leq" "lss" "neq" "not" "start")) | ||
| 79 | (UNIX | ||
| 80 | '("bash" "cat" "cp" "fgrep" "grep" "ls" "sed" "sh" "mv" "rm"))) | ||
| 81 | `(("\\<_\\(call\\|goto\\)\\_>[ \t]+%?\\([A-Za-z0-9-_\\:.]+\\)%?" | ||
| 82 | (2 font-lock-constant-face t)) | ||
| 83 | ("^:[^:].*" | ||
| 84 | . 'bat-label-face) | ||
| 85 | ("\\<_\\(defined\\|set\\)\\_>[ \t]*\\(\\w+\\)" | ||
| 86 | (2 font-lock-variable-name-face)) | ||
| 87 | ("%\\(\\w+\\)%?" | ||
| 88 | (1 font-lock-variable-name-face)) | ||
| 89 | ("!\\(\\w+\\)!?" ; delayed-expansion !variable! | ||
| 90 | (1 font-lock-variable-name-face)) | ||
| 91 | ("[ =][-/]+\\(\\w+\\)" | ||
| 92 | (1 font-lock-type-face append)) | ||
| 93 | (,(concat "\\_<" (regexp-opt COMMANDS) "\\_>") . font-lock-builtin-face) | ||
| 94 | (,(concat "\\_<" (regexp-opt CONTROLFLOW) "\\_>") | ||
| 95 | . font-lock-keyword-face) | ||
| 96 | (,(concat "\\_<" (regexp-opt UNIX) "\\_>") | ||
| 97 | . font-lock-warning-face))))) | ||
| 98 | |||
| 99 | (defvar bat-menu | ||
| 100 | '("Bat" | ||
| 101 | ["Run" bat-run :help "Run script"] | ||
| 102 | ["Run with Args" bat-run-args :help "Run script with args"] | ||
| 103 | "--" | ||
| 104 | ["Imenu" imenu :help "Navigate with imenu"] | ||
| 105 | "--" | ||
| 106 | ["Template" bat-template :help "Insert template"] | ||
| 107 | "--" | ||
| 108 | ["Help (Command)" bat-cmd-help :help "Show help page for DOS command"])) | ||
| 109 | |||
| 110 | (defvar bat-mode-map | ||
| 111 | (let ((map (make-sparse-keymap))) | ||
| 112 | (easy-menu-define nil map nil bat-menu) | ||
| 113 | (define-key map [?\C-c ?\C-/] 'bat-cmd-help) ;FIXME: Why not C-c C-? ? | ||
| 114 | (define-key map [?\C-c ?\C-a] 'bat-run-args) | ||
| 115 | (define-key map [?\C-c ?\C-c] 'bat-run) | ||
| 116 | (define-key map [?\C-c ?\C-t] 'bat-template) | ||
| 117 | (define-key map [?\C-c ?\C-v] 'bat-run) | ||
| 118 | map)) | ||
| 119 | |||
| 120 | (defvar bat-mode-syntax-table | ||
| 121 | (let ((table (make-syntax-table))) | ||
| 122 | (modify-syntax-entry ?\n ">" table) | ||
| 123 | (modify-syntax-entry ?\" "\"" table) | ||
| 124 | ;; Beware: `w' should not be used for non-alphabetic chars. | ||
| 125 | (modify-syntax-entry ?~ "_" table) | ||
| 126 | (modify-syntax-entry ?% "." table) | ||
| 127 | (modify-syntax-entry ?- "_" table) | ||
| 128 | (modify-syntax-entry ?_ "_" table) | ||
| 129 | ;; FIXME: { and } can appear in identifiers? Really? | ||
| 130 | (modify-syntax-entry ?{ "_" table) | ||
| 131 | (modify-syntax-entry ?} "_" table) | ||
| 132 | (modify-syntax-entry ?\\ "." table) | ||
| 133 | table)) | ||
| 134 | |||
| 135 | (defconst bat--syntax-propertize | ||
| 136 | (syntax-propertize-rules | ||
| 137 | ("^[ \t]*\\(?:\\(@?r\\)em\\_>\\|\\(?1::\\):\\).*" (1 "<")))) | ||
| 138 | |||
| 139 | ;; 4 User functions | ||
| 140 | |||
| 141 | (defun bat-cmd-help (cmd) | ||
| 142 | "Show help for batch file command CMD." | ||
| 143 | (interactive "sHelp: ") | ||
| 144 | (if (string-equal cmd "net") | ||
| 145 | ;; FIXME: liable to quoting nightmare. Use call-process? | ||
| 146 | (shell-command "net /?") (shell-command (concat "help " cmd)))) | ||
| 147 | |||
| 148 | (defun bat-run () | ||
| 149 | "Run a batch file." | ||
| 150 | (interactive) | ||
| 151 | ;; FIXME: liable to quoting nightmare. Use call/start-process? | ||
| 152 | (save-buffer) (shell-command buffer-file-name)) | ||
| 153 | |||
| 154 | (defun bat-run-args (args) | ||
| 155 | "Run a batch file with ARGS." | ||
| 156 | (interactive "sArgs: ") | ||
| 157 | ;; FIXME: Use `compile'? | ||
| 158 | (shell-command (concat buffer-file-name " " args))) | ||
| 159 | |||
| 160 | (defun bat-template () | ||
| 161 | "Insert minimal batch file template." | ||
| 162 | (interactive) | ||
| 163 | (goto-char (point-min)) (insert "@echo off\nsetlocal\n\n")) | ||
| 164 | |||
| 165 | ;;;###autoload | ||
| 166 | (add-to-list 'auto-mode-alist '("\\.\\(bat\\|cmd\\)\\'" . bat-mode)) | ||
| 167 | |||
| 168 | ;; 5 Main function | ||
| 169 | |||
| 170 | ;;;###autoload | ||
| 171 | (define-derived-mode bat-mode prog-mode "Bat" | ||
| 172 | "Major mode for editing DOS/Windows batch files.\n | ||
| 173 | Start a new script from `bat-template'. Read help pages for DOS commands | ||
| 174 | with `bat-cmd-help'. Navigate between sections using `imenu'. | ||
| 175 | Run script using `bat-run' and `bat-run-args'.\n | ||
| 176 | \\{bat-mode-map}" | ||
| 177 | (setq-local comment-start "rem ") | ||
| 178 | (setq-local syntax-propertize-function bat--syntax-propertize) | ||
| 179 | (setq-local font-lock-defaults | ||
| 180 | '(bat-font-lock-keywords nil t)) ; case-insensitive keywords | ||
| 181 | (setq-local imenu-generic-expression '((nil "^:[^:].*" 0))) | ||
| 182 | (setq-local outline-regexp ":[^:]")) | ||
| 183 | |||
| 184 | (provide 'bat-mode) | ||
| 185 | |||
| 186 | ;;; bat-mode.el ends here | ||
diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el index 4b3fc91b0ff..b5216b43ed9 100644 --- a/lisp/progmodes/cc-awk.el +++ b/lisp/progmodes/cc-awk.el | |||
| @@ -169,9 +169,9 @@ | |||
| 169 | (concat "\\=_?\"" c-awk-string-innards-re)) | 169 | (concat "\\=_?\"" c-awk-string-innards-re)) |
| 170 | ;; Matches an AWK string at point up to, but not including, any terminator. | 170 | ;; Matches an AWK string at point up to, but not including, any terminator. |
| 171 | ;; A gawk 3.1+ string may look like _"localizable string". | 171 | ;; A gawk 3.1+ string may look like _"localizable string". |
| 172 | (defconst c-awk-one-line-possibly-open-string-re | 172 | (defconst c-awk-possibly-open-string-re |
| 173 | (concat "\"\\(" c-awk-string-ch-re "\\|" c-awk-non-eol-esc-pair-re "\\)*" | 173 | (concat "\"\\(" c-awk-string-ch-re "\\|" c-awk-esc-pair-re "\\)*" |
| 174 | "\\(\"\\|\\\\?$\\|\\'\\)")) | 174 | "\\(\"\\|$\\|\\'\\)")) |
| 175 | 175 | ||
| 176 | ;; REGEXPS FOR AWK REGEXPS. | 176 | ;; REGEXPS FOR AWK REGEXPS. |
| 177 | (defconst c-awk-regexp-normal-re "[^[/\\\n\r]") | 177 | (defconst c-awk-regexp-normal-re "[^[/\\\n\r]") |
| @@ -192,25 +192,13 @@ | |||
| 192 | "\\|" "[^]\n\r]" "\\)*" "\\(]\\|$\\)")) | 192 | "\\|" "[^]\n\r]" "\\)*" "\\(]\\|$\\)")) |
| 193 | ;; Matches a regexp char list, up to (but not including) EOL if the ] is | 193 | ;; Matches a regexp char list, up to (but not including) EOL if the ] is |
| 194 | ;; missing. | 194 | ;; missing. |
| 195 | (defconst c-awk-regexp-one-line-possibly-open-char-list-re | ||
| 196 | (concat "\\[\\]?\\(" c-awk-non-eol-esc-pair-re "\\|" "[^]\n\r]" "\\)*" | ||
| 197 | "\\(]\\|\\\\?$\\|\\'\\)")) | ||
| 198 | ;; Matches the head (or all) of a regexp char class, up to (but not | ||
| 199 | ;; including) the first EOL. | ||
| 200 | (defconst c-awk-regexp-innards-re | 195 | (defconst c-awk-regexp-innards-re |
| 201 | (concat "\\(" c-awk-esc-pair-re "\\|" c-awk-regexp-char-list-re | 196 | (concat "\\(" c-awk-esc-pair-re "\\|" c-awk-regexp-char-list-re |
| 202 | "\\|" c-awk-regexp-normal-re "\\)*")) | 197 | "\\|" c-awk-regexp-normal-re "\\)*")) |
| 203 | ;; Matches the inside of an AWK regexp (i.e. without the enclosing /s) | 198 | ;; Matches the inside of an AWK regexp (i.e. without the enclosing /s) |
| 204 | (defconst c-awk-regexp-without-end-re | 199 | (defconst c-awk-regexp-without-end-re |
| 205 | (concat "/" c-awk-regexp-innards-re)) | 200 | (concat "/" c-awk-regexp-innards-re)) |
| 206 | ;; Matches an AWK regexp up to, but not including, any terminating /. | 201 | ;; Matches an AWK regexp up to, but not including, any terminating /. |
| 207 | (defconst c-awk-one-line-possibly-open-regexp-re | ||
| 208 | (concat "/\\(" c-awk-non-eol-esc-pair-re | ||
| 209 | "\\|" c-awk-regexp-one-line-possibly-open-char-list-re | ||
| 210 | "\\|" c-awk-regexp-normal-re "\\)*" | ||
| 211 | "\\(/\\|\\\\?$\\|\\'\\)")) | ||
| 212 | ;; Matches as much of the head of an AWK regexp which fits on one line, | ||
| 213 | ;; possibly all of it. | ||
| 214 | 202 | ||
| 215 | ;; REGEXPS used for scanning an AWK buffer in order to decide IF A '/' IS A | 203 | ;; REGEXPS used for scanning an AWK buffer in order to decide IF A '/' IS A |
| 216 | ;; REGEXP OPENER OR A DIVISION SIGN. By "state" in the following is meant | 204 | ;; REGEXP OPENER OR A DIVISION SIGN. By "state" in the following is meant |
| @@ -262,15 +250,24 @@ | |||
| 262 | 250 | ||
| 263 | ;; REGEXPS USED FOR FINDING THE POSITION OF A "virtual semicolon" | 251 | ;; REGEXPS USED FOR FINDING THE POSITION OF A "virtual semicolon" |
| 264 | (defconst c-awk-_-harmless-nonws-char-re "[^#/\"\\\\\n\r \t]") | 252 | (defconst c-awk-_-harmless-nonws-char-re "[^#/\"\\\\\n\r \t]") |
| 265 | ;; NEW VERSION! (which will be restricted to the current line) | 253 | (defconst c-awk-non-/-syn-ws*-re |
| 266 | (defconst c-awk-one-line-non-syn-ws*-re | 254 | (concat |
| 267 | (concat "\\([ \t]*" | 255 | "\\(" c-awk-escaped-nls*-with-space* |
| 268 | "\\(" c-awk-_-harmless-nonws-char-re "\\|" | 256 | "\\(" c-awk-_-harmless-nonws-char-re "\\|" |
| 269 | c-awk-non-eol-esc-pair-re "\\|" | 257 | c-awk-non-eol-esc-pair-re "\\|" |
| 270 | c-awk-one-line-possibly-open-string-re "\\|" | 258 | c-awk-possibly-open-string-re |
| 271 | c-awk-one-line-possibly-open-regexp-re | 259 | "\\)" |
| 272 | "\\)" | 260 | "\\)*")) |
| 273 | "\\)*")) | 261 | (defconst c-awk-space*-/-re (concat c-awk-escaped-nls*-with-space* "/")) |
| 262 | ;; Matches optional whitespace followed by "/". | ||
| 263 | (defconst c-awk-space*-regexp-/-re | ||
| 264 | (concat c-awk-escaped-nls*-with-space* "\\s\"")) | ||
| 265 | ;; Matches optional whitespace followed by a "/" with string syntax (a matched | ||
| 266 | ;; regexp delimiter). | ||
| 267 | (defconst c-awk-space*-unclosed-regexp-/-re | ||
| 268 | (concat c-awk-escaped-nls*-with-space* "\\s\|")) | ||
| 269 | ;; Matches optional whitespace followed by a "/" with string fence syntax (an | ||
| 270 | ;; unmatched regexp delimiter). | ||
| 274 | 271 | ||
| 275 | 272 | ||
| 276 | ;; ACM, 2002/5/29: | 273 | ;; ACM, 2002/5/29: |
| @@ -549,10 +546,36 @@ | |||
| 549 | (defun c-awk-at-vsemi-p (&optional pos) | 546 | (defun c-awk-at-vsemi-p (&optional pos) |
| 550 | ;; Is there a virtual semicolon at POS (or POINT)? | 547 | ;; Is there a virtual semicolon at POS (or POINT)? |
| 551 | (save-excursion | 548 | (save-excursion |
| 552 | (let (nl-prop | 549 | (let* (nl-prop |
| 553 | (pos-or-point (progn (if pos (goto-char pos)) (point)))) | 550 | (pos-or-point (progn (if pos (goto-char pos)) (point))) |
| 554 | (forward-line 0) | 551 | (bol (c-point 'bol)) (eol (c-point 'eol))) |
| 555 | (search-forward-regexp c-awk-one-line-non-syn-ws*-re) | 552 | (c-awk-beginning-of-logical-line) |
| 553 | ;; Next `while' goes round one logical line (ending in, e.g. "\\") per | ||
| 554 | ;; iteration. Such a line is rare, and can only be an open string | ||
| 555 | ;; ending in an escaped \. | ||
| 556 | (while | ||
| 557 | (progn | ||
| 558 | ;; Next `while' goes over a division sign or /regexp/ per iteration. | ||
| 559 | (while | ||
| 560 | (and | ||
| 561 | (< (point) eol) | ||
| 562 | (progn | ||
| 563 | (search-forward-regexp c-awk-non-/-syn-ws*-re eol) | ||
| 564 | (looking-at c-awk-space*-/-re))) | ||
| 565 | (cond | ||
| 566 | ((looking-at c-awk-space*-regexp-/-re) ; /regexp/ | ||
| 567 | (forward-sexp)) | ||
| 568 | ((looking-at c-awk-space*-unclosed-regexp-/-re) ; Unclosed /regexp | ||
| 569 | (condition-case nil | ||
| 570 | (progn | ||
| 571 | (forward-sexp) | ||
| 572 | (backward-char)) ; Move to end of (logical) line. | ||
| 573 | (error (end-of-line)))) ; Happens at EOB. | ||
| 574 | (t ; division sign | ||
| 575 | (c-forward-syntactic-ws) | ||
| 576 | (forward-char)))) | ||
| 577 | (< (point) bol)) | ||
| 578 | (forward-line)) | ||
| 556 | (and (eq (point) pos-or-point) | 579 | (and (eq (point) pos-or-point) |
| 557 | (progn | 580 | (progn |
| 558 | (while (and (eq (setq nl-prop (c-awk-get-NL-prop-cur-line)) ?\\) | 581 | (while (and (eq (setq nl-prop (c-awk-get-NL-prop-cur-line)) ?\\) |
diff --git a/lisp/progmodes/cc-bytecomp.el b/lisp/progmodes/cc-bytecomp.el index 337a5292417..c9835bbefe2 100644 --- a/lisp/progmodes/cc-bytecomp.el +++ b/lisp/progmodes/cc-bytecomp.el | |||
| @@ -244,7 +244,9 @@ Having cyclic cc-require's will result in infinite recursion. That's | |||
| 244 | somewhat intentional." | 244 | somewhat intentional." |
| 245 | `(progn | 245 | `(progn |
| 246 | (eval-when-compile | 246 | (eval-when-compile |
| 247 | (setq cc-bytecomp-noruntime-functions byte-compile-noruntime-functions) | 247 | (if (boundp 'byte-compile-noruntime-functions) ; in case load uncompiled |
| 248 | (setq cc-bytecomp-noruntime-functions | ||
| 249 | byte-compile-noruntime-functions)) | ||
| 248 | (cc-bytecomp-load (symbol-name ,cc-part))) | 250 | (cc-bytecomp-load (symbol-name ,cc-part))) |
| 249 | ;; Hack to suppress spurious "might not be defined at runtime" warnings. | 251 | ;; Hack to suppress spurious "might not be defined at runtime" warnings. |
| 250 | ;; The basic issue is that | 252 | ;; The basic issue is that |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index c2ff5011a0e..db2a6c68539 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -1271,6 +1271,9 @@ comment at the start of cc-engine.el for more info." | |||
| 1271 | (throw 'done (point))))) | 1271 | (throw 'done (point))))) |
| 1272 | ;; In trailing space after an as yet undetected virtual semicolon? | 1272 | ;; In trailing space after an as yet undetected virtual semicolon? |
| 1273 | (c-backward-syntactic-ws from) | 1273 | (c-backward-syntactic-ws from) |
| 1274 | (when (and (bolp) (not (bobp))) ; Can happen in AWK Mode with an | ||
| 1275 | ; unterminated string/regexp. | ||
| 1276 | (backward-char)) | ||
| 1274 | (if (and (< (point) to) | 1277 | (if (and (< (point) to) |
| 1275 | (c-at-vsemi-p)) | 1278 | (c-at-vsemi-p)) |
| 1276 | (point) | 1279 | (point) |
| @@ -6476,6 +6479,15 @@ comment at the start of cc-engine.el for more info." | |||
| 6476 | (c-go-list-forward) | 6479 | (c-go-list-forward) |
| 6477 | t))) | 6480 | t))) |
| 6478 | 6481 | ||
| 6482 | (defmacro c-pull-open-brace (ps) | ||
| 6483 | ;; Pull the next open brace from PS (which has the form of paren-state), | ||
| 6484 | ;; skipping over any brace pairs. Returns NIL when PS is exhausted. | ||
| 6485 | `(progn | ||
| 6486 | (while (consp (car ,ps)) | ||
| 6487 | (setq ,ps (cdr ,ps))) | ||
| 6488 | (prog1 (car ,ps) | ||
| 6489 | (setq ,ps (cdr ,ps))))) | ||
| 6490 | |||
| 6479 | (defun c-back-over-member-initializers () | 6491 | (defun c-back-over-member-initializers () |
| 6480 | ;; Test whether we are in a C++ member initializer list, and if so, go back | 6492 | ;; Test whether we are in a C++ member initializer list, and if so, go back |
| 6481 | ;; to the introducing ":", returning the position of the opening paren of | 6493 | ;; to the introducing ":", returning the position of the opening paren of |
| @@ -8400,15 +8412,6 @@ comment at the start of cc-engine.el for more info." | |||
| 8400 | (back-to-indentation) | 8412 | (back-to-indentation) |
| 8401 | (vector (point) open-paren-pos)))))) | 8413 | (vector (point) open-paren-pos)))))) |
| 8402 | 8414 | ||
| 8403 | (defmacro c-pull-open-brace (ps) | ||
| 8404 | ;; Pull the next open brace from PS (which has the form of paren-state), | ||
| 8405 | ;; skipping over any brace pairs. Returns NIL when PS is exhausted. | ||
| 8406 | `(progn | ||
| 8407 | (while (consp (car ,ps)) | ||
| 8408 | (setq ,ps (cdr ,ps))) | ||
| 8409 | (prog1 (car ,ps) | ||
| 8410 | (setq ,ps (cdr ,ps))))) | ||
| 8411 | |||
| 8412 | (defun c-most-enclosing-decl-block (paren-state) | 8415 | (defun c-most-enclosing-decl-block (paren-state) |
| 8413 | ;; Return the buffer position of the most enclosing decl-block brace (in the | 8416 | ;; Return the buffer position of the most enclosing decl-block brace (in the |
| 8414 | ;; sense of c-looking-at-decl-block) in the PAREN-STATE structure, or nil if | 8417 | ;; sense of c-looking-at-decl-block) in the PAREN-STATE structure, or nil if |
| @@ -8473,10 +8476,10 @@ comment at the start of cc-engine.el for more info." | |||
| 8473 | ;; check for the class key here. | 8476 | ;; check for the class key here. |
| 8474 | (and (c-major-mode-is 'pike-mode) | 8477 | (and (c-major-mode-is 'pike-mode) |
| 8475 | c-decl-block-key)) | 8478 | c-decl-block-key)) |
| 8476 | bufpos braceassignp lim next-containing) | 8479 | bufpos braceassignp lim next-containing macro-start) |
| 8477 | (while (and (not bufpos) | 8480 | (while (and (not bufpos) |
| 8478 | containing-sexp) | 8481 | containing-sexp) |
| 8479 | (when paren-state | 8482 | (when paren-state |
| 8480 | (if (consp (car paren-state)) | 8483 | (if (consp (car paren-state)) |
| 8481 | (setq lim (cdr (car paren-state)) | 8484 | (setq lim (cdr (car paren-state)) |
| 8482 | paren-state (cdr paren-state)) | 8485 | paren-state (cdr paren-state)) |
| @@ -8557,22 +8560,38 @@ comment at the start of cc-engine.el for more info." | |||
| 8557 | )))) | 8560 | )))) |
| 8558 | nil) | 8561 | nil) |
| 8559 | (t t)))))) | 8562 | (t t)))))) |
| 8560 | (if (and (eq braceassignp 'dontknow) | 8563 | (if (and (eq braceassignp 'dontknow) |
| 8561 | (/= (c-backward-token-2 1 t lim) 0)) | 8564 | (/= (c-backward-token-2 1 t lim) 0)) |
| 8562 | (setq braceassignp nil))) | 8565 | (setq braceassignp nil))) |
| 8563 | (if (not braceassignp) | 8566 | (cond |
| 8564 | (if (eq (char-after) ?\;) | 8567 | (braceassignp |
| 8565 | ;; Brace lists can't contain a semicolon, so we're done. | 8568 | ;; We've hit the beginning of the aggregate list. |
| 8566 | (setq containing-sexp nil) | 8569 | (c-beginning-of-statement-1 |
| 8567 | ;; Go up one level. | 8570 | (c-most-enclosing-brace paren-state)) |
| 8568 | (setq containing-sexp next-containing | 8571 | (setq bufpos (point))) |
| 8569 | lim nil | 8572 | ((eq (char-after) ?\;) |
| 8570 | next-containing nil)) | 8573 | ;; Brace lists can't contain a semicolon, so we're done. |
| 8571 | ;; we've hit the beginning of the aggregate list | 8574 | (setq containing-sexp nil)) |
| 8572 | (c-beginning-of-statement-1 | 8575 | ((and (setq macro-start (point)) |
| 8573 | (c-most-enclosing-brace paren-state)) | 8576 | (c-forward-to-cpp-define-body) |
| 8574 | (setq bufpos (point)))) | 8577 | (eq (point) containing-sexp)) |
| 8575 | ) | 8578 | ;; We've a macro whose expansion starts with the '{'. |
| 8579 | ;; Heuristically, if we have a ';' in it we've not got a | ||
| 8580 | ;; brace list, otherwise we have. | ||
| 8581 | (let ((macro-end (progn (c-end-of-macro) (point)))) | ||
| 8582 | (goto-char containing-sexp) | ||
| 8583 | (forward-char) | ||
| 8584 | (if (and (c-syntactic-re-search-forward "[;,]" macro-end t t) | ||
| 8585 | (eq (char-before) ?\;)) | ||
| 8586 | (setq bufpos nil | ||
| 8587 | containing-sexp nil) | ||
| 8588 | (setq bufpos macro-start)))) | ||
| 8589 | (t | ||
| 8590 | ;; Go up one level | ||
| 8591 | (setq containing-sexp next-containing | ||
| 8592 | lim nil | ||
| 8593 | next-containing nil))))) | ||
| 8594 | |||
| 8576 | bufpos)) | 8595 | bufpos)) |
| 8577 | )) | 8596 | )) |
| 8578 | 8597 | ||
| @@ -9796,12 +9815,12 @@ comment at the start of cc-engine.el for more info." | |||
| 9796 | (not (eq (char-after) ?:)) | 9815 | (not (eq (char-after) ?:)) |
| 9797 | ))) | 9816 | ))) |
| 9798 | (save-excursion | 9817 | (save-excursion |
| 9799 | (c-backward-syntactic-ws lim) | 9818 | (c-beginning-of-statement-1 lim) |
| 9800 | (if (eq char-before-ip ?:) | 9819 | (when (looking-at c-opt-<>-sexp-key) |
| 9801 | (progn | 9820 | (goto-char (match-end 1)) |
| 9802 | (forward-char -1) | 9821 | (c-forward-syntactic-ws) |
| 9803 | (c-backward-syntactic-ws lim))) | 9822 | (c-forward-<>-arglist nil) |
| 9804 | (back-to-indentation) | 9823 | (c-forward-syntactic-ws)) |
| 9805 | (looking-at c-class-key))) | 9824 | (looking-at c-class-key))) |
| 9806 | ;; for Java | 9825 | ;; for Java |
| 9807 | (and (c-major-mode-is 'java-mode) | 9826 | (and (c-major-mode-is 'java-mode) |
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 2c0a1317b04..0116e9ec3dd 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el | |||
| @@ -2163,8 +2163,7 @@ assumed to be set if this isn't nil." | |||
| 2163 | (c-lang-defconst c-opt-<>-sexp-key | 2163 | (c-lang-defconst c-opt-<>-sexp-key |
| 2164 | ;; Adorned regexp matching keywords that can be followed by an angle | 2164 | ;; Adorned regexp matching keywords that can be followed by an angle |
| 2165 | ;; bracket sexp. Always set when `c-recognize-<>-arglists' is. | 2165 | ;; bracket sexp. Always set when `c-recognize-<>-arglists' is. |
| 2166 | t (if (c-lang-const c-recognize-<>-arglists) | 2166 | t (c-make-keywords-re t (c-lang-const c-<>-sexp-kwds))) |
| 2167 | (c-make-keywords-re t (c-lang-const c-<>-sexp-kwds)))) | ||
| 2168 | (c-lang-defvar c-opt-<>-sexp-key (c-lang-const c-opt-<>-sexp-key)) | 2167 | (c-lang-defvar c-opt-<>-sexp-key (c-lang-const c-opt-<>-sexp-key)) |
| 2169 | 2168 | ||
| 2170 | (c-lang-defconst c-brace-id-list-kwds | 2169 | (c-lang-defconst c-brace-id-list-kwds |
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 36c9f72fa18..1e8d6cba8c4 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -217,12 +217,16 @@ control). See \"cc-mode.el\" for more info." | |||
| 217 | (t (error "CC Mode is incompatible with this version of Emacs"))) | 217 | (t (error "CC Mode is incompatible with this version of Emacs"))) |
| 218 | map)) | 218 | map)) |
| 219 | 219 | ||
| 220 | (defun c-define-abbrev-table (name defs) | 220 | (defun c-define-abbrev-table (name defs &optional doc) |
| 221 | ;; Compatibility wrapper for `define-abbrev' which passes a non-nil | 221 | ;; Compatibility wrapper for `define-abbrev' which passes a non-nil |
| 222 | ;; sixth argument for SYSTEM-FLAG in emacsen that support it | 222 | ;; sixth argument for SYSTEM-FLAG in emacsen that support it |
| 223 | ;; (currently only Emacs >= 21.2). | 223 | ;; (currently only Emacs >= 21.2). |
| 224 | (let ((table (or (symbol-value name) | 224 | (let ((table (or (and (boundp name) (symbol-value name)) |
| 225 | (progn (define-abbrev-table name nil) | 225 | (progn (condition-case nil |
| 226 | (define-abbrev-table name nil doc) | ||
| 227 | (wrong-number-of-arguments ;E.g. Emacs<23. | ||
| 228 | (eval `(defvar ,name nil ,doc)) | ||
| 229 | (define-abbrev-table name nil))) | ||
| 226 | (symbol-value name))))) | 230 | (symbol-value name))))) |
| 227 | (while defs | 231 | (while defs |
| 228 | (condition-case nil | 232 | (condition-case nil |
| @@ -1235,27 +1239,22 @@ This function is called from `c-common-init', once per mode initialization." | |||
| 1235 | 1239 | ||
| 1236 | ;; Support for C | 1240 | ;; Support for C |
| 1237 | 1241 | ||
| 1238 | ;;;###autoload | 1242 | (defvar c-mode-syntax-table |
| 1239 | (defvar c-mode-syntax-table nil | 1243 | (funcall (c-lang-const c-make-mode-syntax-table c)) |
| 1240 | "Syntax table used in c-mode buffers.") | 1244 | "Syntax table used in c-mode buffers.") |
| 1241 | (or c-mode-syntax-table | ||
| 1242 | (setq c-mode-syntax-table | ||
| 1243 | (funcall (c-lang-const c-make-mode-syntax-table c)))) | ||
| 1244 | 1245 | ||
| 1245 | (defvar c-mode-abbrev-table nil | ||
| 1246 | "Abbreviation table used in c-mode buffers.") | ||
| 1247 | (c-define-abbrev-table 'c-mode-abbrev-table | 1246 | (c-define-abbrev-table 'c-mode-abbrev-table |
| 1248 | '(("else" "else" c-electric-continued-statement 0) | 1247 | '(("else" "else" c-electric-continued-statement 0) |
| 1249 | ("while" "while" c-electric-continued-statement 0))) | 1248 | ("while" "while" c-electric-continued-statement 0)) |
| 1249 | "Abbreviation table used in c-mode buffers.") | ||
| 1250 | 1250 | ||
| 1251 | (defvar c-mode-map () | 1251 | (defvar c-mode-map |
| 1252 | (let ((map (c-make-inherited-keymap))) | ||
| 1253 | ;; Add bindings which are only useful for C. | ||
| 1254 | (define-key map "\C-c\C-e" 'c-macro-expand) | ||
| 1255 | map) | ||
| 1252 | "Keymap used in c-mode buffers.") | 1256 | "Keymap used in c-mode buffers.") |
| 1253 | (if c-mode-map | 1257 | |
| 1254 | nil | ||
| 1255 | (setq c-mode-map (c-make-inherited-keymap)) | ||
| 1256 | ;; add bindings which are only useful for C | ||
| 1257 | (define-key c-mode-map "\C-c\C-e" 'c-macro-expand) | ||
| 1258 | ) | ||
| 1259 | 1258 | ||
| 1260 | (easy-menu-define c-c-menu c-mode-map "C Mode Commands" | 1259 | (easy-menu-define c-c-menu c-mode-map "C Mode Commands" |
| 1261 | (cons "C" (c-lang-const c-mode-menu c))) | 1260 | (cons "C" (c-lang-const c-mode-menu c))) |
| @@ -1320,30 +1319,25 @@ Key bindings: | |||
| 1320 | 1319 | ||
| 1321 | ;; Support for C++ | 1320 | ;; Support for C++ |
| 1322 | 1321 | ||
| 1323 | ;;;###autoload | 1322 | (defvar c++-mode-syntax-table |
| 1324 | (defvar c++-mode-syntax-table nil | 1323 | (funcall (c-lang-const c-make-mode-syntax-table c++)) |
| 1325 | "Syntax table used in c++-mode buffers.") | 1324 | "Syntax table used in c++-mode buffers.") |
| 1326 | (or c++-mode-syntax-table | ||
| 1327 | (setq c++-mode-syntax-table | ||
| 1328 | (funcall (c-lang-const c-make-mode-syntax-table c++)))) | ||
| 1329 | 1325 | ||
| 1330 | (defvar c++-mode-abbrev-table nil | ||
| 1331 | "Abbreviation table used in c++-mode buffers.") | ||
| 1332 | (c-define-abbrev-table 'c++-mode-abbrev-table | 1326 | (c-define-abbrev-table 'c++-mode-abbrev-table |
| 1333 | '(("else" "else" c-electric-continued-statement 0) | 1327 | '(("else" "else" c-electric-continued-statement 0) |
| 1334 | ("while" "while" c-electric-continued-statement 0) | 1328 | ("while" "while" c-electric-continued-statement 0) |
| 1335 | ("catch" "catch" c-electric-continued-statement 0))) | 1329 | ("catch" "catch" c-electric-continued-statement 0)) |
| 1330 | "Abbreviation table used in c++-mode buffers.") | ||
| 1336 | 1331 | ||
| 1337 | (defvar c++-mode-map () | 1332 | (defvar c++-mode-map |
| 1333 | (let ((map (c-make-inherited-keymap))) | ||
| 1334 | ;; Add bindings which are only useful for C++. | ||
| 1335 | (define-key map "\C-c\C-e" 'c-macro-expand) | ||
| 1336 | (define-key map "\C-c:" 'c-scope-operator) | ||
| 1337 | (define-key map "<" 'c-electric-lt-gt) | ||
| 1338 | (define-key map ">" 'c-electric-lt-gt) | ||
| 1339 | map) | ||
| 1338 | "Keymap used in c++-mode buffers.") | 1340 | "Keymap used in c++-mode buffers.") |
| 1339 | (if c++-mode-map | ||
| 1340 | nil | ||
| 1341 | (setq c++-mode-map (c-make-inherited-keymap)) | ||
| 1342 | ;; add bindings which are only useful for C++ | ||
| 1343 | (define-key c++-mode-map "\C-c\C-e" 'c-macro-expand) | ||
| 1344 | (define-key c++-mode-map "\C-c:" 'c-scope-operator) | ||
| 1345 | (define-key c++-mode-map "<" 'c-electric-lt-gt) | ||
| 1346 | (define-key c++-mode-map ">" 'c-electric-lt-gt)) | ||
| 1347 | 1341 | ||
| 1348 | (easy-menu-define c-c++-menu c++-mode-map "C++ Mode Commands" | 1342 | (easy-menu-define c-c++-menu c++-mode-map "C++ Mode Commands" |
| 1349 | (cons "C++" (c-lang-const c-mode-menu c++))) | 1343 | (cons "C++" (c-lang-const c-mode-menu c++))) |
| @@ -1380,26 +1374,21 @@ Key bindings: | |||
| 1380 | 1374 | ||
| 1381 | ;; Support for Objective-C | 1375 | ;; Support for Objective-C |
| 1382 | 1376 | ||
| 1383 | ;;;###autoload | 1377 | (defvar objc-mode-syntax-table |
| 1384 | (defvar objc-mode-syntax-table nil | 1378 | (funcall (c-lang-const c-make-mode-syntax-table objc)) |
| 1385 | "Syntax table used in objc-mode buffers.") | 1379 | "Syntax table used in objc-mode buffers.") |
| 1386 | (or objc-mode-syntax-table | ||
| 1387 | (setq objc-mode-syntax-table | ||
| 1388 | (funcall (c-lang-const c-make-mode-syntax-table objc)))) | ||
| 1389 | 1380 | ||
| 1390 | (defvar objc-mode-abbrev-table nil | ||
| 1391 | "Abbreviation table used in objc-mode buffers.") | ||
| 1392 | (c-define-abbrev-table 'objc-mode-abbrev-table | 1381 | (c-define-abbrev-table 'objc-mode-abbrev-table |
| 1393 | '(("else" "else" c-electric-continued-statement 0) | 1382 | '(("else" "else" c-electric-continued-statement 0) |
| 1394 | ("while" "while" c-electric-continued-statement 0))) | 1383 | ("while" "while" c-electric-continued-statement 0)) |
| 1384 | "Abbreviation table used in objc-mode buffers.") | ||
| 1395 | 1385 | ||
| 1396 | (defvar objc-mode-map () | 1386 | (defvar objc-mode-map |
| 1387 | (let ((map (c-make-inherited-keymap))) | ||
| 1388 | ;; Add bindings which are only useful for Objective-C. | ||
| 1389 | (define-key map "\C-c\C-e" 'c-macro-expand) | ||
| 1390 | map) | ||
| 1397 | "Keymap used in objc-mode buffers.") | 1391 | "Keymap used in objc-mode buffers.") |
| 1398 | (if objc-mode-map | ||
| 1399 | nil | ||
| 1400 | (setq objc-mode-map (c-make-inherited-keymap)) | ||
| 1401 | ;; add bindings which are only useful for Objective-C | ||
| 1402 | (define-key objc-mode-map "\C-c\C-e" 'c-macro-expand)) | ||
| 1403 | 1392 | ||
| 1404 | (easy-menu-define c-objc-menu objc-mode-map "ObjC Mode Commands" | 1393 | (easy-menu-define c-objc-menu objc-mode-map "ObjC Mode Commands" |
| 1405 | (cons "ObjC" (c-lang-const c-mode-menu objc))) | 1394 | (cons "ObjC" (c-lang-const c-mode-menu objc))) |
| @@ -1438,28 +1427,22 @@ Key bindings: | |||
| 1438 | 1427 | ||
| 1439 | ;; Support for Java | 1428 | ;; Support for Java |
| 1440 | 1429 | ||
| 1441 | ;;;###autoload | 1430 | (defvar java-mode-syntax-table |
| 1442 | (defvar java-mode-syntax-table nil | 1431 | (funcall (c-lang-const c-make-mode-syntax-table java)) |
| 1443 | "Syntax table used in java-mode buffers.") | 1432 | "Syntax table used in java-mode buffers.") |
| 1444 | (or java-mode-syntax-table | ||
| 1445 | (setq java-mode-syntax-table | ||
| 1446 | (funcall (c-lang-const c-make-mode-syntax-table java)))) | ||
| 1447 | 1433 | ||
| 1448 | (defvar java-mode-abbrev-table nil | ||
| 1449 | "Abbreviation table used in java-mode buffers.") | ||
| 1450 | (c-define-abbrev-table 'java-mode-abbrev-table | 1434 | (c-define-abbrev-table 'java-mode-abbrev-table |
| 1451 | '(("else" "else" c-electric-continued-statement 0) | 1435 | '(("else" "else" c-electric-continued-statement 0) |
| 1452 | ("while" "while" c-electric-continued-statement 0) | 1436 | ("while" "while" c-electric-continued-statement 0) |
| 1453 | ("catch" "catch" c-electric-continued-statement 0) | 1437 | ("catch" "catch" c-electric-continued-statement 0) |
| 1454 | ("finally" "finally" c-electric-continued-statement 0))) | 1438 | ("finally" "finally" c-electric-continued-statement 0)) |
| 1439 | "Abbreviation table used in java-mode buffers.") | ||
| 1455 | 1440 | ||
| 1456 | (defvar java-mode-map () | 1441 | (defvar java-mode-map |
| 1442 | (let ((map (c-make-inherited-keymap))) | ||
| 1443 | ;; Add bindings which are only useful for Java. | ||
| 1444 | map) | ||
| 1457 | "Keymap used in java-mode buffers.") | 1445 | "Keymap used in java-mode buffers.") |
| 1458 | (if java-mode-map | ||
| 1459 | nil | ||
| 1460 | (setq java-mode-map (c-make-inherited-keymap)) | ||
| 1461 | ;; add bindings which are only useful for Java | ||
| 1462 | ) | ||
| 1463 | 1446 | ||
| 1464 | ;; Regexp trying to describe the beginning of a Java top-level | 1447 | ;; Regexp trying to describe the beginning of a Java top-level |
| 1465 | ;; definition. This is not used by CC Mode, nor is it maintained | 1448 | ;; definition. This is not used by CC Mode, nor is it maintained |
| @@ -1504,24 +1487,18 @@ Key bindings: | |||
| 1504 | 1487 | ||
| 1505 | ;; Support for CORBA's IDL language | 1488 | ;; Support for CORBA's IDL language |
| 1506 | 1489 | ||
| 1507 | ;;;###autoload | 1490 | (defvar idl-mode-syntax-table |
| 1508 | (defvar idl-mode-syntax-table nil | 1491 | (funcall (c-lang-const c-make-mode-syntax-table idl)) |
| 1509 | "Syntax table used in idl-mode buffers.") | 1492 | "Syntax table used in idl-mode buffers.") |
| 1510 | (or idl-mode-syntax-table | ||
| 1511 | (setq idl-mode-syntax-table | ||
| 1512 | (funcall (c-lang-const c-make-mode-syntax-table idl)))) | ||
| 1513 | 1493 | ||
| 1514 | (defvar idl-mode-abbrev-table nil | 1494 | (c-define-abbrev-table 'idl-mode-abbrev-table nil |
| 1515 | "Abbreviation table used in idl-mode buffers.") | 1495 | "Abbreviation table used in idl-mode buffers.") |
| 1516 | (c-define-abbrev-table 'idl-mode-abbrev-table nil) | ||
| 1517 | 1496 | ||
| 1518 | (defvar idl-mode-map () | 1497 | (defvar idl-mode-map |
| 1498 | (let ((map (c-make-inherited-keymap))) | ||
| 1499 | ;; Add bindings which are only useful for IDL. | ||
| 1500 | map) | ||
| 1519 | "Keymap used in idl-mode buffers.") | 1501 | "Keymap used in idl-mode buffers.") |
| 1520 | (if idl-mode-map | ||
| 1521 | nil | ||
| 1522 | (setq idl-mode-map (c-make-inherited-keymap)) | ||
| 1523 | ;; add bindings which are only useful for IDL | ||
| 1524 | ) | ||
| 1525 | 1502 | ||
| 1526 | (easy-menu-define c-idl-menu idl-mode-map "IDL Mode Commands" | 1503 | (easy-menu-define c-idl-menu idl-mode-map "IDL Mode Commands" |
| 1527 | (cons "IDL" (c-lang-const c-mode-menu idl))) | 1504 | (cons "IDL" (c-lang-const c-mode-menu idl))) |
| @@ -1558,26 +1535,21 @@ Key bindings: | |||
| 1558 | 1535 | ||
| 1559 | ;; Support for Pike | 1536 | ;; Support for Pike |
| 1560 | 1537 | ||
| 1561 | ;;;###autoload | 1538 | (defvar pike-mode-syntax-table |
| 1562 | (defvar pike-mode-syntax-table nil | 1539 | (funcall (c-lang-const c-make-mode-syntax-table pike)) |
| 1563 | "Syntax table used in pike-mode buffers.") | 1540 | "Syntax table used in pike-mode buffers.") |
| 1564 | (or pike-mode-syntax-table | ||
| 1565 | (setq pike-mode-syntax-table | ||
| 1566 | (funcall (c-lang-const c-make-mode-syntax-table pike)))) | ||
| 1567 | 1541 | ||
| 1568 | (defvar pike-mode-abbrev-table nil | ||
| 1569 | "Abbreviation table used in pike-mode buffers.") | ||
| 1570 | (c-define-abbrev-table 'pike-mode-abbrev-table | 1542 | (c-define-abbrev-table 'pike-mode-abbrev-table |
| 1571 | '(("else" "else" c-electric-continued-statement 0) | 1543 | '(("else" "else" c-electric-continued-statement 0) |
| 1572 | ("while" "while" c-electric-continued-statement 0))) | 1544 | ("while" "while" c-electric-continued-statement 0)) |
| 1545 | "Abbreviation table used in pike-mode buffers.") | ||
| 1573 | 1546 | ||
| 1574 | (defvar pike-mode-map () | 1547 | (defvar pike-mode-map |
| 1548 | (let ((map (c-make-inherited-keymap))) | ||
| 1549 | ;; Additional bindings. | ||
| 1550 | (define-key map "\C-c\C-e" 'c-macro-expand) | ||
| 1551 | map) | ||
| 1575 | "Keymap used in pike-mode buffers.") | 1552 | "Keymap used in pike-mode buffers.") |
| 1576 | (if pike-mode-map | ||
| 1577 | nil | ||
| 1578 | (setq pike-mode-map (c-make-inherited-keymap)) | ||
| 1579 | ;; additional bindings | ||
| 1580 | (define-key pike-mode-map "\C-c\C-e" 'c-macro-expand)) | ||
| 1581 | 1553 | ||
| 1582 | (easy-menu-define c-pike-menu pike-mode-map "Pike Mode Commands" | 1554 | (easy-menu-define c-pike-menu pike-mode-map "Pike Mode Commands" |
| 1583 | (cons "Pike" (c-lang-const c-mode-menu pike))) | 1555 | (cons "Pike" (c-lang-const c-mode-menu pike))) |
| @@ -1626,28 +1598,26 @@ Key bindings: | |||
| 1626 | ;;; autoload form instead. | 1598 | ;;; autoload form instead. |
| 1627 | ;;;###autoload (autoload 'awk-mode "cc-mode" "Major mode for editing AWK code." t) | 1599 | ;;;###autoload (autoload 'awk-mode "cc-mode" "Major mode for editing AWK code." t) |
| 1628 | 1600 | ||
| 1629 | (defvar awk-mode-abbrev-table nil | ||
| 1630 | "Abbreviation table used in awk-mode buffers.") | ||
| 1631 | (c-define-abbrev-table 'awk-mode-abbrev-table | 1601 | (c-define-abbrev-table 'awk-mode-abbrev-table |
| 1632 | '(("else" "else" c-electric-continued-statement 0) | 1602 | '(("else" "else" c-electric-continued-statement 0) |
| 1633 | ("while" "while" c-electric-continued-statement 0))) | 1603 | ("while" "while" c-electric-continued-statement 0)) |
| 1604 | "Abbreviation table used in awk-mode buffers.") | ||
| 1634 | 1605 | ||
| 1635 | (defvar awk-mode-map () | 1606 | (defvar awk-mode-map |
| 1607 | (let ((map (c-make-inherited-keymap))) | ||
| 1608 | ;; Add bindings which are only useful for awk. | ||
| 1609 | (define-key map "#" 'self-insert-command) | ||
| 1610 | (define-key map "/" 'self-insert-command) | ||
| 1611 | (define-key map "*" 'self-insert-command) | ||
| 1612 | (define-key map "\C-c\C-n" 'undefined) ; #if doesn't exist in awk. | ||
| 1613 | (define-key map "\C-c\C-p" 'undefined) | ||
| 1614 | (define-key map "\C-c\C-u" 'undefined) | ||
| 1615 | (define-key map "\M-a" 'c-beginning-of-statement) ; 2003/10/7 | ||
| 1616 | (define-key map "\M-e" 'c-end-of-statement) ; 2003/10/7 | ||
| 1617 | (define-key map "\C-\M-a" 'c-awk-beginning-of-defun) | ||
| 1618 | (define-key map "\C-\M-e" 'c-awk-end-of-defun) | ||
| 1619 | map) | ||
| 1636 | "Keymap used in awk-mode buffers.") | 1620 | "Keymap used in awk-mode buffers.") |
| 1637 | (if awk-mode-map | ||
| 1638 | nil | ||
| 1639 | (setq awk-mode-map (c-make-inherited-keymap)) | ||
| 1640 | ;; add bindings which are only useful for awk. | ||
| 1641 | (define-key awk-mode-map "#" 'self-insert-command) | ||
| 1642 | (define-key awk-mode-map "/" 'self-insert-command) | ||
| 1643 | (define-key awk-mode-map "*" 'self-insert-command) | ||
| 1644 | (define-key awk-mode-map "\C-c\C-n" 'undefined) ; #if doesn't exist in awk. | ||
| 1645 | (define-key awk-mode-map "\C-c\C-p" 'undefined) | ||
| 1646 | (define-key awk-mode-map "\C-c\C-u" 'undefined) | ||
| 1647 | (define-key awk-mode-map "\M-a" 'c-beginning-of-statement) ; 2003/10/7 | ||
| 1648 | (define-key awk-mode-map "\M-e" 'c-end-of-statement) ; 2003/10/7 | ||
| 1649 | (define-key awk-mode-map "\C-\M-a" 'c-awk-beginning-of-defun) | ||
| 1650 | (define-key awk-mode-map "\C-\M-e" 'c-awk-end-of-defun)) | ||
| 1651 | 1621 | ||
| 1652 | (easy-menu-define c-awk-menu awk-mode-map "AWK Mode Commands" | 1622 | (easy-menu-define c-awk-menu awk-mode-map "AWK Mode Commands" |
| 1653 | (cons "AWK" (c-lang-const c-mode-menu awk))) | 1623 | (cons "AWK" (c-lang-const c-mode-menu awk))) |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index d9c482330cc..8c981b36e56 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -624,7 +624,9 @@ You might also use mode hooks to specify it in certain modes, like this: | |||
| 624 | (file-exists-p \"Makefile\")) | 624 | (file-exists-p \"Makefile\")) |
| 625 | (set (make-local-variable 'compile-command) | 625 | (set (make-local-variable 'compile-command) |
| 626 | (concat \"make -k \" | 626 | (concat \"make -k \" |
| 627 | (file-name-sans-extension buffer-file-name))))))" | 627 | (if buffer-file-name |
| 628 | (shell-quote-argument | ||
| 629 | (file-name-sans-extension buffer-file-name))))))))" | ||
| 628 | :type 'string | 630 | :type 'string |
| 629 | :group 'compilation) | 631 | :group 'compilation) |
| 630 | ;;;###autoload(put 'compile-command 'safe-local-variable (lambda (a) (and (stringp a) (or (not (boundp 'compilation-read-command)) compilation-read-command)))) | 632 | ;;;###autoload(put 'compile-command 'safe-local-variable (lambda (a) (and (stringp a) (or (not (boundp 'compilation-read-command)) compilation-read-command)))) |
| @@ -2492,7 +2494,7 @@ displays at the top of the window; there is no arrow." | |||
| 2492 | All arguments are markers. If END-MK is non-nil, mark is set there | 2494 | All arguments are markers. If END-MK is non-nil, mark is set there |
| 2493 | and overlay is highlighted between MK and END-MK." | 2495 | and overlay is highlighted between MK and END-MK." |
| 2494 | ;; Show compilation buffer in other window, scrolled to this error. | 2496 | ;; Show compilation buffer in other window, scrolled to this error. |
| 2495 | (let* ((from-compilation-buffer (eq (window-buffer (selected-window)) | 2497 | (let* ((from-compilation-buffer (eq (window-buffer) |
| 2496 | (marker-buffer msg))) | 2498 | (marker-buffer msg))) |
| 2497 | ;; Use an existing window if it is in a visible frame. | 2499 | ;; Use an existing window if it is in a visible frame. |
| 2498 | (pre-existing (get-buffer-window (marker-buffer msg) 0)) | 2500 | (pre-existing (get-buffer-window (marker-buffer msg) 0)) |
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index 6a71ab330a8..865211d109c 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el | |||
| @@ -1605,7 +1605,7 @@ specifies where to find/view the result." | |||
| 1605 | ;; Get the source file to view or find. | 1605 | ;; Get the source file to view or find. |
| 1606 | (setf file (ebrowse-find-source-file file tags-file)) | 1606 | (setf file (ebrowse-find-source-file file tags-file)) |
| 1607 | ;; If current window is dedicated, use another frame. | 1607 | ;; If current window is dedicated, use another frame. |
| 1608 | (when (window-dedicated-p (selected-window)) | 1608 | (when (window-dedicated-p) |
| 1609 | (setf where 'other-window)) | 1609 | (setf where 'other-window)) |
| 1610 | (cond (view | 1610 | (cond (view |
| 1611 | (setf ebrowse-temp-position-to-view struc | 1611 | (setf ebrowse-temp-position-to-view struc |
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index ff6321d74c3..a7b7e630bb9 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el | |||
| @@ -982,7 +982,7 @@ See documentation of variable `tags-file-name'." | |||
| 982 | ;; selected window's buffer; without the hair, point is moved in both | 982 | ;; selected window's buffer; without the hair, point is moved in both |
| 983 | ;; windows. To prevent this, we save the selected window's point before | 983 | ;; windows. To prevent this, we save the selected window's point before |
| 984 | ;; doing find-tag-noselect, and restore it after. | 984 | ;; doing find-tag-noselect, and restore it after. |
| 985 | (let* ((window-point (window-point (selected-window))) | 985 | (let* ((window-point (window-point)) |
| 986 | (tagbuf (find-tag-noselect tagname next-p regexp-p)) | 986 | (tagbuf (find-tag-noselect tagname next-p regexp-p)) |
| 987 | (tagpoint (progn (set-buffer tagbuf) (point)))) | 987 | (tagpoint (progn (set-buffer tagbuf) (point)))) |
| 988 | (set-window-point (prog1 | 988 | (set-window-point (prog1 |
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 9bde2900a67..80f663360e4 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el | |||
| @@ -1026,7 +1026,7 @@ Set subexpression 1 in the match-data to the name of the type." | |||
| 1026 | (if (lookup-key (current-local-map) [menu-bar index]) | 1026 | (if (lookup-key (current-local-map) [menu-bar index]) |
| 1027 | (message "%s" "F90-imenu already exists.") | 1027 | (message "%s" "F90-imenu already exists.") |
| 1028 | (imenu-add-to-menubar "F90-imenu") | 1028 | (imenu-add-to-menubar "F90-imenu") |
| 1029 | (redraw-frame (selected-frame)))) | 1029 | (redraw-frame))) |
| 1030 | 1030 | ||
| 1031 | 1031 | ||
| 1032 | ;; Abbrevs have generally two letters, except standard types `c, `i, `r, `t. | 1032 | ;; Abbrevs have generally two letters, except standard types `c, `i, `r, `t. |
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 2ead734d163..ab86b83f7bf 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el | |||
| @@ -353,7 +353,7 @@ Return nil if we cannot, non-nil if we can." | |||
| 353 | 'flymake-simple-cleanup)) | 353 | 'flymake-simple-cleanup)) |
| 354 | 354 | ||
| 355 | (defun flymake-get-real-file-name-function (file-name) | 355 | (defun flymake-get-real-file-name-function (file-name) |
| 356 | (or (nth 4 (flymake-get-file-name-mode-and-masks file-name)) | 356 | (or (nth 2 (flymake-get-file-name-mode-and-masks file-name)) |
| 357 | 'flymake-get-real-file-name)) | 357 | 'flymake-get-real-file-name)) |
| 358 | 358 | ||
| 359 | (defvar flymake-find-buildfile-cache (flymake-makehash 'equal)) | 359 | (defvar flymake-find-buildfile-cache (flymake-makehash 'equal)) |
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index ff667f80f9d..0fc805aae81 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el | |||
| @@ -1080,8 +1080,7 @@ The next key typed is executed unless it is SPC." | |||
| 1080 | fortran-column-ruler-fixed) | 1080 | fortran-column-ruler-fixed) |
| 1081 | (save-excursion | 1081 | (save-excursion |
| 1082 | (beginning-of-line) | 1082 | (beginning-of-line) |
| 1083 | (if (eq (window-start (selected-window)) | 1083 | (if (eq (window-start) (window-point)) |
| 1084 | (window-point (selected-window))) | ||
| 1085 | (line-beginning-position 2) | 1084 | (line-beginning-position 2) |
| 1086 | (point))) | 1085 | (point))) |
| 1087 | nil "Type SPC or any command to erase ruler.")) | 1086 | nil "Type SPC or any command to erase ruler.")) |
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 4b51a5e7835..2017636435c 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -2951,7 +2951,7 @@ If not in a source or disassembly buffer just set point." | |||
| 2951 | obj) | 2951 | obj) |
| 2952 | (when (numberp pos) | 2952 | (when (numberp pos) |
| 2953 | (with-selected-window (posn-window posn) | 2953 | (with-selected-window (posn-window posn) |
| 2954 | (with-current-buffer (window-buffer (selected-window)) | 2954 | (with-current-buffer (window-buffer) |
| 2955 | (goto-char pos) | 2955 | (goto-char pos) |
| 2956 | (dolist (overlay (overlays-in pos pos)) | 2956 | (dolist (overlay (overlays-in pos pos)) |
| 2957 | (when (overlay-get overlay 'put-break) | 2957 | (when (overlay-get overlay 'put-break) |
diff --git a/lisp/progmodes/idlw-toolbar.el b/lisp/progmodes/idlw-toolbar.el index d255b8b1a3f..98f9ee3b530 100644 --- a/lisp/progmodes/idlw-toolbar.el +++ b/lisp/progmodes/idlw-toolbar.el | |||
| @@ -962,7 +962,7 @@ static char * file[] = { | |||
| 962 | (if (featurep 'xemacs) | 962 | (if (featurep 'xemacs) |
| 963 | nil ; no action necessary, toolbar gets updated automatically | 963 | nil ; no action necessary, toolbar gets updated automatically |
| 964 | ;; On Emacs, redraw the frame to make sure the Toolbar is updated. | 964 | ;; On Emacs, redraw the frame to make sure the Toolbar is updated. |
| 965 | (redraw-frame (selected-frame)))) | 965 | (redraw-frame))) |
| 966 | 966 | ||
| 967 | (provide 'idlw-toolbar) | 967 | (provide 'idlw-toolbar) |
| 968 | (provide 'idlwave-toolbar) | 968 | (provide 'idlwave-toolbar) |
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 28ee859f9db..49a21933133 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el | |||
| @@ -2244,11 +2244,8 @@ current buffer. Pushes a mark onto the tag ring just like | |||
| 2244 | 2244 | ||
| 2245 | ;;; MozRepl integration | 2245 | ;;; MozRepl integration |
| 2246 | 2246 | ||
| 2247 | (put 'js-moz-bad-rpc 'error-conditions '(error timeout)) | 2247 | (define-error 'js-moz-bad-rpc "Mozilla RPC Error") ;; '(timeout error)) |
| 2248 | (put 'js-moz-bad-rpc 'error-message "Mozilla RPC Error") | 2248 | (define-error 'js-js-error "Javascript Error") ;; '(js-error error)) |
| 2249 | |||
| 2250 | (put 'js-js-error 'error-conditions '(error js-error)) | ||
| 2251 | (put 'js-js-error 'error-message "Javascript Error") | ||
| 2252 | 2249 | ||
| 2253 | (defun js--wait-for-matching-output | 2250 | (defun js--wait-for-matching-output |
| 2254 | (process regexp timeout &optional start) | 2251 | (process regexp timeout &optional start) |
diff --git a/lisp/progmodes/mixal-mode.el b/lisp/progmodes/mixal-mode.el index 8814cdbba35..a14654cdd7c 100644 --- a/lisp/progmodes/mixal-mode.el +++ b/lisp/progmodes/mixal-mode.el | |||
| @@ -1113,8 +1113,10 @@ Assumes that file has been compiled with debugging support." | |||
| 1113 | mixal-syntax-propertize-function) | 1113 | mixal-syntax-propertize-function) |
| 1114 | ;; might add an indent function in the future | 1114 | ;; might add an indent function in the future |
| 1115 | ;; (set (make-local-variable 'indent-line-function) 'mixal-indent-line) | 1115 | ;; (set (make-local-variable 'indent-line-function) 'mixal-indent-line) |
| 1116 | (set (make-local-variable 'compile-command) (concat "mixasm " | 1116 | (set (make-local-variable 'compile-command) |
| 1117 | buffer-file-name))) | 1117 | (concat "mixasm " |
| 1118 | (if buffer-file-name | ||
| 1119 | (shell-quote-argument buffer-file-name))))) | ||
| 1118 | 1120 | ||
| 1119 | (provide 'mixal-mode) | 1121 | (provide 'mixal-mode) |
| 1120 | 1122 | ||
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 62870f9085b..fb2dc01c9be 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -52,12 +52,12 @@ | |||
| 52 | ;; Extra functions `python-nav-forward-statement', | 52 | ;; Extra functions `python-nav-forward-statement', |
| 53 | ;; `python-nav-backward-statement', | 53 | ;; `python-nav-backward-statement', |
| 54 | ;; `python-nav-beginning-of-statement', `python-nav-end-of-statement', | 54 | ;; `python-nav-beginning-of-statement', `python-nav-end-of-statement', |
| 55 | ;; `python-nav-beginning-of-block' and `python-nav-end-of-block' are | 55 | ;; `python-nav-beginning-of-block', `python-nav-end-of-block' and |
| 56 | ;; included but no bound to any key. At last but not least the | 56 | ;; `python-nav-if-name-main' are included but no bound to any key. At |
| 57 | ;; specialized `python-nav-forward-sexp' allows easy navigation | 57 | ;; last but not least the specialized `python-nav-forward-sexp' allows |
| 58 | ;; between code blocks. If you prefer `cc-mode'-like `forward-sexp' | 58 | ;; easy navigation between code blocks. If you prefer `cc-mode'-like |
| 59 | ;; movement, setting `forward-sexp-function' to nil is enough, You can | 59 | ;; `forward-sexp' movement, setting `forward-sexp-function' to nil is |
| 60 | ;; do that using the `python-mode-hook': | 60 | ;; enough, You can do that using the `python-mode-hook': |
| 61 | 61 | ||
| 62 | ;; (add-hook 'python-mode-hook | 62 | ;; (add-hook 'python-mode-hook |
| 63 | ;; (lambda () (setq forward-sexp-function nil))) | 63 | ;; (lambda () (setq forward-sexp-function nil))) |
| @@ -501,29 +501,24 @@ The type returned can be `comment', `string' or `paren'." | |||
| 501 | (,(lambda (limit) | 501 | (,(lambda (limit) |
| 502 | (let ((re (python-rx (group (+ (any word ?. ?_))) | 502 | (let ((re (python-rx (group (+ (any word ?. ?_))) |
| 503 | (? ?\[ (+ (not (any ?\]))) ?\]) (* space) | 503 | (? ?\[ (+ (not (any ?\]))) ?\]) (* space) |
| 504 | assignment-operator))) | 504 | assignment-operator)) |
| 505 | (when (re-search-forward re limit t) | 505 | (res nil)) |
| 506 | (while (and (python-syntax-context 'paren) | 506 | (while (and (setq res (re-search-forward re limit t)) |
| 507 | (re-search-forward re limit t))) | 507 | (or (python-syntax-context 'paren) |
| 508 | (if (not (or (python-syntax-context 'paren) | 508 | (equal (char-after (point-marker)) ?=)))) |
| 509 | (equal (char-after (point-marker)) ?=))) | 509 | res)) |
| 510 | t | ||
| 511 | (set-match-data nil))))) | ||
| 512 | (1 font-lock-variable-name-face nil nil)) | 510 | (1 font-lock-variable-name-face nil nil)) |
| 513 | ;; support for a, b, c = (1, 2, 3) | 511 | ;; support for a, b, c = (1, 2, 3) |
| 514 | (,(lambda (limit) | 512 | (,(lambda (limit) |
| 515 | (let ((re (python-rx (group (+ (any word ?. ?_))) (* space) | 513 | (let ((re (python-rx (group (+ (any word ?. ?_))) (* space) |
| 516 | (* ?, (* space) (+ (any word ?. ?_)) (* space)) | 514 | (* ?, (* space) (+ (any word ?. ?_)) (* space)) |
| 517 | ?, (* space) (+ (any word ?. ?_)) (* space) | 515 | ?, (* space) (+ (any word ?. ?_)) (* space) |
| 518 | assignment-operator))) | 516 | assignment-operator)) |
| 519 | (when (and (re-search-forward re limit t) | 517 | (res nil)) |
| 520 | (goto-char (nth 3 (match-data)))) | 518 | (while (and (setq res (re-search-forward re limit t)) |
| 521 | (while (and (python-syntax-context 'paren) | 519 | (goto-char (match-end 1)) |
| 522 | (re-search-forward re limit t)) | 520 | (python-syntax-context 'paren))) |
| 523 | (goto-char (nth 3 (match-data)))) | 521 | res)) |
| 524 | (if (not (python-syntax-context 'paren)) | ||
| 525 | t | ||
| 526 | (set-match-data nil))))) | ||
| 527 | (1 font-lock-variable-name-face nil nil)))) | 522 | (1 font-lock-variable-name-face nil nil)))) |
| 528 | 523 | ||
| 529 | (defconst python-syntax-propertize-function | 524 | (defconst python-syntax-propertize-function |
| @@ -1588,6 +1583,29 @@ This command assumes point is not in a string or comment." | |||
| 1588 | (or arg (setq arg 1)) | 1583 | (or arg (setq arg 1)) |
| 1589 | (python-nav-up-list (- arg))) | 1584 | (python-nav-up-list (- arg))) |
| 1590 | 1585 | ||
| 1586 | (defun python-nav-if-name-main () | ||
| 1587 | "Move point at the beginning the __main__ block. | ||
| 1588 | When \"if __name__ == '__main__':\" is found returns its | ||
| 1589 | position, else returns nil." | ||
| 1590 | (interactive) | ||
| 1591 | (let ((point (point)) | ||
| 1592 | (found (catch 'found | ||
| 1593 | (goto-char (point-min)) | ||
| 1594 | (while (re-search-forward | ||
| 1595 | (python-rx line-start | ||
| 1596 | "if" (+ space) | ||
| 1597 | "__name__" (+ space) | ||
| 1598 | "==" (+ space) | ||
| 1599 | (group-n 1 (or ?\" ?\')) | ||
| 1600 | "__main__" (backref 1) (* space) ":") | ||
| 1601 | nil t) | ||
| 1602 | (when (not (python-syntax-context-type)) | ||
| 1603 | (beginning-of-line) | ||
| 1604 | (throw 'found t)))))) | ||
| 1605 | (if found | ||
| 1606 | (point) | ||
| 1607 | (ignore (goto-char point))))) | ||
| 1608 | |||
| 1591 | 1609 | ||
| 1592 | ;;; Shell integration | 1610 | ;;; Shell integration |
| 1593 | 1611 | ||
| @@ -2119,17 +2137,58 @@ Returns the output. See `python-shell-send-string-no-output'." | |||
| 2119 | (define-obsolete-function-alias | 2137 | (define-obsolete-function-alias |
| 2120 | 'python-send-string 'python-shell-internal-send-string "24.3") | 2138 | 'python-send-string 'python-shell-internal-send-string "24.3") |
| 2121 | 2139 | ||
| 2140 | (defun python-shell-buffer-substring (start end &optional nomain) | ||
| 2141 | "Send buffer substring from START to END formatted for shell. | ||
| 2142 | This is a wrapper over `buffer-substring' that takes care of | ||
| 2143 | different transformations for the code sent to be evaluated in | ||
| 2144 | the python shell: | ||
| 2145 | 1. When Optional Argument NOMAIN is non-nil everything under an | ||
| 2146 | \"if __name__ == '__main__'\" block will be removed. | ||
| 2147 | 2. When a subregion of the buffer is sent, it takes care of | ||
| 2148 | appending extra whitelines so tracebacks are correct. | ||
| 2149 | 3. Wraps indented regions under an \"if True:\" block so the | ||
| 2150 | interpreter evaluates them correctly." | ||
| 2151 | (let ((substring (buffer-substring-no-properties start end)) | ||
| 2152 | (fillstr (make-string (1- (line-number-at-pos start)) ?\n)) | ||
| 2153 | (toplevel-block-p (save-excursion | ||
| 2154 | (goto-char start) | ||
| 2155 | (or (zerop (line-number-at-pos start)) | ||
| 2156 | (progn | ||
| 2157 | (python-util-forward-comment 1) | ||
| 2158 | (zerop (current-indentation))))))) | ||
| 2159 | (with-temp-buffer | ||
| 2160 | (python-mode) | ||
| 2161 | (insert fillstr) | ||
| 2162 | (insert substring) | ||
| 2163 | (goto-char (point-min)) | ||
| 2164 | (when (not toplevel-block-p) | ||
| 2165 | (insert "if True:") | ||
| 2166 | (delete-region (point) (line-end-position))) | ||
| 2167 | (when nomain | ||
| 2168 | (let* ((if-name-main-start-end | ||
| 2169 | (and nomain | ||
| 2170 | (save-excursion | ||
| 2171 | (when (python-nav-if-name-main) | ||
| 2172 | (cons (point) | ||
| 2173 | (progn (python-nav-forward-sexp) | ||
| 2174 | (point))))))) | ||
| 2175 | ;; Oh destructuring bind, how I miss you. | ||
| 2176 | (if-name-main-start (car if-name-main-start-end)) | ||
| 2177 | (if-name-main-end (cdr if-name-main-start-end))) | ||
| 2178 | (when if-name-main-start-end | ||
| 2179 | (goto-char if-name-main-start) | ||
| 2180 | (delete-region if-name-main-start if-name-main-end) | ||
| 2181 | (insert | ||
| 2182 | (make-string | ||
| 2183 | (- (line-number-at-pos if-name-main-end) | ||
| 2184 | (line-number-at-pos if-name-main-start)) ?\n))))) | ||
| 2185 | (buffer-substring-no-properties (point-min) (point-max))))) | ||
| 2186 | |||
| 2122 | (defun python-shell-send-region (start end) | 2187 | (defun python-shell-send-region (start end) |
| 2123 | "Send the region delimited by START and END to inferior Python process." | 2188 | "Send the region delimited by START and END to inferior Python process." |
| 2124 | (interactive "r") | 2189 | (interactive "r") |
| 2125 | (python-shell-send-string | 2190 | (python-shell-send-string |
| 2126 | (concat | 2191 | (python-shell-buffer-substring start end) nil t)) |
| 2127 | (let ((line-num (line-number-at-pos start))) | ||
| 2128 | ;; When sending a region, add blank lines for non sent code so | ||
| 2129 | ;; backtraces remain correct. | ||
| 2130 | (make-string (1- line-num) ?\n)) | ||
| 2131 | (buffer-substring start end)) | ||
| 2132 | nil t)) | ||
| 2133 | 2192 | ||
| 2134 | (defun python-shell-send-buffer (&optional arg) | 2193 | (defun python-shell-send-buffer (&optional arg) |
| 2135 | "Send the entire buffer to inferior Python process. | 2194 | "Send the entire buffer to inferior Python process. |
| @@ -2138,13 +2197,9 @@ by \"if __name__== '__main__':\"" | |||
| 2138 | (interactive "P") | 2197 | (interactive "P") |
| 2139 | (save-restriction | 2198 | (save-restriction |
| 2140 | (widen) | 2199 | (widen) |
| 2141 | (let ((str (buffer-substring (point-min) (point-max)))) | 2200 | (python-shell-send-string |
| 2142 | (and | 2201 | (python-shell-buffer-substring |
| 2143 | (not arg) | 2202 | (point-min) (point-max) (not arg))))) |
| 2144 | (setq str (replace-regexp-in-string | ||
| 2145 | (python-rx if-name-main) | ||
| 2146 | "if __name__ == '__main__ ':" str))) | ||
| 2147 | (python-shell-send-string str)))) | ||
| 2148 | 2203 | ||
| 2149 | (defun python-shell-send-defun (arg) | 2204 | (defun python-shell-send-defun (arg) |
| 2150 | "Send the current defun to inferior Python process. | 2205 | "Send the current defun to inferior Python process. |
| @@ -2271,13 +2326,17 @@ and use the following as the value of this variable: | |||
| 2271 | LINE is used to detect the context on how to complete given | 2326 | LINE is used to detect the context on how to complete given |
| 2272 | INPUT." | 2327 | INPUT." |
| 2273 | (let* ((prompt | 2328 | (let* ((prompt |
| 2274 | ;; Get the last prompt for the inferior process | 2329 | ;; Get last prompt of the inferior process buffer (this |
| 2275 | ;; buffer. This is used for the completion code selection | 2330 | ;; intentionally avoids using `comint-last-prompt' because |
| 2276 | ;; heuristic. | 2331 | ;; of incompatibilities with Emacs 24.x). |
| 2277 | (with-current-buffer (process-buffer process) | 2332 | (with-current-buffer (process-buffer process) |
| 2278 | (buffer-substring-no-properties | 2333 | (save-excursion |
| 2279 | (overlay-start comint-last-prompt-overlay) | 2334 | (buffer-substring-no-properties |
| 2280 | (overlay-end comint-last-prompt-overlay)))) | 2335 | (- (point) (length line)) |
| 2336 | (progn | ||
| 2337 | (re-search-backward "^") | ||
| 2338 | (python-util-forward-comment) | ||
| 2339 | (point)))))) | ||
| 2281 | (completion-context | 2340 | (completion-context |
| 2282 | ;; Check whether a prompt matches a pdb string, an import | 2341 | ;; Check whether a prompt matches a pdb string, an import |
| 2283 | ;; statement or just the standard prompt and use the | 2342 | ;; statement or just the standard prompt and use the |
| @@ -3042,32 +3101,22 @@ It must be a function with two arguments: TYPE and NAME.") | |||
| 3042 | "*class definition*" | 3101 | "*class definition*" |
| 3043 | "*function definition*")) | 3102 | "*function definition*")) |
| 3044 | 3103 | ||
| 3045 | (defun python-imenu--put-parent (type name pos num-children tree &optional root) | 3104 | (defun python-imenu--put-parent (type name pos tree) |
| 3046 | "Add the parent with TYPE, NAME, POS and NUM-CHILDREN to TREE. | 3105 | "Add the parent with TYPE, NAME and POS to TREE." |
| 3047 | Optional Argument ROOT must be non-nil when the node being | ||
| 3048 | processed is the root of the TREE." | ||
| 3049 | (let ((label | 3106 | (let ((label |
| 3050 | (funcall python-imenu-format-item-label-function type name)) | 3107 | (funcall python-imenu-format-item-label-function type name)) |
| 3051 | (jump-label | 3108 | (jump-label |
| 3052 | (funcall python-imenu-format-parent-item-jump-label-function type name))) | 3109 | (funcall python-imenu-format-parent-item-jump-label-function type name))) |
| 3053 | (if root | 3110 | (if (not tree) |
| 3054 | ;; This is the root, everything is a children. | 3111 | (cons label pos) |
| 3055 | (cons label (cons (cons jump-label pos) tree)) | 3112 | (cons label (cons (cons jump-label pos) tree))))) |
| 3056 | ;; This is node a which may contain some children. | ||
| 3057 | (cons | ||
| 3058 | (cons label (cons (cons jump-label pos) | ||
| 3059 | ;; Append all the children | ||
| 3060 | (python-util-popn tree num-children))) | ||
| 3061 | ;; All previous non-children nodes. | ||
| 3062 | (nthcdr num-children tree))))) | ||
| 3063 | 3113 | ||
| 3064 | (defun python-imenu--build-tree (&optional min-indent prev-indent num-children tree) | 3114 | (defun python-imenu--build-tree (&optional min-indent prev-indent tree) |
| 3065 | "Recursively build the tree of nested definitions of a node. | 3115 | "Recursively build the tree of nested definitions of a node. |
| 3066 | Arguments MIN-INDENT PREV-INDENT NUM-CHILDREN and TREE are | 3116 | Arguments MIN-INDENT PREV-INDENT and TREE are internal and should |
| 3067 | internal and should not be passed explicitly unless you know what | 3117 | not be passed explicitly unless you know what you are doing." |
| 3068 | you are doing." | 3118 | (setq min-indent (or min-indent 0) |
| 3069 | (setq num-children (or num-children 0) | 3119 | prev-indent (or prev-indent python-indent-offset)) |
| 3070 | min-indent (or min-indent 0)) | ||
| 3071 | (let* ((pos (python-nav-backward-defun)) | 3120 | (let* ((pos (python-nav-backward-defun)) |
| 3072 | (type) | 3121 | (type) |
| 3073 | (name (when (and pos (looking-at python-nav-beginning-of-defun-regexp)) | 3122 | (name (when (and pos (looking-at python-nav-beginning-of-defun-regexp)) |
| @@ -3076,73 +3125,33 @@ you are doing." | |||
| 3076 | (cadr split)))) | 3125 | (cadr split)))) |
| 3077 | (label (when name | 3126 | (label (when name |
| 3078 | (funcall python-imenu-format-item-label-function type name))) | 3127 | (funcall python-imenu-format-item-label-function type name))) |
| 3079 | (indent (current-indentation))) | 3128 | (indent (current-indentation)) |
| 3129 | (children-indent-limit (+ python-indent-offset min-indent))) | ||
| 3080 | (cond ((not pos) | 3130 | (cond ((not pos) |
| 3081 | ;; No defun found, nothing to add. | 3131 | ;; Nothing found, probably near to bobp. |
| 3082 | tree) | 3132 | nil) |
| 3083 | ((equal indent 0) | 3133 | ((<= indent min-indent) |
| 3084 | (if (> num-children 0) | 3134 | ;; The current indentation points that this is a parent |
| 3085 | ;; Append it as the parent of everything collected to | 3135 | ;; node, add it to the tree and stop recursing. |
| 3086 | ;; this point. | 3136 | (python-imenu--put-parent type name pos tree)) |
| 3087 | (python-imenu--put-parent type name pos num-children tree t) | ||
| 3088 | ;; There are no children, this is a lonely defun. | ||
| 3089 | (cons label pos))) | ||
| 3090 | ((equal min-indent indent) | ||
| 3091 | ;; Stop collecting nodes after moving to a position with | ||
| 3092 | ;; indentation equaling min-indent. This is specially | ||
| 3093 | ;; useful for navigating nested definitions recursively. | ||
| 3094 | (if (> num-children 0) | ||
| 3095 | tree | ||
| 3096 | ;; When there are no children, the collected tree is a | ||
| 3097 | ;; single node intended to be added in the list of defuns | ||
| 3098 | ;; of its parent. | ||
| 3099 | (car tree))) | ||
| 3100 | (t | 3137 | (t |
| 3101 | (python-imenu--build-tree | 3138 | (python-imenu--build-tree |
| 3102 | min-indent | 3139 | min-indent |
| 3103 | indent | 3140 | indent |
| 3104 | ;; Add another children, either when this is the | 3141 | (if (<= indent children-indent-limit) |
| 3105 | ;; first call or when indentation is | 3142 | ;; This lies within the children indent offset range, |
| 3106 | ;; less-or-equal than previous. And do not | 3143 | ;; so it's a normal child of its parent (i.e., not |
| 3107 | ;; discard the number of children, because the | 3144 | ;; a child of a child). |
| 3108 | ;; way code is scanned, all children are | 3145 | (cons (cons label pos) tree) |
| 3109 | ;; collected until a root node yet to be found | 3146 | ;; Oh no, a child of a child?! Fear not, we |
| 3110 | ;; appears. | 3147 | ;; know how to roll. We recursively parse these by |
| 3111 | (if (or (not prev-indent) | 3148 | ;; swapping prev-indent and min-indent plus adding this |
| 3112 | (and | 3149 | ;; newly found item to a fresh subtree. This works, I |
| 3113 | (> indent min-indent) | 3150 | ;; promise. |
| 3114 | (<= indent prev-indent))) | 3151 | (cons |
| 3115 | (1+ num-children) | 3152 | (python-imenu--build-tree |
| 3116 | num-children) | 3153 | prev-indent indent (list (cons label pos))) |
| 3117 | (cond ((not prev-indent) | 3154 | tree))))))) |
| 3118 | ;; First call to the function: append this | ||
| 3119 | ;; defun to the index. | ||
| 3120 | (list (cons label pos))) | ||
| 3121 | ((= indent prev-indent) | ||
| 3122 | ;; Add another defun with the same depth | ||
| 3123 | ;; as the previous. | ||
| 3124 | (cons (cons label pos) tree)) | ||
| 3125 | ((and (< indent prev-indent) | ||
| 3126 | (< 0 num-children)) | ||
| 3127 | ;; There are children to be appended and | ||
| 3128 | ;; the previous defun had more | ||
| 3129 | ;; indentation, the current one must be a | ||
| 3130 | ;; parent. | ||
| 3131 | (python-imenu--put-parent type name pos num-children tree)) | ||
| 3132 | ((> indent prev-indent) | ||
| 3133 | ;; There are children defuns deeper than | ||
| 3134 | ;; current depth. Fear not, we already | ||
| 3135 | ;; know how to treat them. | ||
| 3136 | (cons | ||
| 3137 | (prog1 | ||
| 3138 | (python-imenu--build-tree | ||
| 3139 | prev-indent indent 0 (list (cons label pos))) | ||
| 3140 | ;; Adjustment: after scanning backwards | ||
| 3141 | ;; for all deeper children, we need to | ||
| 3142 | ;; continue our scan for a parent from | ||
| 3143 | ;; the current defun we are looking at. | ||
| 3144 | (python-nav-forward-defun)) | ||
| 3145 | tree)))))))) | ||
| 3146 | 3155 | ||
| 3147 | (defun python-imenu-create-index () | 3156 | (defun python-imenu-create-index () |
| 3148 | "Return tree Imenu alist for the current python buffer. | 3157 | "Return tree Imenu alist for the current python buffer. |
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index c8fae7ba1e6..acc7738ae5c 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -137,6 +137,7 @@ This should only be called after matching against `ruby-here-doc-beg-re'." | |||
| 137 | 137 | ||
| 138 | (defconst ruby-symbol-chars "a-zA-Z0-9_" | 138 | (defconst ruby-symbol-chars "a-zA-Z0-9_" |
| 139 | "List of characters that symbol names may contain.") | 139 | "List of characters that symbol names may contain.") |
| 140 | |||
| 140 | (defconst ruby-symbol-re (concat "[" ruby-symbol-chars "]") | 141 | (defconst ruby-symbol-re (concat "[" ruby-symbol-chars "]") |
| 141 | "Regexp to match symbols.") | 142 | "Regexp to match symbols.") |
| 142 | 143 | ||
| @@ -254,11 +255,13 @@ Also ignores spaces after parenthesis when 'space." | |||
| 254 | ("for" for-body "end") | 255 | ("for" for-body "end") |
| 255 | ("[" expseq "]") | 256 | ("[" expseq "]") |
| 256 | ("{" hashvals "}") | 257 | ("{" hashvals "}") |
| 258 | ("{" insts "}") | ||
| 257 | ("while" insts "end") | 259 | ("while" insts "end") |
| 258 | ("until" insts "end") | 260 | ("until" insts "end") |
| 259 | ("unless" insts "end") | 261 | ("unless" insts "end") |
| 260 | ("if" if-body "end") | 262 | ("if" if-body "end") |
| 261 | ("case" cases "end")) | 263 | ("case" cases "end")) |
| 264 | (formal-params ("opening-|" exp "|")) | ||
| 262 | (for-body (for-head ";" insts)) | 265 | (for-body (for-head ";" insts)) |
| 263 | (for-head (id "in" exp)) | 266 | (for-head (id "in" exp)) |
| 264 | (cases (exp "then" insts) ;; FIXME: Ruby also allows (exp ":" insts). | 267 | (cases (exp "then" insts) ;; FIXME: Ruby also allows (exp ":" insts). |
| @@ -285,10 +288,20 @@ Also ignores spaces after parenthesis when 'space." | |||
| 285 | (save-excursion | 288 | (save-excursion |
| 286 | (skip-chars-backward " \t") | 289 | (skip-chars-backward " \t") |
| 287 | (not (or (bolp) | 290 | (not (or (bolp) |
| 288 | (memq (char-before) '(?\; ?- ?+ ?* ?/ ?:)) | 291 | (and (memq (char-before) '(?\; ?- ?+ ?* ?/ ?: ?.)) |
| 292 | ;; Make sure it's not the end of a regexp. | ||
| 293 | (not (eq (car (syntax-after (1- (point)))) 7))) | ||
| 289 | (and (memq (char-before) '(?\? ?=)) | 294 | (and (memq (char-before) '(?\? ?=)) |
| 290 | (not (memq (char-syntax (char-before (1- (point)))) | 295 | (let ((tok (ruby-smie--backward-token))) |
| 291 | '(?w ?_)))))))) | 296 | (or (equal tok "?") |
| 297 | (string-match "\\`\\s." tok)))))))) | ||
| 298 | |||
| 299 | (defun ruby-smie--opening-pipe-p () | ||
| 300 | (save-excursion | ||
| 301 | (if (eq ?| (char-before)) (forward-char -1)) | ||
| 302 | (skip-chars-backward " \t\n") | ||
| 303 | (or (eq ?\{ (char-before)) | ||
| 304 | (looking-back "\\_<do" (- (point) 2))))) | ||
| 292 | 305 | ||
| 293 | (defun ruby-smie--forward-token () | 306 | (defun ruby-smie--forward-token () |
| 294 | (skip-chars-forward " \t") | 307 | (skip-chars-forward " \t") |
| @@ -299,12 +312,16 @@ Also ignores spaces after parenthesis when 'space." | |||
| 299 | (if (eolp) (forward-char 1) (forward-comment 1)) | 312 | (if (eolp) (forward-char 1) (forward-comment 1)) |
| 300 | ";") | 313 | ";") |
| 301 | (forward-comment (point-max)) | 314 | (forward-comment (point-max)) |
| 315 | (if (looking-at ":\\s.+") | ||
| 316 | (progn (goto-char (match-end 0)) (match-string 0)) ;; bug#15208. | ||
| 302 | (let ((tok (smie-default-forward-token))) | 317 | (let ((tok (smie-default-forward-token))) |
| 303 | (cond | 318 | (cond |
| 304 | ((member tok '("unless" "if" "while" "until")) | 319 | ((member tok '("unless" "if" "while" "until")) |
| 305 | (if (save-excursion (forward-word -1) (ruby-smie--bosp)) | 320 | (if (save-excursion (forward-word -1) (ruby-smie--bosp)) |
| 306 | tok "iuwu-mod")) | 321 | tok "iuwu-mod")) |
| 307 | (t tok))))) | 322 | ((equal tok "|") |
| 323 | (if (ruby-smie--opening-pipe-p) "opening-|" tok)) | ||
| 324 | (t tok)))))) | ||
| 308 | 325 | ||
| 309 | (defun ruby-smie--backward-token () | 326 | (defun ruby-smie--backward-token () |
| 310 | (let ((pos (point))) | 327 | (let ((pos (point))) |
| @@ -314,10 +331,14 @@ Also ignores spaces after parenthesis when 'space." | |||
| 314 | (progn (skip-chars-forward " \t") | 331 | (progn (skip-chars-forward " \t") |
| 315 | ";") | 332 | ";") |
| 316 | (let ((tok (smie-default-backward-token))) | 333 | (let ((tok (smie-default-backward-token))) |
| 334 | (when (and (eq ?: (char-before)) (string-match "\\`\\s." tok)) | ||
| 335 | (forward-char -1) (setq tok (concat ":" tok))) ;; bug#15208. | ||
| 317 | (cond | 336 | (cond |
| 318 | ((member tok '("unless" "if" "while" "until")) | 337 | ((member tok '("unless" "if" "while" "until")) |
| 319 | (if (ruby-smie--bosp) | 338 | (if (ruby-smie--bosp) |
| 320 | tok "iuwu-mod")) | 339 | tok "iuwu-mod")) |
| 340 | ((equal tok "|") | ||
| 341 | (if (ruby-smie--opening-pipe-p) "opening-|" tok)) | ||
| 321 | (t tok)))))) | 342 | (t tok)))))) |
| 322 | 343 | ||
| 323 | (defun ruby-smie-rules (kind token) | 344 | (defun ruby-smie-rules (kind token) |
| @@ -332,7 +353,19 @@ Also ignores spaces after parenthesis when 'space." | |||
| 332 | ;; For (invalid) code between switch and case. | 353 | ;; For (invalid) code between switch and case. |
| 333 | ;; (if (smie-parent-p "switch") 4) | 354 | ;; (if (smie-parent-p "switch") 4) |
| 334 | 0)) | 355 | 0)) |
| 335 | (`(:before . ,(or `"else" `"then" `"elsif")) 0) | 356 | (`(:before . "do") |
| 357 | (when | ||
| 358 | (save-excursion | ||
| 359 | (forward-word 1) ;Skip "do" | ||
| 360 | (skip-chars-forward " \t") | ||
| 361 | (and (equal (save-excursion (ruby-smie--forward-token)) "opening-|") | ||
| 362 | (save-excursion (forward-sexp 1) | ||
| 363 | (skip-chars-forward " \t") | ||
| 364 | (or (eolp) | ||
| 365 | (looking-at comment-start-skip))))) | ||
| 366 | ;; `(column . ,(smie-indent-virtual)) | ||
| 367 | (smie-rule-parent))) | ||
| 368 | (`(:before . ,(or `"else" `"then" `"elsif" `"rescue")) 0) | ||
| 336 | (`(:before . ,(or `"when")) | 369 | (`(:before . ,(or `"when")) |
| 337 | (if (not (smie-rule-sibling-p)) 0)) ;; ruby-indent-level | 370 | (if (not (smie-rule-sibling-p)) 0)) ;; ruby-indent-level |
| 338 | ;; Hack attack: Since newlines are separators, don't try to align args that | 371 | ;; Hack attack: Since newlines are separators, don't try to align args that |
| @@ -903,6 +936,10 @@ Can be one of `heredoc', `modifier', `expr-qstr', `expr-re'." | |||
| 903 | (not (looking-at "[a-z_]")))) | 936 | (not (looking-at "[a-z_]")))) |
| 904 | (and (looking-at ruby-operator-re) | 937 | (and (looking-at ruby-operator-re) |
| 905 | (not (ruby-special-char-p)) | 938 | (not (ruby-special-char-p)) |
| 939 | (save-excursion | ||
| 940 | (forward-char -1) | ||
| 941 | (or (not (looking-at ruby-operator-re)) | ||
| 942 | (not (eq (char-before) ?:)))) | ||
| 906 | ;; Operator at the end of line. | 943 | ;; Operator at the end of line. |
| 907 | (let ((c (char-after (point)))) | 944 | (let ((c (char-after (point)))) |
| 908 | (and | 945 | (and |
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 29020d95226..292bc2369a6 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; sh-script.el --- shell-script editing commands for Emacs | 1 | ;;; sh-script.el --- shell-script editing commands for Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1993-1997, 1999, 2001-2013 Free Software Foundation, | 3 | ;; Copyright (C) 1993-1997, 1999, 2001-2013 Free Software Foundation, Inc. |
| 4 | ;; Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: Daniel Pfeiffer <occitan@esperanto.org> | 5 | ;; Author: Daniel Pfeiffer <occitan@esperanto.org> |
| 7 | ;; Version: 2.0f | 6 | ;; Version: 2.0f |
| @@ -497,6 +496,9 @@ This is buffer-local in every such buffer.") | |||
| 497 | (define-key map "\C-c+" 'sh-add) | 496 | (define-key map "\C-c+" 'sh-add) |
| 498 | (define-key map "\C-\M-x" 'sh-execute-region) | 497 | (define-key map "\C-\M-x" 'sh-execute-region) |
| 499 | (define-key map "\C-c\C-x" 'executable-interpret) | 498 | (define-key map "\C-c\C-x" 'executable-interpret) |
| 499 | (define-key map "\C-c\C-n" 'sh-send-line-or-region-and-step) | ||
| 500 | (define-key map "\C-c\C-d" 'sh-cd-here) | ||
| 501 | (define-key map "\C-c\C-z" 'sh-show-shell) | ||
| 500 | 502 | ||
| 501 | (define-key map [remap delete-backward-char] | 503 | (define-key map [remap delete-backward-char] |
| 502 | 'backward-delete-char-untabify) | 504 | 'backward-delete-char-untabify) |
| @@ -670,7 +672,9 @@ removed when closing the here document." | |||
| 670 | "." "alias" "bg" "bind" "builtin" "caller" "compgen" "complete" | 672 | "." "alias" "bg" "bind" "builtin" "caller" "compgen" "complete" |
| 671 | "declare" "dirs" "disown" "enable" "fc" "fg" "help" "history" | 673 | "declare" "dirs" "disown" "enable" "fc" "fg" "help" "history" |
| 672 | "jobs" "kill" "let" "local" "popd" "printf" "pushd" "shopt" | 674 | "jobs" "kill" "let" "local" "popd" "printf" "pushd" "shopt" |
| 673 | "source" "suspend" "typeset" "unalias") | 675 | "source" "suspend" "typeset" "unalias" |
| 676 | ;; bash4 | ||
| 677 | "mapfile" "readarray") | ||
| 674 | 678 | ||
| 675 | ;; The next entry is only used for defining the others | 679 | ;; The next entry is only used for defining the others |
| 676 | (bourne sh-append shell | 680 | (bourne sh-append shell |
| @@ -734,6 +738,7 @@ implemented as aliases. See `sh-feature'." | |||
| 734 | :type '(repeat (cons (symbol :tag "Shell") | 738 | :type '(repeat (cons (symbol :tag "Shell") |
| 735 | (choice (repeat string) | 739 | (choice (repeat string) |
| 736 | (sexp :format "Evaluate: %v")))) | 740 | (sexp :format "Evaluate: %v")))) |
| 741 | :version "24.4" ; bash4 additions | ||
| 737 | :group 'sh-script) | 742 | :group 'sh-script) |
| 738 | 743 | ||
| 739 | 744 | ||
| @@ -1462,6 +1467,61 @@ The default is t because I assume that in one Emacs session one is | |||
| 1462 | frequently editing existing scripts with different styles.") | 1467 | frequently editing existing scripts with different styles.") |
| 1463 | 1468 | ||
| 1464 | 1469 | ||
| 1470 | ;; inferior shell interaction | ||
| 1471 | ;; TODO: support multiple interactive shells | ||
| 1472 | (defvar sh-shell-process nil | ||
| 1473 | "The inferior shell process for interaction.") | ||
| 1474 | (make-variable-buffer-local 'sh-shell-process) | ||
| 1475 | (defun sh-shell-process (force) | ||
| 1476 | "Get a shell process for interaction. | ||
| 1477 | If FORCE is non-nil and no process found, create one." | ||
| 1478 | (if (and sh-shell-process (process-live-p sh-shell-process)) | ||
| 1479 | sh-shell-process | ||
| 1480 | (setq sh-shell-process | ||
| 1481 | (let ((found nil) proc | ||
| 1482 | (procs (process-list))) | ||
| 1483 | (while (and (not found) procs | ||
| 1484 | (process-live-p (setq proc (pop procs))) | ||
| 1485 | (process-command proc)) | ||
| 1486 | (when (string-equal sh-shell (file-name-nondirectory | ||
| 1487 | (car (process-command proc)))) | ||
| 1488 | (setq found proc))) | ||
| 1489 | (or found | ||
| 1490 | (and force | ||
| 1491 | (get-buffer-process | ||
| 1492 | (let ((explicit-shell-file-name sh-shell-file)) | ||
| 1493 | (shell))))))))) | ||
| 1494 | |||
| 1495 | (defun sh-show-shell () | ||
| 1496 | "Pop the shell interaction buffer." | ||
| 1497 | (interactive) | ||
| 1498 | (pop-to-buffer (process-buffer (sh-shell-process t)))) | ||
| 1499 | |||
| 1500 | (defun sh-send-text (text) | ||
| 1501 | "Send the text to the `sh-shell-process'." | ||
| 1502 | (comint-send-string (sh-shell-process t) (concat text "\n"))) | ||
| 1503 | |||
| 1504 | (defun sh-cd-here () | ||
| 1505 | "Change directory in the current interaction shell to the current one." | ||
| 1506 | (interactive) | ||
| 1507 | (sh-send-text (concat "cd " default-directory))) | ||
| 1508 | |||
| 1509 | (defun sh-send-line-or-region-and-step () | ||
| 1510 | "Send the current line to the inferior shell and step to the next line. | ||
| 1511 | When the region is active, send the region instead." | ||
| 1512 | (interactive) | ||
| 1513 | (let (from to end) | ||
| 1514 | (if (use-region-p) | ||
| 1515 | (setq from (region-beginning) | ||
| 1516 | to (region-end) | ||
| 1517 | end to) | ||
| 1518 | (setq from (line-beginning-position) | ||
| 1519 | to (line-end-position) | ||
| 1520 | end (1+ to))) | ||
| 1521 | (sh-send-text (buffer-substring-no-properties from to)) | ||
| 1522 | (goto-char end))) | ||
| 1523 | |||
| 1524 | |||
| 1465 | ;; mode-command and utility functions | 1525 | ;; mode-command and utility functions |
| 1466 | 1526 | ||
| 1467 | ;;;###autoload | 1527 | ;;;###autoload |
| @@ -2169,6 +2229,7 @@ Calls the value of `sh-set-shell-hook' if set." | |||
| 2169 | (setq font-lock-set-defaults nil) | 2229 | (setq font-lock-set-defaults nil) |
| 2170 | (font-lock-set-defaults) | 2230 | (font-lock-set-defaults) |
| 2171 | (font-lock-fontify-buffer)) | 2231 | (font-lock-fontify-buffer)) |
| 2232 | (setq sh-shell-process nil) | ||
| 2172 | (run-hooks 'sh-set-shell-hook)) | 2233 | (run-hooks 'sh-set-shell-hook)) |
| 2173 | 2234 | ||
| 2174 | 2235 | ||
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index ed911fcbba2..03364bddd9f 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el | |||
| @@ -3256,7 +3256,7 @@ inserted using a single call to `verilog-insert'." | |||
| 3256 | (defun verilog-point-text (&optional pointnum) | 3256 | (defun verilog-point-text (&optional pointnum) |
| 3257 | "Return text describing where POINTNUM or current point is (for errors). | 3257 | "Return text describing where POINTNUM or current point is (for errors). |
| 3258 | Use filename, if current buffer being edited shorten to just buffer name." | 3258 | Use filename, if current buffer being edited shorten to just buffer name." |
| 3259 | (concat (or (and (equal (window-buffer (selected-window)) (current-buffer)) | 3259 | (concat (or (and (equal (window-buffer) (current-buffer)) |
| 3260 | (buffer-name)) | 3260 | (buffer-name)) |
| 3261 | buffer-file-name | 3261 | buffer-file-name |
| 3262 | (buffer-name)) | 3262 | (buffer-name)) |
diff --git a/lisp/register.el b/lisp/register.el index 4876c614642..78f18dbc7c1 100644 --- a/lisp/register.el +++ b/lisp/register.el | |||
| @@ -137,11 +137,11 @@ Argument is a character, naming the register." | |||
| 137 | "Move point to location stored in a register. | 137 | "Move point to location stored in a register. |
| 138 | If the register contains a file name, find that file. | 138 | If the register contains a file name, find that file. |
| 139 | \(To put a file name in a register, you must use `set-register'.) | 139 | \(To put a file name in a register, you must use `set-register'.) |
| 140 | If the register contains a window configuration (one frame) or a frame | 140 | If the register contains a window configuration (one frame) or a frameset |
| 141 | configuration (all frames), restore that frame or all frames accordingly. | 141 | \(all frames), restore that frame or all frames accordingly. |
| 142 | First argument is a character, naming the register. | 142 | First argument is a character, naming the register. |
| 143 | Optional second arg non-nil (interactively, prefix argument) says to | 143 | Optional second arg non-nil (interactively, prefix argument) says to |
| 144 | delete any existing frames that the frame configuration doesn't mention. | 144 | delete any existing frames that the frameset doesn't mention. |
| 145 | \(Otherwise, these frames are iconified.)" | 145 | \(Otherwise, these frames are iconified.)" |
| 146 | (interactive "cJump to register: \nP") | 146 | (interactive "cJump to register: \nP") |
| 147 | (let ((val (get-register register))) | 147 | (let ((val (get-register register))) |
diff --git a/lisp/replace.el b/lisp/replace.el index be0ecda20fa..5e44677b0f8 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -252,7 +252,7 @@ or capitalized.) | |||
| 252 | 252 | ||
| 253 | Ignore read-only matches if `query-replace-skip-read-only' is non-nil, | 253 | Ignore read-only matches if `query-replace-skip-read-only' is non-nil, |
| 254 | ignore hidden matches if `search-invisible' is nil, and ignore more | 254 | ignore hidden matches if `search-invisible' is nil, and ignore more |
| 255 | matches using a non-nil `isearch-filter-predicates'. | 255 | matches using `isearch-filter-predicate'. |
| 256 | 256 | ||
| 257 | If `replace-lax-whitespace' is non-nil, a space or spaces in the string | 257 | If `replace-lax-whitespace' is non-nil, a space or spaces in the string |
| 258 | to be replaced will match a sequence of whitespace chars defined by the | 258 | to be replaced will match a sequence of whitespace chars defined by the |
| @@ -306,7 +306,7 @@ capitalized.) | |||
| 306 | 306 | ||
| 307 | Ignore read-only matches if `query-replace-skip-read-only' is non-nil, | 307 | Ignore read-only matches if `query-replace-skip-read-only' is non-nil, |
| 308 | ignore hidden matches if `search-invisible' is nil, and ignore more | 308 | ignore hidden matches if `search-invisible' is nil, and ignore more |
| 309 | matches using a non-nil `isearch-filter-predicates'. | 309 | matches using `isearch-filter-predicate'. |
| 310 | 310 | ||
| 311 | If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp | 311 | If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp |
| 312 | to be replaced will match a sequence of whitespace chars defined by the | 312 | to be replaced will match a sequence of whitespace chars defined by the |
| @@ -390,7 +390,7 @@ are non-nil and REGEXP has no uppercase letters. | |||
| 390 | 390 | ||
| 391 | Ignore read-only matches if `query-replace-skip-read-only' is non-nil, | 391 | Ignore read-only matches if `query-replace-skip-read-only' is non-nil, |
| 392 | ignore hidden matches if `search-invisible' is nil, and ignore more | 392 | ignore hidden matches if `search-invisible' is nil, and ignore more |
| 393 | matches using a non-nil `isearch-filter-predicates'. | 393 | matches using `isearch-filter-predicate'. |
| 394 | 394 | ||
| 395 | If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp | 395 | If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp |
| 396 | to be replaced will match a sequence of whitespace chars defined by the | 396 | to be replaced will match a sequence of whitespace chars defined by the |
| @@ -484,7 +484,7 @@ then its replacement is upcased or capitalized.) | |||
| 484 | 484 | ||
| 485 | Ignore read-only matches if `query-replace-skip-read-only' is non-nil, | 485 | Ignore read-only matches if `query-replace-skip-read-only' is non-nil, |
| 486 | ignore hidden matches if `search-invisible' is nil, and ignore more | 486 | ignore hidden matches if `search-invisible' is nil, and ignore more |
| 487 | matches using a non-nil `isearch-filter-predicates'. | 487 | matches using `isearch-filter-predicate'. |
| 488 | 488 | ||
| 489 | If `replace-lax-whitespace' is non-nil, a space or spaces in the string | 489 | If `replace-lax-whitespace' is non-nil, a space or spaces in the string |
| 490 | to be replaced will match a sequence of whitespace chars defined by the | 490 | to be replaced will match a sequence of whitespace chars defined by the |
| @@ -530,7 +530,7 @@ are non-nil and REGEXP has no uppercase letters. | |||
| 530 | 530 | ||
| 531 | Ignore read-only matches if `query-replace-skip-read-only' is non-nil, | 531 | Ignore read-only matches if `query-replace-skip-read-only' is non-nil, |
| 532 | ignore hidden matches if `search-invisible' is nil, and ignore more | 532 | ignore hidden matches if `search-invisible' is nil, and ignore more |
| 533 | matches using a non-nil `isearch-filter-predicates'. | 533 | matches using `isearch-filter-predicate'. |
| 534 | 534 | ||
| 535 | If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp | 535 | If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp |
| 536 | to be replaced will match a sequence of whitespace chars defined by the | 536 | to be replaced will match a sequence of whitespace chars defined by the |
| @@ -2087,9 +2087,8 @@ make, or the user didn't cancel the call." | |||
| 2087 | 'read-only nil)))) | 2087 | 'read-only nil)))) |
| 2088 | (setq skip-read-only-count (1+ skip-read-only-count))) | 2088 | (setq skip-read-only-count (1+ skip-read-only-count))) |
| 2089 | ;; Optionally filter out matches. | 2089 | ;; Optionally filter out matches. |
| 2090 | ((not (run-hook-with-args-until-failure | 2090 | ((not (funcall isearch-filter-predicate |
| 2091 | 'isearch-filter-predicates | 2091 | (nth 0 real-match-data) (nth 1 real-match-data))) |
| 2092 | (nth 0 real-match-data) (nth 1 real-match-data))) | ||
| 2093 | (setq skip-filtered-count (1+ skip-filtered-count))) | 2092 | (setq skip-filtered-count (1+ skip-filtered-count))) |
| 2094 | ;; Optionally ignore invisible matches. | 2093 | ;; Optionally ignore invisible matches. |
| 2095 | ((not (or (eq search-invisible t) | 2094 | ((not (or (eq search-invisible t) |
diff --git a/lisp/reposition.el b/lisp/reposition.el index 0bd27654065..c67200f9550 100644 --- a/lisp/reposition.el +++ b/lisp/reposition.el | |||
| @@ -61,7 +61,7 @@ first comment line visible (if point is in a comment)." | |||
| 61 | (here (point)) | 61 | (here (point)) |
| 62 | ;; change this name once I've gotten rid of references to ht. | 62 | ;; change this name once I've gotten rid of references to ht. |
| 63 | ;; this is actually the number of the last screen line | 63 | ;; this is actually the number of the last screen line |
| 64 | (ht (- (window-height (selected-window)) 2)) | 64 | (ht (- (window-height) 2)) |
| 65 | (line (repos-count-screen-lines (window-start) (point))) | 65 | (line (repos-count-screen-lines (window-start) (point))) |
| 66 | (comment-height | 66 | (comment-height |
| 67 | ;; The call to max deals with the case of cursor between defuns. | 67 | ;; The call to max deals with the case of cursor between defuns. |
diff --git a/lisp/rfn-eshadow.el b/lisp/rfn-eshadow.el index cf5f1d16974..8d29c43980c 100644 --- a/lisp/rfn-eshadow.el +++ b/lisp/rfn-eshadow.el | |||
| @@ -176,11 +176,11 @@ This is intended to be used as a minibuffer `post-command-hook' for | |||
| 176 | `file-name-shadow-mode'; the minibuffer should have already | 176 | `file-name-shadow-mode'; the minibuffer should have already |
| 177 | been set up by `rfn-eshadow-setup-minibuffer'." | 177 | been set up by `rfn-eshadow-setup-minibuffer'." |
| 178 | (condition-case nil | 178 | (condition-case nil |
| 179 | (let ((goal (substitute-in-file-name (minibuffer-contents))) | 179 | (let* ((non-essential t) |
| 180 | (mid (overlay-end rfn-eshadow-overlay)) | 180 | (goal (substitute-in-file-name (minibuffer-contents))) |
| 181 | (start (minibuffer-prompt-end)) | 181 | (mid (overlay-end rfn-eshadow-overlay)) |
| 182 | (end (point-max)) | 182 | (start (minibuffer-prompt-end)) |
| 183 | (non-essential t)) | 183 | (end (point-max))) |
| 184 | (unless | 184 | (unless |
| 185 | ;; Catch the common case where the shadow does not need to move. | 185 | ;; Catch the common case where the shadow does not need to move. |
| 186 | (and mid | 186 | (and mid |
diff --git a/lisp/rot13.el b/lisp/rot13.el index 03beed3a85b..1b61855f2dc 100644 --- a/lisp/rot13.el +++ b/lisp/rot13.el | |||
| @@ -101,9 +101,9 @@ See also `toggle-rot13-mode'." | |||
| 101 | (defun toggle-rot13-mode () | 101 | (defun toggle-rot13-mode () |
| 102 | "Toggle the use of ROT13 encoding for the current window." | 102 | "Toggle the use of ROT13 encoding for the current window." |
| 103 | (interactive) | 103 | (interactive) |
| 104 | (if (eq (window-display-table (selected-window)) rot13-display-table) | 104 | (if (eq (window-display-table) rot13-display-table) |
| 105 | (set-window-display-table (selected-window) nil) | 105 | (set-window-display-table (selected-window) nil) |
| 106 | (if (null (window-display-table (selected-window))) | 106 | (if (null (window-display-table)) |
| 107 | (set-window-display-table (selected-window) rot13-display-table)))) | 107 | (set-window-display-table (selected-window) rot13-display-table)))) |
| 108 | 108 | ||
| 109 | (provide 'rot13) | 109 | (provide 'rot13) |
diff --git a/lisp/server.el b/lisp/server.el index 8a2a466a315..a76b2d4ce5f 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -1557,7 +1557,7 @@ be a cons cell (LINENUMBER . COLUMNNUMBER)." | |||
| 1557 | (setq next-buffer (car (process-get proc 'buffers)))) | 1557 | (setq next-buffer (car (process-get proc 'buffers)))) |
| 1558 | (setq rest (cdr rest))))) | 1558 | (setq rest (cdr rest))))) |
| 1559 | (and next-buffer (server-switch-buffer next-buffer killed-one)) | 1559 | (and next-buffer (server-switch-buffer next-buffer killed-one)) |
| 1560 | (unless (or next-buffer killed-one (window-dedicated-p (selected-window))) | 1560 | (unless (or next-buffer killed-one (window-dedicated-p)) |
| 1561 | ;; (switch-to-buffer (other-buffer)) | 1561 | ;; (switch-to-buffer (other-buffer)) |
| 1562 | (message "No server buffers remain to edit"))) | 1562 | (message "No server buffers remain to edit"))) |
| 1563 | (if (not (buffer-live-p next-buffer)) | 1563 | (if (not (buffer-live-p next-buffer)) |
| @@ -1584,16 +1584,16 @@ be a cons cell (LINENUMBER . COLUMNNUMBER)." | |||
| 1584 | (unless (frame-live-p server-window) | 1584 | (unless (frame-live-p server-window) |
| 1585 | (setq server-window (make-frame))) | 1585 | (setq server-window (make-frame))) |
| 1586 | (select-window (frame-selected-window server-window)))) | 1586 | (select-window (frame-selected-window server-window)))) |
| 1587 | (when (window-minibuffer-p (selected-window)) | 1587 | (when (window-minibuffer-p) |
| 1588 | (select-window (next-window nil 'nomini 0))) | 1588 | (select-window (next-window nil 'nomini 0))) |
| 1589 | ;; Move to a non-dedicated window, if we have one. | 1589 | ;; Move to a non-dedicated window, if we have one. |
| 1590 | (when (window-dedicated-p (selected-window)) | 1590 | (when (window-dedicated-p) |
| 1591 | (select-window | 1591 | (select-window |
| 1592 | (get-window-with-predicate | 1592 | (get-window-with-predicate |
| 1593 | (lambda (w) | 1593 | (lambda (w) |
| 1594 | (and (not (window-dedicated-p w)) | 1594 | (and (not (window-dedicated-p w)) |
| 1595 | (equal (frame-terminal (window-frame w)) | 1595 | (equal (frame-terminal (window-frame w)) |
| 1596 | (frame-terminal (selected-frame))))) | 1596 | (frame-terminal)))) |
| 1597 | 'nomini 'visible (selected-window)))) | 1597 | 'nomini 'visible (selected-window)))) |
| 1598 | (condition-case nil | 1598 | (condition-case nil |
| 1599 | (switch-to-buffer next-buffer) | 1599 | (switch-to-buffer next-buffer) |
| @@ -1601,7 +1601,7 @@ be a cons cell (LINENUMBER . COLUMNNUMBER)." | |||
| 1601 | ;; a minibuffer/dedicated-window (if there's no other). | 1601 | ;; a minibuffer/dedicated-window (if there's no other). |
| 1602 | (error (pop-to-buffer next-buffer))))))) | 1602 | (error (pop-to-buffer next-buffer))))))) |
| 1603 | (when server-raise-frame | 1603 | (when server-raise-frame |
| 1604 | (select-frame-set-input-focus (window-frame (selected-window)))))) | 1604 | (select-frame-set-input-focus (window-frame))))) |
| 1605 | 1605 | ||
| 1606 | ;;;###autoload | 1606 | ;;;###autoload |
| 1607 | (defun server-save-buffers-kill-terminal (arg) | 1607 | (defun server-save-buffers-kill-terminal (arg) |
diff --git a/lisp/ses.el b/lisp/ses.el index bf88364456f..5f48dd2f27e 100644 --- a/lisp/ses.el +++ b/lisp/ses.el | |||
| @@ -703,7 +703,6 @@ for this spreadsheet." | |||
| 703 | (and (string-match "\\`\\([A-Z]+\\)\\([0-9]+\\)\\'" str) | 703 | (and (string-match "\\`\\([A-Z]+\\)\\([0-9]+\\)\\'" str) |
| 704 | (let* ((col-str (match-string-no-properties 1 str)) | 704 | (let* ((col-str (match-string-no-properties 1 str)) |
| 705 | (col 0) | 705 | (col 0) |
| 706 | (col-offset 0) | ||
| 707 | (col-base 1) | 706 | (col-base 1) |
| 708 | (col-idx (1- (length col-str))) | 707 | (col-idx (1- (length col-str))) |
| 709 | (row (1- (string-to-number (match-string-no-properties 2 str))))) | 708 | (row (1- (string-to-number (match-string-no-properties 2 str))))) |
| @@ -740,7 +739,7 @@ row and column of the cell, with numbering starting from 0. | |||
| 740 | Return nil in case of failure." | 739 | Return nil in case of failure." |
| 741 | (unless (local-variable-p sym) | 740 | (unless (local-variable-p sym) |
| 742 | (make-local-variable sym) | 741 | (make-local-variable sym) |
| 743 | (if (let (case-fold-search) (string-match "\\`[A-Z]+[0-9]+\\'" (symbol-name sym))) | 742 | (if (let (case-fold-search) (string-match-p "\\`[A-Z]+[0-9]+\\'" (symbol-name sym))) |
| 744 | (put sym 'ses-cell (cons row col)) | 743 | (put sym 'ses-cell (cons row col)) |
| 745 | (put sym 'ses-cell :ses-named) | 744 | (put sym 'ses-cell :ses-named) |
| 746 | (setq ses--named-cell-hashmap (or ses--named-cell-hashmap (make-hash-table :test 'eq))) | 745 | (setq ses--named-cell-hashmap (or ses--named-cell-hashmap (make-hash-table :test 'eq))) |
| @@ -1474,7 +1473,7 @@ Sets `ses-relocate-return' to 'delete if cell-references were removed." | |||
| 1474 | (let (rowcol result) | 1473 | (let (rowcol result) |
| 1475 | (if (or (atom formula) (eq (car formula) 'quote)) | 1474 | (if (or (atom formula) (eq (car formula) 'quote)) |
| 1476 | (if (and (setq rowcol (ses-sym-rowcol formula)) | 1475 | (if (and (setq rowcol (ses-sym-rowcol formula)) |
| 1477 | (string-match "\\`[A-Z]+[0-9]+\\'" (symbol-name formula))) | 1476 | (string-match-p "\\`[A-Z]+[0-9]+\\'" (symbol-name formula))) |
| 1478 | (ses-relocate-symbol formula rowcol | 1477 | (ses-relocate-symbol formula rowcol |
| 1479 | startrow startcol rowincr colincr) | 1478 | startrow startcol rowincr colincr) |
| 1480 | formula) ; Pass through as-is. | 1479 | formula) ; Pass through as-is. |
| @@ -1735,7 +1734,7 @@ Does not execute cell formulas or print functions." | |||
| 1735 | (search-backward ";; Local Variables:\n" nil t) | 1734 | (search-backward ";; Local Variables:\n" nil t) |
| 1736 | (backward-list 1) | 1735 | (backward-list 1) |
| 1737 | (setq ses--params-marker (point-marker)) | 1736 | (setq ses--params-marker (point-marker)) |
| 1738 | (let ((params (condition-case nil (read (current-buffer)) (error nil)))) | 1737 | (let ((params (ignore-errors (read (current-buffer))))) |
| 1739 | (or (and (= (safe-length params) 3) | 1738 | (or (and (= (safe-length params) 3) |
| 1740 | (numberp (car params)) | 1739 | (numberp (car params)) |
| 1741 | (numberp (cadr params)) | 1740 | (numberp (cadr params)) |
| @@ -1761,7 +1760,7 @@ Does not execute cell formulas or print functions." | |||
| 1761 | ;; Skip over print area, which we assume is correct. | 1760 | ;; Skip over print area, which we assume is correct. |
| 1762 | (goto-char (point-min)) | 1761 | (goto-char (point-min)) |
| 1763 | (forward-line ses--numrows) | 1762 | (forward-line ses--numrows) |
| 1764 | (or (looking-at ses-print-data-boundary) | 1763 | (or (looking-at-p ses-print-data-boundary) |
| 1765 | (error "Missing marker between print and data areas")) | 1764 | (error "Missing marker between print and data areas")) |
| 1766 | (forward-char 1) | 1765 | (forward-char 1) |
| 1767 | (setq ses--data-marker (point-marker)) | 1766 | (setq ses--data-marker (point-marker)) |
| @@ -1774,12 +1773,12 @@ Does not execute cell formulas or print functions." | |||
| 1774 | (dotimes (col ses--numcols) | 1773 | (dotimes (col ses--numcols) |
| 1775 | (let* ((x (read (current-buffer))) | 1774 | (let* ((x (read (current-buffer))) |
| 1776 | (sym (car-safe (cdr-safe x)))) | 1775 | (sym (car-safe (cdr-safe x)))) |
| 1777 | (or (and (looking-at "\n") | 1776 | (or (and (looking-at-p "\n") |
| 1778 | (eq (car-safe x) 'ses-cell) | 1777 | (eq (car-safe x) 'ses-cell) |
| 1779 | (ses-create-cell-variable sym row col)) | 1778 | (ses-create-cell-variable sym row col)) |
| 1780 | (error "Cell-def error")) | 1779 | (error "Cell-def error")) |
| 1781 | (eval x))) | 1780 | (eval x))) |
| 1782 | (or (looking-at "\n\n") | 1781 | (or (looking-at-p "\n\n") |
| 1783 | (error "Missing blank line between rows"))) | 1782 | (error "Missing blank line between rows"))) |
| 1784 | ;; Load global parameters. | 1783 | ;; Load global parameters. |
| 1785 | (let ((widths (read (current-buffer))) | 1784 | (let ((widths (read (current-buffer))) |
| @@ -1805,8 +1804,8 @@ Does not execute cell formulas or print functions." | |||
| 1805 | (1value (eval head-row))) | 1804 | (1value (eval head-row))) |
| 1806 | ;; Should be back at global-params. | 1805 | ;; Should be back at global-params. |
| 1807 | (forward-char 1) | 1806 | (forward-char 1) |
| 1808 | (or (looking-at (replace-regexp-in-string "1" "[0-9]+" | 1807 | (or (looking-at-p (replace-regexp-in-string "1" "[0-9]+" |
| 1809 | ses-initial-global-parameters)) | 1808 | ses-initial-global-parameters)) |
| 1810 | (error "Problem with column-defs or global-params")) | 1809 | (error "Problem with column-defs or global-params")) |
| 1811 | ;; Check for overall newline count in definitions area. | 1810 | ;; Check for overall newline count in definitions area. |
| 1812 | (forward-line 3) | 1811 | (forward-line 3) |
| @@ -2077,9 +2076,8 @@ Based on the current set of columns and `window-hscroll' position." | |||
| 2077 | 2076 | ||
| 2078 | (defun ses-jump-safe (cell) | 2077 | (defun ses-jump-safe (cell) |
| 2079 | "Like `ses-jump', but no error if invalid cell." | 2078 | "Like `ses-jump', but no error if invalid cell." |
| 2080 | (condition-case nil | 2079 | (ignore-errors |
| 2081 | (ses-jump cell) | 2080 | (ses-jump cell))) |
| 2082 | (error))) | ||
| 2083 | 2081 | ||
| 2084 | (defun ses-reprint-all (&optional nonarrow) | 2082 | (defun ses-reprint-all (&optional nonarrow) |
| 2085 | "Recreate the display area. Calls all printer functions. Narrows to | 2083 | "Recreate the display area. Calls all printer functions. Narrows to |
| @@ -2789,7 +2787,7 @@ We clear the killed cells instead of deleting them." | |||
| 2789 | ;; For some reason, the text-read-only error is not caught by `delete-region', | 2787 | ;; For some reason, the text-read-only error is not caught by `delete-region', |
| 2790 | ;; so we have to use subterfuge. | 2788 | ;; so we have to use subterfuge. |
| 2791 | (let ((buffer-read-only t)) | 2789 | (let ((buffer-read-only t)) |
| 2792 | (1value (condition-case x | 2790 | (1value (condition-case nil |
| 2793 | (noreturn (funcall (lookup-key (current-global-map) | 2791 | (noreturn (funcall (lookup-key (current-global-map) |
| 2794 | (this-command-keys)) | 2792 | (this-command-keys)) |
| 2795 | beg end)) | 2793 | beg end)) |
| @@ -3014,13 +3012,13 @@ spot, or error signal if user requests cancel." | |||
| 3014 | (ses-col-printer (1- ses--numcols))))) | 3012 | (ses-col-printer (1- ses--numcols))))) |
| 3015 | rowcol)) | 3013 | rowcol)) |
| 3016 | 3014 | ||
| 3017 | (defun ses-export-tsv (beg end) | 3015 | (defun ses-export-tsv (_beg _end) |
| 3018 | "Export values from the current range, with tabs between columns and | 3016 | "Export values from the current range, with tabs between columns and |
| 3019 | newlines between rows. Result is placed in kill ring." | 3017 | newlines between rows. Result is placed in kill ring." |
| 3020 | (interactive "r") | 3018 | (interactive "r") |
| 3021 | (ses-export-tab nil)) | 3019 | (ses-export-tab nil)) |
| 3022 | 3020 | ||
| 3023 | (defun ses-export-tsf (beg end) | 3021 | (defun ses-export-tsf (_beg _end) |
| 3024 | "Export formulas from the current range, with tabs between columns and | 3022 | "Export formulas from the current range, with tabs between columns and |
| 3025 | newlines between rows. Result is placed in kill ring." | 3023 | newlines between rows. Result is placed in kill ring." |
| 3026 | (interactive "r") | 3024 | (interactive "r") |
| @@ -3298,7 +3296,7 @@ highlighted range in the spreadsheet." | |||
| 3298 | (let* ((x (ses-sym-rowcol ref)) | 3296 | (let* ((x (ses-sym-rowcol ref)) |
| 3299 | (xcell (ses-get-cell (car x) (cdr x)))) | 3297 | (xcell (ses-get-cell (car x) (cdr x)))) |
| 3300 | (ses-cell-references-aset xcell | 3298 | (ses-cell-references-aset xcell |
| 3301 | (cons new-name (delq sym | 3299 | (cons new-name (delq sym |
| 3302 | (ses-cell-references xcell)))))) | 3300 | (ses-cell-references xcell)))))) |
| 3303 | (push new-name ses--renamed-cell-symb-list) | 3301 | (push new-name ses--renamed-cell-symb-list) |
| 3304 | (set new-name (symbol-value sym)) | 3302 | (set new-name (symbol-value sym)) |
| @@ -3579,7 +3577,7 @@ current column and continues until the next nonblank column." | |||
| 3579 | current column and continues until the next nonblank column." | 3577 | current column and continues until the next nonblank column." |
| 3580 | (ses-center-span value ?~)) | 3578 | (ses-center-span value ?~)) |
| 3581 | 3579 | ||
| 3582 | (defun ses-unsafe (value) | 3580 | (defun ses-unsafe (_value) |
| 3583 | "Substitute for an unsafe formula or printer." | 3581 | "Substitute for an unsafe formula or printer." |
| 3584 | (error "Unsafe formula or printer")) | 3582 | (error "Unsafe formula or printer")) |
| 3585 | 3583 | ||
diff --git a/lisp/shell.el b/lisp/shell.el index a78ab7f81ab..3ca2564b65c 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -1122,7 +1122,7 @@ Returns t if successful." | |||
| 1122 | (interactive) | 1122 | (interactive) |
| 1123 | (let ((data (shell-command-completion))) | 1123 | (let ((data (shell-command-completion))) |
| 1124 | (if data | 1124 | (if data |
| 1125 | (prog2 (unless (window-minibuffer-p (selected-window)) | 1125 | (prog2 (unless (window-minibuffer-p) |
| 1126 | (message "Completing command name...")) | 1126 | (message "Completing command name...")) |
| 1127 | (apply #'completion-in-region data))))) | 1127 | (apply #'completion-in-region data))))) |
| 1128 | 1128 | ||
| @@ -1232,7 +1232,7 @@ Returns non-nil if successful." | |||
| 1232 | (interactive) | 1232 | (interactive) |
| 1233 | (let ((data (shell-environment-variable-completion))) | 1233 | (let ((data (shell-environment-variable-completion))) |
| 1234 | (if data | 1234 | (if data |
| 1235 | (prog2 (unless (window-minibuffer-p (selected-window)) | 1235 | (prog2 (unless (window-minibuffer-p) |
| 1236 | (message "Completing variable name...")) | 1236 | (message "Completing variable name...")) |
| 1237 | (apply #'completion-in-region data))))) | 1237 | (apply #'completion-in-region data))))) |
| 1238 | 1238 | ||
diff --git a/lisp/simple.el b/lisp/simple.el index 1fb2fa6014c..c5e5b313b7b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1404,11 +1404,25 @@ to get different commands to edit and resubmit." | |||
| 1404 | ;; add it to the history. | 1404 | ;; add it to the history. |
| 1405 | (or (equal newcmd (car command-history)) | 1405 | (or (equal newcmd (car command-history)) |
| 1406 | (setq command-history (cons newcmd command-history))) | 1406 | (setq command-history (cons newcmd command-history))) |
| 1407 | (eval newcmd)) | 1407 | (unwind-protect |
| 1408 | (progn | ||
| 1409 | ;; Trick called-interactively-p into thinking that `newcmd' is | ||
| 1410 | ;; an interactive call (bug#14136). | ||
| 1411 | (add-hook 'called-interactively-p-functions | ||
| 1412 | #'repeat-complex-command--called-interactively-skip) | ||
| 1413 | (eval newcmd)) | ||
| 1414 | (remove-hook 'called-interactively-p-functions | ||
| 1415 | #'repeat-complex-command--called-interactively-skip))) | ||
| 1408 | (if command-history | 1416 | (if command-history |
| 1409 | (error "Argument %d is beyond length of command history" arg) | 1417 | (error "Argument %d is beyond length of command history" arg) |
| 1410 | (error "There are no previous complex commands to repeat"))))) | 1418 | (error "There are no previous complex commands to repeat"))))) |
| 1411 | 1419 | ||
| 1420 | (defun repeat-complex-command--called-interactively-skip (i _frame1 frame2) | ||
| 1421 | (and (eq 'eval (cadr frame2)) | ||
| 1422 | (eq 'repeat-complex-command | ||
| 1423 | (cadr (backtrace-frame i #'called-interactively-p))) | ||
| 1424 | 1)) | ||
| 1425 | |||
| 1412 | (defvar extended-command-history nil) | 1426 | (defvar extended-command-history nil) |
| 1413 | 1427 | ||
| 1414 | (defun read-extended-command () | 1428 | (defun read-extended-command () |
| @@ -3338,6 +3352,7 @@ extract characters that are special to a buffer, and should not | |||
| 3338 | be copied into other buffers." | 3352 | be copied into other buffers." |
| 3339 | (funcall filter-buffer-substring-function beg end delete)) | 3353 | (funcall filter-buffer-substring-function beg end delete)) |
| 3340 | 3354 | ||
| 3355 | ;; FIXME: `with-wrapper-hook' is obsolete | ||
| 3341 | (defun buffer-substring--filter (beg end &optional delete) | 3356 | (defun buffer-substring--filter (beg end &optional delete) |
| 3342 | (with-wrapper-hook filter-buffer-substring-functions (beg end delete) | 3357 | (with-wrapper-hook filter-buffer-substring-functions (beg end delete) |
| 3343 | (cond | 3358 | (cond |
| @@ -4098,9 +4113,9 @@ Don't call it from programs: use `insert-buffer-substring' instead!" | |||
| 4098 | (progn | 4113 | (progn |
| 4099 | (barf-if-buffer-read-only) | 4114 | (barf-if-buffer-read-only) |
| 4100 | (read-buffer "Insert buffer: " | 4115 | (read-buffer "Insert buffer: " |
| 4101 | (if (eq (selected-window) (next-window (selected-window))) | 4116 | (if (eq (selected-window) (next-window)) |
| 4102 | (other-buffer (current-buffer)) | 4117 | (other-buffer (current-buffer)) |
| 4103 | (window-buffer (next-window (selected-window)))) | 4118 | (window-buffer (next-window))) |
| 4104 | t)))) | 4119 | t)))) |
| 4105 | (push-mark | 4120 | (push-mark |
| 4106 | (save-excursion | 4121 | (save-excursion |
| @@ -4160,8 +4175,7 @@ START and END specify the portion of the current buffer to be copied." | |||
| 4160 | (save-excursion | 4175 | (save-excursion |
| 4161 | (insert-buffer-substring oldbuf start end))))) | 4176 | (insert-buffer-substring oldbuf start end))))) |
| 4162 | 4177 | ||
| 4163 | (put 'mark-inactive 'error-conditions '(mark-inactive error)) | 4178 | (define-error 'mark-inactive (purecopy "The mark is not active now")) |
| 4164 | (put 'mark-inactive 'error-message (purecopy "The mark is not active now")) | ||
| 4165 | 4179 | ||
| 4166 | (defvar activate-mark-hook nil | 4180 | (defvar activate-mark-hook nil |
| 4167 | "Hook run when the mark becomes active. | 4181 | "Hook run when the mark becomes active. |
| @@ -5671,7 +5685,8 @@ current object." | |||
| 5671 | 5685 | ||
| 5672 | (defun backward-word (&optional arg) | 5686 | (defun backward-word (&optional arg) |
| 5673 | "Move backward until encountering the beginning of a word. | 5687 | "Move backward until encountering the beginning of a word. |
| 5674 | With argument ARG, do this that many times." | 5688 | With argument ARG, do this that many times. |
| 5689 | If ARG is omitted or nil, move point backward one word." | ||
| 5675 | (interactive "^p") | 5690 | (interactive "^p") |
| 5676 | (forward-word (- (or arg 1)))) | 5691 | (forward-word (- (or arg 1)))) |
| 5677 | 5692 | ||
| @@ -5965,7 +5980,7 @@ The variable `selective-display' has a separate value for each buffer." | |||
| 5965 | (setq selective-display | 5980 | (setq selective-display |
| 5966 | (and arg (prefix-numeric-value arg))) | 5981 | (and arg (prefix-numeric-value arg))) |
| 5967 | (recenter current-vpos)) | 5982 | (recenter current-vpos)) |
| 5968 | (set-window-start (selected-window) (window-start (selected-window))) | 5983 | (set-window-start (selected-window) (window-start)) |
| 5969 | (princ "selective-display set to " t) | 5984 | (princ "selective-display set to " t) |
| 5970 | (prin1 selective-display t) | 5985 | (prin1 selective-display t) |
| 5971 | (princ "." t)) | 5986 | (princ "." t)) |
| @@ -6629,8 +6644,7 @@ Go to the window from which completion was requested." | |||
| 6629 | (interactive) | 6644 | (interactive) |
| 6630 | (let ((buf completion-reference-buffer)) | 6645 | (let ((buf completion-reference-buffer)) |
| 6631 | (if (one-window-p t) | 6646 | (if (one-window-p t) |
| 6632 | (if (window-dedicated-p (selected-window)) | 6647 | (if (window-dedicated-p) (delete-frame)) |
| 6633 | (delete-frame (selected-frame))) | ||
| 6634 | (delete-window (selected-window)) | 6648 | (delete-window (selected-window)) |
| 6635 | (if (get-buffer-window buf) | 6649 | (if (get-buffer-window buf) |
| 6636 | (select-window (get-buffer-window buf)))))) | 6650 | (select-window (get-buffer-window buf)))))) |
diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 2f995219193..52796755625 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el | |||
| @@ -1007,9 +1007,9 @@ supported at a time. | |||
| 1007 | ;; with the selected frame. | 1007 | ;; with the selected frame. |
| 1008 | (list 'parent (selected-frame))) | 1008 | (list 'parent (selected-frame))) |
| 1009 | speedbar-frame-parameters) | 1009 | speedbar-frame-parameters) |
| 1010 | speedbar-before-delete-hook | 1010 | 'speedbar-before-delete-hook |
| 1011 | speedbar-before-popup-hook | 1011 | 'speedbar-before-popup-hook |
| 1012 | speedbar-after-create-hook) | 1012 | 'speedbar-after-create-hook) |
| 1013 | ;; Start up the timer | 1013 | ;; Start up the timer |
| 1014 | (if (not speedbar-frame) | 1014 | (if (not speedbar-frame) |
| 1015 | (speedbar-set-timer nil) | 1015 | (speedbar-set-timer nil) |
| @@ -2648,7 +2648,7 @@ Also resets scanner functions." | |||
| 2648 | (dframe-select-attached-frame speedbar-frame) | 2648 | (dframe-select-attached-frame speedbar-frame) |
| 2649 | ;; make sure we at least choose a window to | 2649 | ;; make sure we at least choose a window to |
| 2650 | ;; get a good directory from | 2650 | ;; get a good directory from |
| 2651 | (if (window-minibuffer-p (selected-window)) | 2651 | (if (window-minibuffer-p) |
| 2652 | nil | 2652 | nil |
| 2653 | ;; Check for special modes | 2653 | ;; Check for special modes |
| 2654 | (speedbar-maybe-add-localized-support (current-buffer)) | 2654 | (speedbar-maybe-add-localized-support (current-buffer)) |
| @@ -3512,7 +3512,7 @@ interested in." | |||
| 3512 | (set-buffer speedbar-buffer) | 3512 | (set-buffer speedbar-buffer) |
| 3513 | 3513 | ||
| 3514 | (if (<= (count-lines (point-min) (point-max)) | 3514 | (if (<= (count-lines (point-min) (point-max)) |
| 3515 | (1- (window-height (selected-window)))) | 3515 | (1- (window-height))) |
| 3516 | ;; whole buffer fits | 3516 | ;; whole buffer fits |
| 3517 | (let ((cp (point))) | 3517 | (let ((cp (point))) |
| 3518 | 3518 | ||
| @@ -3545,7 +3545,7 @@ interested in." | |||
| 3545 | (setq end (point-max))))) | 3545 | (setq end (point-max))))) |
| 3546 | ;; Now work out the details of centering | 3546 | ;; Now work out the details of centering |
| 3547 | (let ((nl (count-lines start end)) | 3547 | (let ((nl (count-lines start end)) |
| 3548 | (wl (1- (window-height (selected-window)))) | 3548 | (wl (1- (window-height))) |
| 3549 | (cp (point))) | 3549 | (cp (point))) |
| 3550 | (if (> nl wl) | 3550 | (if (> nl wl) |
| 3551 | ;; We can't fit it all, so just center on cursor | 3551 | ;; We can't fit it all, so just center on cursor |
| @@ -3558,12 +3558,12 @@ interested in." | |||
| 3558 | nil | 3558 | nil |
| 3559 | ;; we need to do something... | 3559 | ;; we need to do something... |
| 3560 | (goto-char start) | 3560 | (goto-char start) |
| 3561 | (let ((newcent (/ (- (window-height (selected-window)) nl) 2)) | 3561 | (let ((newcent (/ (- (window-height) nl) 2)) |
| 3562 | (lte (count-lines start (point-max)))) | 3562 | (lte (count-lines start (point-max)))) |
| 3563 | (if (and (< (+ newcent lte) (window-height (selected-window))) | 3563 | (if (and (< (+ newcent lte) (window-height)) |
| 3564 | (> (- (window-height (selected-window)) lte 1) | 3564 | (> (- (window-height) lte 1) |
| 3565 | newcent)) | 3565 | newcent)) |
| 3566 | (setq newcent (- (window-height (selected-window)) | 3566 | (setq newcent (- (window-height) |
| 3567 | lte 1))) | 3567 | lte 1))) |
| 3568 | (recenter newcent)))) | 3568 | (recenter newcent)))) |
| 3569 | (goto-char cp)))))) | 3569 | (goto-char cp)))))) |
| @@ -3997,7 +3997,7 @@ TEXT is the buffer's name, TOKEN and INDENT are unused." | |||
| 3997 | 3997 | ||
| 3998 | (defun speedbar-recenter () | 3998 | (defun speedbar-recenter () |
| 3999 | "Recenter the current buffer so point is in the center of the window." | 3999 | "Recenter the current buffer so point is in the center of the window." |
| 4000 | (recenter (/ (window-height (selected-window)) 2))) | 4000 | (recenter (/ (window-height) 2))) |
| 4001 | 4001 | ||
| 4002 | 4002 | ||
| 4003 | ;;; Color loading section. | 4003 | ;;; Color loading section. |
diff --git a/lisp/startup.el b/lisp/startup.el index 44eea7745f7..ec7d73306a2 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -1541,7 +1541,7 @@ a face or button specification." | |||
| 1541 | (t "splash.pbm"))) | 1541 | (t "splash.pbm"))) |
| 1542 | (img (create-image image-file)) | 1542 | (img (create-image image-file)) |
| 1543 | (image-width (and img (car (image-size img)))) | 1543 | (image-width (and img (car (image-size img)))) |
| 1544 | (window-width (window-width (selected-window)))) | 1544 | (window-width (window-width))) |
| 1545 | (when img | 1545 | (when img |
| 1546 | (when (> window-width image-width) | 1546 | (when (> window-width image-width) |
| 1547 | ;; Center the image in the window. | 1547 | ;; Center the image in the window. |
diff --git a/lisp/subr.el b/lisp/subr.el index 3b85a9bedb0..b8b0d5af3b8 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -312,6 +312,26 @@ result of an actual problem." | |||
| 312 | (while t | 312 | (while t |
| 313 | (signal 'user-error (list (apply #'format format args))))) | 313 | (signal 'user-error (list (apply #'format format args))))) |
| 314 | 314 | ||
| 315 | (defun define-error (name message &optional parent) | ||
| 316 | "Define NAME as a new error signal. | ||
| 317 | MESSAGE is a string that will be output to the echo area if such an error | ||
| 318 | is signaled without being caught by a `condition-case'. | ||
| 319 | PARENT is either a signal or a list of signals from which it inherits. | ||
| 320 | Defaults to `error'." | ||
| 321 | (unless parent (setq parent 'error)) | ||
| 322 | (let ((conditions | ||
| 323 | (if (consp parent) | ||
| 324 | (apply #'nconc | ||
| 325 | (mapcar (lambda (parent) | ||
| 326 | (cons parent | ||
| 327 | (or (get parent 'error-conditions) | ||
| 328 | (error "Unknown signal `%s'" parent)))) | ||
| 329 | parent)) | ||
| 330 | (cons parent (get parent 'error-conditions))))) | ||
| 331 | (put name 'error-conditions | ||
| 332 | (delete-dups (copy-sequence (cons name conditions)))) | ||
| 333 | (when message (put name 'error-message message)))) | ||
| 334 | |||
| 315 | ;; We put this here instead of in frame.el so that it's defined even on | 335 | ;; We put this here instead of in frame.el so that it's defined even on |
| 316 | ;; systems where frame.el isn't loaded. | 336 | ;; systems where frame.el isn't loaded. |
| 317 | (defun frame-configuration-p (object) | 337 | (defun frame-configuration-p (object) |
| @@ -2526,11 +2546,6 @@ When the hook runs, the temporary buffer is current. | |||
| 2526 | This hook is normally set up with a function to put the buffer in Help | 2546 | This hook is normally set up with a function to put the buffer in Help |
| 2527 | mode.") | 2547 | mode.") |
| 2528 | 2548 | ||
| 2529 | ;; The `assert' macro from the cl package signals | ||
| 2530 | ;; `cl-assertion-failed' at runtime so always define it. | ||
| 2531 | (put 'cl-assertion-failed 'error-conditions '(error)) | ||
| 2532 | (put 'cl-assertion-failed 'error-message (purecopy "Assertion failed")) | ||
| 2533 | |||
| 2534 | (defconst user-emacs-directory | 2549 | (defconst user-emacs-directory |
| 2535 | (if (eq system-type 'ms-dos) | 2550 | (if (eq system-type 'ms-dos) |
| 2536 | ;; MS-DOS cannot have initial dot. | 2551 | ;; MS-DOS cannot have initial dot. |
| @@ -2750,6 +2765,13 @@ Otherwise, return nil." | |||
| 2750 | (setq object (indirect-function object t))) | 2765 | (setq object (indirect-function object t))) |
| 2751 | (and (subrp object) (eq (cdr (subr-arity object)) 'unevalled))) | 2766 | (and (subrp object) (eq (cdr (subr-arity object)) 'unevalled))) |
| 2752 | 2767 | ||
| 2768 | (defun macrop (object) | ||
| 2769 | "Non-nil if and only if OBJECT is a macro." | ||
| 2770 | (let ((def (indirect-function object t))) | ||
| 2771 | (when (consp def) | ||
| 2772 | (or (eq 'macro (car def)) | ||
| 2773 | (and (autoloadp def) (memq (nth 4 def) '(macro t))))))) | ||
| 2774 | |||
| 2753 | (defun field-at-pos (pos) | 2775 | (defun field-at-pos (pos) |
| 2754 | "Return the field at position POS, taking stickiness etc into account." | 2776 | "Return the field at position POS, taking stickiness etc into account." |
| 2755 | (let ((raw-field (get-char-property (field-beginning pos) 'field))) | 2777 | (let ((raw-field (get-char-property (field-beginning pos) 'field))) |
| @@ -4050,10 +4072,14 @@ backwards ARG times if negative." | |||
| 4050 | 4072 | ||
| 4051 | ;;;; Text clones | 4073 | ;;;; Text clones |
| 4052 | 4074 | ||
| 4053 | (defun text-clone-maintain (ol1 after beg end &optional _len) | 4075 | (defvar text-clone--maintaining nil) |
| 4076 | |||
| 4077 | (defun text-clone--maintain (ol1 after beg end &optional _len) | ||
| 4054 | "Propagate the changes made under the overlay OL1 to the other clones. | 4078 | "Propagate the changes made under the overlay OL1 to the other clones. |
| 4055 | This is used on the `modification-hooks' property of text clones." | 4079 | This is used on the `modification-hooks' property of text clones." |
| 4056 | (when (and after (not undo-in-progress) (overlay-start ol1)) | 4080 | (when (and after (not undo-in-progress) |
| 4081 | (not text-clone--maintaining) | ||
| 4082 | (overlay-start ol1)) | ||
| 4057 | (let ((margin (if (overlay-get ol1 'text-clone-spreadp) 1 0))) | 4083 | (let ((margin (if (overlay-get ol1 'text-clone-spreadp) 1 0))) |
| 4058 | (setq beg (max beg (+ (overlay-start ol1) margin))) | 4084 | (setq beg (max beg (+ (overlay-start ol1) margin))) |
| 4059 | (setq end (min end (- (overlay-end ol1) margin))) | 4085 | (setq end (min end (- (overlay-end ol1) margin))) |
| @@ -4084,7 +4110,7 @@ This is used on the `modification-hooks' property of text clones." | |||
| 4084 | (tail (- (overlay-end ol1) end)) | 4110 | (tail (- (overlay-end ol1) end)) |
| 4085 | (str (buffer-substring beg end)) | 4111 | (str (buffer-substring beg end)) |
| 4086 | (nothing-left t) | 4112 | (nothing-left t) |
| 4087 | (inhibit-modification-hooks t)) | 4113 | (text-clone--maintaining t)) |
| 4088 | (dolist (ol2 (overlay-get ol1 'text-clones)) | 4114 | (dolist (ol2 (overlay-get ol1 'text-clones)) |
| 4089 | (let ((oe (overlay-end ol2))) | 4115 | (let ((oe (overlay-end ol2))) |
| 4090 | (unless (or (eq ol1 ol2) (null oe)) | 4116 | (unless (or (eq ol1 ol2) (null oe)) |
| @@ -4095,7 +4121,7 @@ This is used on the `modification-hooks' property of text clones." | |||
| 4095 | (unless (> mod-beg (point)) | 4121 | (unless (> mod-beg (point)) |
| 4096 | (save-excursion (insert str)) | 4122 | (save-excursion (insert str)) |
| 4097 | (delete-region mod-beg (point))) | 4123 | (delete-region mod-beg (point))) |
| 4098 | ;;(overlay-put ol2 'modification-hooks '(text-clone-maintain)) | 4124 | ;;(overlay-put ol2 'modification-hooks '(text-clone--maintain)) |
| 4099 | )))) | 4125 | )))) |
| 4100 | (if nothing-left (delete-overlay ol1)))))))) | 4126 | (if nothing-left (delete-overlay ol1)))))))) |
| 4101 | 4127 | ||
| @@ -4126,17 +4152,18 @@ clone should be incorporated in the clone." | |||
| 4126 | (>= pt-end (point-max)) | 4152 | (>= pt-end (point-max)) |
| 4127 | (>= start (point-max))) | 4153 | (>= start (point-max))) |
| 4128 | 0 1)) | 4154 | 0 1)) |
| 4155 | ;; FIXME: Reuse overlays at point to extend dups! | ||
| 4129 | (ol1 (make-overlay (- start start-margin) (+ end end-margin) nil t)) | 4156 | (ol1 (make-overlay (- start start-margin) (+ end end-margin) nil t)) |
| 4130 | (ol2 (make-overlay (- (point) start-margin) (+ pt-end end-margin) nil t)) | 4157 | (ol2 (make-overlay (- (point) start-margin) (+ pt-end end-margin) nil t)) |
| 4131 | (dups (list ol1 ol2))) | 4158 | (dups (list ol1 ol2))) |
| 4132 | (overlay-put ol1 'modification-hooks '(text-clone-maintain)) | 4159 | (overlay-put ol1 'modification-hooks '(text-clone--maintain)) |
| 4133 | (when spreadp (overlay-put ol1 'text-clone-spreadp t)) | 4160 | (when spreadp (overlay-put ol1 'text-clone-spreadp t)) |
| 4134 | (when syntax (overlay-put ol1 'text-clone-syntax syntax)) | 4161 | (when syntax (overlay-put ol1 'text-clone-syntax syntax)) |
| 4135 | ;;(overlay-put ol1 'face 'underline) | 4162 | ;;(overlay-put ol1 'face 'underline) |
| 4136 | (overlay-put ol1 'evaporate t) | 4163 | (overlay-put ol1 'evaporate t) |
| 4137 | (overlay-put ol1 'text-clones dups) | 4164 | (overlay-put ol1 'text-clones dups) |
| 4138 | ;; | 4165 | ;; |
| 4139 | (overlay-put ol2 'modification-hooks '(text-clone-maintain)) | 4166 | (overlay-put ol2 'modification-hooks '(text-clone--maintain)) |
| 4140 | (when spreadp (overlay-put ol2 'text-clone-spreadp t)) | 4167 | (when spreadp (overlay-put ol2 'text-clone-spreadp t)) |
| 4141 | (when syntax (overlay-put ol2 'text-clone-syntax syntax)) | 4168 | (when syntax (overlay-put ol2 'text-clone-syntax syntax)) |
| 4142 | ;;(overlay-put ol2 'face 'underline) | 4169 | ;;(overlay-put ol2 'face 'underline) |
diff --git a/lisp/tabify.el b/lisp/tabify.el index a90bf801bcf..44a233717dd 100644 --- a/lisp/tabify.el +++ b/lisp/tabify.el | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | ;;; Code: | 28 | ;;; Code: |
| 29 | 29 | ||
| 30 | ;;;###autoload | 30 | ;;;###autoload |
| 31 | (defun untabify (start end &optional arg) | 31 | (defun untabify (start end &optional _arg) |
| 32 | "Convert all tabs in region to multiple spaces, preserving columns. | 32 | "Convert all tabs in region to multiple spaces, preserving columns. |
| 33 | If called interactively with prefix ARG, convert for the entire | 33 | If called interactively with prefix ARG, convert for the entire |
| 34 | buffer. | 34 | buffer. |
| @@ -61,7 +61,7 @@ Usually this will be \" [ \\t]+\" to match a space followed by whitespace. | |||
| 61 | \"^\\t* [ \\t]+\" is also useful, for tabifying only initial whitespace.") | 61 | \"^\\t* [ \\t]+\" is also useful, for tabifying only initial whitespace.") |
| 62 | 62 | ||
| 63 | ;;;###autoload | 63 | ;;;###autoload |
| 64 | (defun tabify (start end &optional arg) | 64 | (defun tabify (start end &optional _arg) |
| 65 | "Convert multiple spaces in region to tabs when possible. | 65 | "Convert multiple spaces in region to tabs when possible. |
| 66 | A group of spaces is partially replaced by tabs | 66 | A group of spaces is partially replaced by tabs |
| 67 | when this can be done without changing the column they end at. | 67 | when this can be done without changing the column they end at. |
diff --git a/lisp/talk.el b/lisp/talk.el index 741571a8d78..8c991c8d995 100644 --- a/lisp/talk.el +++ b/lisp/talk.el | |||
| @@ -50,7 +50,7 @@ Each element has the form (DISPLAY FRAME BUFFER).") | |||
| 50 | (let ((type (frame-live-p (selected-frame)))) | 50 | (let ((type (frame-live-p (selected-frame)))) |
| 51 | (if (or (eq type t) (eq type 'x)) | 51 | (if (or (eq type t) (eq type 'x)) |
| 52 | (talk-add-display | 52 | (talk-add-display |
| 53 | (terminal-name (frame-terminal (selected-frame)))) | 53 | (terminal-name (frame-terminal))) |
| 54 | (error "Unknown frame type"))) | 54 | (error "Unknown frame type"))) |
| 55 | (talk-update-buffers)) | 55 | (talk-update-buffers)) |
| 56 | 56 | ||
diff --git a/lisp/term/common-win.el b/lisp/term/common-win.el index 8fe10dc8e35..aadab96f75a 100644 --- a/lisp/term/common-win.el +++ b/lisp/term/common-win.el | |||
| @@ -159,7 +159,7 @@ is not used)." | |||
| 159 | initial-frame-alist))))) | 159 | initial-frame-alist))))) |
| 160 | 160 | ||
| 161 | ;; Make -iconic apply only to the initial frame! | 161 | ;; Make -iconic apply only to the initial frame! |
| 162 | (defun x-handle-iconic (switch) | 162 | (defun x-handle-iconic (_switch) |
| 163 | (setq initial-frame-alist | 163 | (setq initial-frame-alist |
| 164 | (cons '(visibility . icon) initial-frame-alist))) | 164 | (cons '(visibility . icon) initial-frame-alist))) |
| 165 | 165 | ||
| @@ -175,7 +175,7 @@ is not used)." | |||
| 175 | (declare-function x-parse-geometry "frame.c" (string)) | 175 | (declare-function x-parse-geometry "frame.c" (string)) |
| 176 | 176 | ||
| 177 | ;; Handle the geometry option | 177 | ;; Handle the geometry option |
| 178 | (defun x-handle-geometry (switch) | 178 | (defun x-handle-geometry (_switch) |
| 179 | (let* ((geo (x-parse-geometry (pop x-invocation-args))) | 179 | (let* ((geo (x-parse-geometry (pop x-invocation-args))) |
| 180 | (left (assq 'left geo)) | 180 | (left (assq 'left geo)) |
| 181 | (top (assq 'top geo)) | 181 | (top (assq 'top geo)) |
| @@ -216,7 +216,7 @@ is not used)." | |||
| 216 | On X, the display name of individual X frames is recorded in the | 216 | On X, the display name of individual X frames is recorded in the |
| 217 | `display' frame parameter.") | 217 | `display' frame parameter.") |
| 218 | 218 | ||
| 219 | (defun x-handle-display (switch) | 219 | (defun x-handle-display (_switch) |
| 220 | "Handle -display DISPLAY option." | 220 | "Handle -display DISPLAY option." |
| 221 | (setq x-display-name (pop x-invocation-args)) | 221 | (setq x-display-name (pop x-invocation-args)) |
| 222 | ;; Make subshell programs see the same DISPLAY value Emacs really uses. | 222 | ;; Make subshell programs see the same DISPLAY value Emacs really uses. |
diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el index ab776ea6257..96831cea9a6 100644 --- a/lisp/term/pc-win.el +++ b/lisp/term/pc-win.el | |||
| @@ -164,22 +164,22 @@ created." | |||
| 164 | ;; platforms. (Bug#10783) | 164 | ;; platforms. (Bug#10783) |
| 165 | 165 | ||
| 166 | ;; From src/xfns.c | 166 | ;; From src/xfns.c |
| 167 | (defun x-list-fonts (pattern &optional face frame maximum width) | 167 | (defun x-list-fonts (_pattern &optional _face _frame _maximum width) |
| 168 | (if (or (null width) (and (numberp width) (= width 1))) | 168 | (if (or (null width) (and (numberp width) (= width 1))) |
| 169 | (list "ms-dos") | 169 | (list "ms-dos") |
| 170 | (list "no-such-font"))) | 170 | (list "no-such-font"))) |
| 171 | (defun x-display-pixel-width (&optional frame) (frame-width frame)) | 171 | (defun x-display-pixel-width (&optional frame) (frame-width frame)) |
| 172 | (defun x-display-pixel-height (&optional frame) (frame-height frame)) | 172 | (defun x-display-pixel-height (&optional frame) (frame-height frame)) |
| 173 | (defun x-display-planes (&optional frame) 4) ;bg switched to 16 colors as well | 173 | (defun x-display-planes (&optional _frame) 4) ;bg switched to 16 colors as well |
| 174 | (defun x-display-color-cells (&optional frame) 16) | 174 | (defun x-display-color-cells (&optional _frame) 16) |
| 175 | (defun x-server-max-request-size (&optional frame) 1000000) ; ??? | 175 | (defun x-server-max-request-size (&optional _frame) 1000000) ; ??? |
| 176 | (defun x-server-vendor (&optional frame) t "GNU") | 176 | (defun x-server-vendor (&optional _frame) t "GNU") |
| 177 | (defun x-server-version (&optional frame) '(1 0 0)) | 177 | (defun x-server-version (&optional _frame) '(1 0 0)) |
| 178 | (defun x-display-screens (&optional frame) 1) | 178 | (defun x-display-screens (&optional _frame) 1) |
| 179 | (defun x-display-mm-height (&optional frame) 245) ; Guess the size of my | 179 | (defun x-display-mm-height (&optional _frame) 245) ; Guess the size of my |
| 180 | (defun x-display-mm-width (&optional frame) 322) ; monitor, EZ... | 180 | (defun x-display-mm-width (&optional _frame) 322) ; monitor, EZ... |
| 181 | (defun x-display-backing-store (&optional frame) 'not-useful) | 181 | (defun x-display-backing-store (&optional _frame) 'not-useful) |
| 182 | (defun x-display-visual-class (&optional frame) 'static-color) | 182 | (defun x-display-visual-class (&optional _frame) 'static-color) |
| 183 | (fset 'x-display-save-under 'ignore) | 183 | (fset 'x-display-save-under 'ignore) |
| 184 | (fset 'x-get-resource 'ignore) | 184 | (fset 'x-get-resource 'ignore) |
| 185 | 185 | ||
| @@ -253,7 +253,7 @@ is not used)." | |||
| 253 | (setq x-last-selected-text text)))))) | 253 | (setq x-last-selected-text text)))))) |
| 254 | 254 | ||
| 255 | ;; x-selection-owner-p is used in simple.el. | 255 | ;; x-selection-owner-p is used in simple.el. |
| 256 | (defun x-selection-owner-p (&optional selection terminal) | 256 | (defun x-selection-owner-p (&optional _selection _terminal) |
| 257 | "Whether the current Emacs process owns the given X Selection. | 257 | "Whether the current Emacs process owns the given X Selection. |
| 258 | The arg should be the name of the selection in question, typically one of | 258 | The arg should be the name of the selection in question, typically one of |
| 259 | the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'. | 259 | the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'. |
| @@ -285,7 +285,7 @@ On Nextstep, TERMINAL is unused. | |||
| 285 | 285 | ||
| 286 | ;; x-own-selection-internal and x-disown-selection-internal are used | 286 | ;; x-own-selection-internal and x-disown-selection-internal are used |
| 287 | ;; in select.el:x-set-selection. | 287 | ;; in select.el:x-set-selection. |
| 288 | (defun x-own-selection-internal (selection value &optional frame) | 288 | (defun x-own-selection-internal (_selection value &optional _frame) |
| 289 | "Assert an X selection of the type SELECTION with and value VALUE. | 289 | "Assert an X selection of the type SELECTION with and value VALUE. |
| 290 | SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. | 290 | SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. |
| 291 | \(Those are literal upper-case symbol names, since that's what X expects.) | 291 | \(Those are literal upper-case symbol names, since that's what X expects.) |
| @@ -302,7 +302,7 @@ On Nextstep, FRAME is unused. | |||
| 302 | (x-select-text value)) | 302 | (x-select-text value)) |
| 303 | value) | 303 | value) |
| 304 | 304 | ||
| 305 | (defun x-disown-selection-internal (selection &optional time-object terminal) | 305 | (defun x-disown-selection-internal (selection &optional _time-object _terminal) |
| 306 | "If we own the selection SELECTION, disown it. | 306 | "If we own the selection SELECTION, disown it. |
| 307 | Disowning it means there is no such selection. | 307 | Disowning it means there is no such selection. |
| 308 | 308 | ||
| @@ -321,7 +321,8 @@ On MS-DOS, all this does is return non-nil if we own the selection. | |||
| 321 | t)) | 321 | t)) |
| 322 | 322 | ||
| 323 | ;; x-get-selection-internal is used in select.el | 323 | ;; x-get-selection-internal is used in select.el |
| 324 | (defun x-get-selection-internal (selection-symbol target-type &optional time-stamp terminal) | 324 | (defun x-get-selection-internal (_selection-symbol _target-type |
| 325 | &optional _time-stamp _terminal) | ||
| 325 | "Return text selected from some X window. | 326 | "Return text selected from some X window. |
| 326 | SELECTION-SYMBOL is typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. | 327 | SELECTION-SYMBOL is typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. |
| 327 | \(Those are literal upper-case symbol names, since that's what X expects.) | 328 | \(Those are literal upper-case symbol names, since that's what X expects.) |
| @@ -403,7 +404,7 @@ Errors out because it is not supposed to be called, ever." | |||
| 403 | (error "terminal-init-internal called for window-system `%s'" | 404 | (error "terminal-init-internal called for window-system `%s'" |
| 404 | (window-system))) | 405 | (window-system))) |
| 405 | 406 | ||
| 406 | (defun msdos-initialize-window-system (&optional display) | 407 | (defun msdos-initialize-window-system (&optional _display) |
| 407 | "Initialization function for the `pc' \"window system\"." | 408 | "Initialization function for the `pc' \"window system\"." |
| 408 | (or (eq (window-system) 'pc) | 409 | (or (eq (window-system) 'pc) |
| 409 | (error | 410 | (error |
diff --git a/lisp/term/tty-colors.el b/lisp/term/tty-colors.el index 8002c53151b..5ba352a5c3a 100644 --- a/lisp/term/tty-colors.el +++ b/lisp/term/tty-colors.el | |||
| @@ -767,7 +767,7 @@ | |||
| 767 | (yes . 8)) | 767 | (yes . 8)) |
| 768 | "An alist of supported standard tty color modes and their aliases.") | 768 | "An alist of supported standard tty color modes and their aliases.") |
| 769 | 769 | ||
| 770 | (defun tty-color-alist (&optional frame) | 770 | (defun tty-color-alist (&optional _frame) |
| 771 | "Return an alist of colors supported by FRAME's terminal. | 771 | "Return an alist of colors supported by FRAME's terminal. |
| 772 | FRAME defaults to the selected frame. | 772 | FRAME defaults to the selected frame. |
| 773 | Each element of the returned alist is of the form: | 773 | Each element of the returned alist is of the form: |
| @@ -840,7 +840,7 @@ If FRAME is not specified or is nil, it defaults to the selected frame." | |||
| 840 | (tty-modify-color-alist | 840 | (tty-modify-color-alist |
| 841 | (append (list (tty-color-canonicalize name) index) rgb) frame)) | 841 | (append (list (tty-color-canonicalize name) index) rgb) frame)) |
| 842 | 842 | ||
| 843 | (defun tty-color-clear (&optional frame) | 843 | (defun tty-color-clear (&optional _frame) |
| 844 | "Clear the list of supported tty colors for frame FRAME. | 844 | "Clear the list of supported tty colors for frame FRAME. |
| 845 | If FRAME is unspecified or nil, it defaults to the selected frame." | 845 | If FRAME is unspecified or nil, it defaults to the selected frame." |
| 846 | (setq tty-defined-color-alist nil)) | 846 | (setq tty-defined-color-alist nil)) |
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index acadb0fad43..55181ab7d6d 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el | |||
| @@ -229,7 +229,8 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") | |||
| 229 | '(glib "libglib-2.0-0.dll") | 229 | '(glib "libglib-2.0-0.dll") |
| 230 | '(gobject "libgobject-2.0-0.dll") | 230 | '(gobject "libgobject-2.0-0.dll") |
| 231 | '(gnutls "libgnutls-28.dll" "libgnutls-26.dll") | 231 | '(gnutls "libgnutls-28.dll" "libgnutls-26.dll") |
| 232 | '(libxml2 "libxml2-2.dll" "libxml2.dll"))) | 232 | '(libxml2 "libxml2-2.dll" "libxml2.dll") |
| 233 | '(zlib "zlib1.dll" "libz-1.dll"))) | ||
| 233 | 234 | ||
| 234 | ;;; multi-tty support | 235 | ;;; multi-tty support |
| 235 | (defvar w32-initialized nil | 236 | (defvar w32-initialized nil |
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index ab1556d5779..28fd3d7090c 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el | |||
| @@ -87,7 +87,7 @@ | |||
| 87 | (defvar x-session-id) | 87 | (defvar x-session-id) |
| 88 | (defvar x-session-previous-id) | 88 | (defvar x-session-previous-id) |
| 89 | 89 | ||
| 90 | (defun x-handle-no-bitmap-icon (switch) | 90 | (defun x-handle-no-bitmap-icon (_switch) |
| 91 | (setq default-frame-alist (cons '(icon-type) default-frame-alist))) | 91 | (setq default-frame-alist (cons '(icon-type) default-frame-alist))) |
| 92 | 92 | ||
| 93 | ;; Handle the --parent-id option. | 93 | ;; Handle the --parent-id option. |
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 86f4583b987..af0b0b606e5 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el | |||
| @@ -606,7 +606,7 @@ We run the first FUNCTION whose STRING matches the input events." | |||
| 606 | (add-hook 'delete-terminal-functions 'xterm-remove-modify-other-keys) | 606 | (add-hook 'delete-terminal-functions 'xterm-remove-modify-other-keys) |
| 607 | ;; Add the selected frame to the list of frames that | 607 | ;; Add the selected frame to the list of frames that |
| 608 | ;; need to deal with modify-other-keys. | 608 | ;; need to deal with modify-other-keys. |
| 609 | (push (frame-terminal (selected-frame)) | 609 | (push (frame-terminal) |
| 610 | xterm-modify-other-keys-terminal-list) | 610 | xterm-modify-other-keys-terminal-list) |
| 611 | (xterm-turn-on-modify-other-keys)) | 611 | (xterm-turn-on-modify-other-keys)) |
| 612 | 612 | ||
| @@ -728,7 +728,7 @@ versions of xterm." | |||
| 728 | 728 | ||
| 729 | (defun xterm-turn-on-modify-other-keys () | 729 | (defun xterm-turn-on-modify-other-keys () |
| 730 | "Turn the modifyOtherKeys feature of xterm back on." | 730 | "Turn the modifyOtherKeys feature of xterm back on." |
| 731 | (let ((terminal (frame-terminal (selected-frame)))) | 731 | (let ((terminal (frame-terminal))) |
| 732 | (when (and (terminal-live-p terminal) | 732 | (when (and (terminal-live-p terminal) |
| 733 | (memq terminal xterm-modify-other-keys-terminal-list)) | 733 | (memq terminal xterm-modify-other-keys-terminal-list)) |
| 734 | (send-string-to-terminal "\e[>4;1m" terminal)))) | 734 | (send-string-to-terminal "\e[>4;1m" terminal)))) |
| @@ -742,7 +742,7 @@ versions of xterm." | |||
| 742 | 742 | ||
| 743 | (defun xterm-remove-modify-other-keys (&optional terminal) | 743 | (defun xterm-remove-modify-other-keys (&optional terminal) |
| 744 | "Turn off the modifyOtherKeys feature of xterm for good." | 744 | "Turn off the modifyOtherKeys feature of xterm for good." |
| 745 | (setq terminal (or terminal (frame-terminal (selected-frame)))) | 745 | (setq terminal (or terminal (frame-terminal))) |
| 746 | (when (and (terminal-live-p terminal) | 746 | (when (and (terminal-live-p terminal) |
| 747 | (memq terminal xterm-modify-other-keys-terminal-list)) | 747 | (memq terminal xterm-modify-other-keys-terminal-list)) |
| 748 | (setq xterm-modify-other-keys-terminal-list | 748 | (setq xterm-modify-other-keys-terminal-list |
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index cb19c018839..9c32604b4f4 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el | |||
| @@ -263,6 +263,48 @@ | |||
| 263 | (defvar css-font-lock-defaults | 263 | (defvar css-font-lock-defaults |
| 264 | '(css-font-lock-keywords nil t)) | 264 | '(css-font-lock-keywords nil t)) |
| 265 | 265 | ||
| 266 | (defcustom css-indent-offset 4 | ||
| 267 | "Basic size of one indentation step." | ||
| 268 | :version "22.2" | ||
| 269 | :type 'integer) | ||
| 270 | |||
| 271 | (require 'smie) | ||
| 272 | |||
| 273 | (defconst css-smie-grammar | ||
| 274 | (smie-prec2->grammar | ||
| 275 | (smie-precs->prec2 '((assoc ";") (assoc ",") (left ":"))))) | ||
| 276 | |||
| 277 | (defun css-smie--forward-token () | ||
| 278 | (cond | ||
| 279 | ((and (eq (char-before) ?\}) | ||
| 280 | ;; FIXME: If the next char is not whitespace, what should we do? | ||
| 281 | (or (memq (char-after) '(?\s ?\t ?\n)) | ||
| 282 | (looking-at comment-start-skip))) | ||
| 283 | (if (memq (char-after) '(?\s ?\t ?\n)) | ||
| 284 | (forward-char 1) (forward-comment 1)) | ||
| 285 | ";") | ||
| 286 | ((progn (forward-comment (point-max)) | ||
| 287 | (looking-at "[;,:]")) | ||
| 288 | (forward-char 1) (match-string 0)) | ||
| 289 | (t (smie-default-forward-token)))) | ||
| 290 | |||
| 291 | (defun css-smie--backward-token () | ||
| 292 | (let ((pos (point))) | ||
| 293 | (forward-comment (- (point))) | ||
| 294 | (cond | ||
| 295 | ;; FIXME: If the next char is not whitespace, what should we do? | ||
| 296 | ((and (eq (char-before) ?\}) (> pos (point))) ";") | ||
| 297 | ((memq (char-before) '(?\; ?\, ?\:)) | ||
| 298 | (forward-char -1) (string (char-after))) | ||
| 299 | (t (smie-default-backward-token))))) | ||
| 300 | |||
| 301 | (defun css-smie-rules (kind token) | ||
| 302 | (pcase (cons kind token) | ||
| 303 | (`(:elem . basic) css-indent-offset) | ||
| 304 | (`(:elem . arg) 0) | ||
| 305 | (`(:before . "{") (if (smie-rule-hanging-p) | ||
| 306 | (smie-rule-parent 0))))) | ||
| 307 | |||
| 266 | ;;;###autoload | 308 | ;;;###autoload |
| 267 | (define-derived-mode css-mode fundamental-mode "CSS" | 309 | (define-derived-mode css-mode fundamental-mode "CSS" |
| 268 | "Major mode to edit Cascading Style Sheets." | 310 | "Major mode to edit Cascading Style Sheets." |
| @@ -271,11 +313,13 @@ | |||
| 271 | (setq-local comment-start-skip "/\\*+[ \t]*") | 313 | (setq-local comment-start-skip "/\\*+[ \t]*") |
| 272 | (setq-local comment-end "*/") | 314 | (setq-local comment-end "*/") |
| 273 | (setq-local comment-end-skip "[ \t]*\\*+/") | 315 | (setq-local comment-end-skip "[ \t]*\\*+/") |
| 274 | (setq-local forward-sexp-function 'css-forward-sexp) | ||
| 275 | (setq-local parse-sexp-ignore-comments t) | 316 | (setq-local parse-sexp-ignore-comments t) |
| 276 | (setq-local indent-line-function 'css-indent-line) | 317 | (setq-local indent-line-function 'css-indent-line) |
| 277 | (setq-local fill-paragraph-function 'css-fill-paragraph) | 318 | (setq-local fill-paragraph-function 'css-fill-paragraph) |
| 278 | (setq-local add-log-current-defun-function #'css-current-defun-name) | 319 | (setq-local add-log-current-defun-function #'css-current-defun-name) |
| 320 | (smie-setup css-smie-grammar #'css-smie-rules | ||
| 321 | :forward-token #'css-smie--forward-token | ||
| 322 | :backward-token #'css-smie--backward-token) | ||
| 279 | (when css-electric-keys | 323 | (when css-electric-keys |
| 280 | (let ((fc (make-char-table 'auto-fill-chars))) | 324 | (let ((fc (make-char-table 'auto-fill-chars))) |
| 281 | (set-char-table-parent fc auto-fill-chars) | 325 | (set-char-table-parent fc auto-fill-chars) |
| @@ -355,132 +399,6 @@ | |||
| 355 | ;; Don't use the default filling code. | 399 | ;; Don't use the default filling code. |
| 356 | t))))))) | 400 | t))))))) |
| 357 | 401 | ||
| 358 | ;;; Navigation and indentation. | ||
| 359 | |||
| 360 | (defconst css-navigation-syntax-table | ||
| 361 | (let ((st (make-syntax-table css-mode-syntax-table))) | ||
| 362 | (map-char-table (lambda (c v) | ||
| 363 | ;; Turn punctuation (code = 1) into symbol (code = 1). | ||
| 364 | (if (eq (car-safe v) 1) | ||
| 365 | (set-char-table-range st c (cons 3 (cdr v))))) | ||
| 366 | st) | ||
| 367 | st)) | ||
| 368 | |||
| 369 | (defun css-backward-sexp (n) | ||
| 370 | (let ((forward-sexp-function nil)) | ||
| 371 | (if (< n 0) (css-forward-sexp (- n)) | ||
| 372 | (while (> n 0) | ||
| 373 | (setq n (1- n)) | ||
| 374 | (forward-comment (- (point-max))) | ||
| 375 | (if (not (eq (char-before) ?\;)) | ||
| 376 | (backward-sexp 1) | ||
| 377 | (while (progn (backward-sexp 1) | ||
| 378 | (save-excursion | ||
| 379 | (forward-comment (- (point-max))) | ||
| 380 | ;; FIXME: We should also skip punctuation. | ||
| 381 | (not (or (bobp) (memq (char-before) '(?\; ?\{)))))))))))) | ||
| 382 | |||
| 383 | (defun css-forward-sexp (n) | ||
| 384 | (let ((forward-sexp-function nil)) | ||
| 385 | (if (< n 0) (css-backward-sexp (- n)) | ||
| 386 | (while (> n 0) | ||
| 387 | (setq n (1- n)) | ||
| 388 | (forward-comment (point-max)) | ||
| 389 | (if (not (eq (char-after) ?\;)) | ||
| 390 | (forward-sexp 1) | ||
| 391 | (while (progn (forward-sexp 1) | ||
| 392 | (save-excursion | ||
| 393 | (forward-comment (point-max)) | ||
| 394 | ;; FIXME: We should also skip punctuation. | ||
| 395 | (not (memq (char-after) '(?\; ?\}))))))))))) | ||
| 396 | |||
| 397 | (defun css-indent-calculate-virtual () | ||
| 398 | (if (or (save-excursion (skip-chars-backward " \t") (bolp)) | ||
| 399 | (if (looking-at "\\s(") | ||
| 400 | (save-excursion | ||
| 401 | (forward-char 1) (skip-chars-forward " \t") | ||
| 402 | (not (or (eolp) (looking-at comment-start-skip)))))) | ||
| 403 | (current-column) | ||
| 404 | (css-indent-calculate))) | ||
| 405 | |||
| 406 | (defcustom css-indent-offset 4 | ||
| 407 | "Basic size of one indentation step." | ||
| 408 | :version "22.2" | ||
| 409 | :type 'integer | ||
| 410 | :group 'css) | ||
| 411 | |||
| 412 | (defun css-indent-calculate () | ||
| 413 | (let ((ppss (syntax-ppss)) | ||
| 414 | pos) | ||
| 415 | (with-syntax-table css-navigation-syntax-table | ||
| 416 | (save-excursion | ||
| 417 | (cond | ||
| 418 | ;; Inside a string. | ||
| 419 | ((nth 3 ppss) 'noindent) | ||
| 420 | ;; Inside a comment. | ||
| 421 | ((nth 4 ppss) | ||
| 422 | (setq pos (point)) | ||
| 423 | (forward-line -1) | ||
| 424 | (skip-chars-forward " \t") | ||
| 425 | (if (>= (nth 8 ppss) (point)) | ||
| 426 | (progn | ||
| 427 | (goto-char (nth 8 ppss)) | ||
| 428 | (if (eq (char-after pos) ?*) | ||
| 429 | (forward-char 1) | ||
| 430 | (if (not (looking-at comment-start-skip)) | ||
| 431 | (error "Internal css-mode error") | ||
| 432 | (goto-char (match-end 0)))) | ||
| 433 | (current-column)) | ||
| 434 | (if (and (eq (char-after pos) ?*) (eq (char-after) ?*)) | ||
| 435 | (current-column) | ||
| 436 | ;; 'noindent | ||
| 437 | (current-column) | ||
| 438 | ))) | ||
| 439 | ;; In normal code. | ||
| 440 | (t | ||
| 441 | (or | ||
| 442 | (when (looking-at "\\s)") | ||
| 443 | (forward-char 1) | ||
| 444 | (backward-sexp 1) | ||
| 445 | (css-indent-calculate-virtual)) | ||
| 446 | (when (looking-at comment-start-skip) | ||
| 447 | (forward-comment (point-max)) | ||
| 448 | (css-indent-calculate)) | ||
| 449 | (when (save-excursion (forward-comment (- (point-max))) | ||
| 450 | (setq pos (point)) | ||
| 451 | (eq (char-syntax (preceding-char)) ?\()) | ||
| 452 | (goto-char (1- pos)) | ||
| 453 | (if (not (looking-at "\\s([ \t]*")) | ||
| 454 | (error "Internal css-mode error") | ||
| 455 | (if (or (memq (char-after (match-end 0)) '(?\n nil)) | ||
| 456 | (save-excursion (goto-char (match-end 0)) | ||
| 457 | (looking-at comment-start-skip))) | ||
| 458 | (+ (css-indent-calculate-virtual) css-indent-offset) | ||
| 459 | (progn (goto-char (match-end 0)) (current-column))))) | ||
| 460 | (progn | ||
| 461 | (css-backward-sexp 1) | ||
| 462 | (if (looking-at "\\s(") | ||
| 463 | (css-indent-calculate) | ||
| 464 | (css-indent-calculate-virtual)))))))))) | ||
| 465 | |||
| 466 | |||
| 467 | (defun css-indent-line () | ||
| 468 | "Indent current line according to CSS indentation rules." | ||
| 469 | (interactive) | ||
| 470 | (let* ((savep (point)) | ||
| 471 | (forward-sexp-function nil) | ||
| 472 | (indent (condition-case nil | ||
| 473 | (save-excursion | ||
| 474 | (forward-line 0) | ||
| 475 | (skip-chars-forward " \t") | ||
| 476 | (if (>= (point) savep) (setq savep nil)) | ||
| 477 | (css-indent-calculate)) | ||
| 478 | (error nil)))) | ||
| 479 | (if (not (numberp indent)) 'noindent | ||
| 480 | (if savep | ||
| 481 | (save-excursion (indent-line-to indent)) | ||
| 482 | (indent-line-to indent))))) | ||
| 483 | |||
| 484 | (defun css-current-defun-name () | 402 | (defun css-current-defun-name () |
| 485 | "Return the name of the CSS section at point, or nil." | 403 | "Return the name of the CSS section at point, or nil." |
| 486 | (save-excursion | 404 | (save-excursion |
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 5b6d5f359e6..119b4b04593 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -220,7 +220,7 @@ Remove indentation from each line." | |||
| 220 | (let ((str (or | 220 | (let ((str (or |
| 221 | (and adaptive-fill-function (funcall adaptive-fill-function)) | 221 | (and adaptive-fill-function (funcall adaptive-fill-function)) |
| 222 | (and adaptive-fill-regexp (looking-at adaptive-fill-regexp) | 222 | (and adaptive-fill-regexp (looking-at adaptive-fill-regexp) |
| 223 | (match-string-no-properties 0))))) | 223 | (match-string 0))))) |
| 224 | (if (>= (+ (current-left-margin) (length str)) (current-fill-column)) | 224 | (if (>= (+ (current-left-margin) (length str)) (current-fill-column)) |
| 225 | ;; Death to insanely long prefixes. | 225 | ;; Death to insanely long prefixes. |
| 226 | nil | 226 | nil |
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 94b184d09a1..3998fafa5cc 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -2218,7 +2218,7 @@ Global `ispell-quit' set to start location to continue spell session." | |||
| 2218 | (window-min-height (min window-min-height | 2218 | (window-min-height (min window-min-height |
| 2219 | ispell-choices-win-default-height)) | 2219 | ispell-choices-win-default-height)) |
| 2220 | (command-characters '( ? ?i ?a ?A ?r ?R ?? ?x ?X ?q ?l ?u ?m )) | 2220 | (command-characters '( ? ?i ?a ?A ?r ?R ?? ?x ?X ?q ?l ?u ?m )) |
| 2221 | (dedicated (window-dedicated-p (selected-window))) | 2221 | (dedicated (window-dedicated-p)) |
| 2222 | (skipped 0) | 2222 | (skipped 0) |
| 2223 | char num result textwin dedicated-win) | 2223 | char num result textwin dedicated-win) |
| 2224 | 2224 | ||
diff --git a/lisp/textmodes/makeinfo.el b/lisp/textmodes/makeinfo.el index 35c6e607569..4b57e0b9746 100644 --- a/lisp/textmodes/makeinfo.el +++ b/lisp/textmodes/makeinfo.el | |||
| @@ -211,7 +211,7 @@ nonsensical results." | |||
| 211 | (with-current-buffer buffer | 211 | (with-current-buffer buffer |
| 212 | (revert-buffer t t)) | 212 | (revert-buffer t t)) |
| 213 | (setq buffer (find-file-noselect makeinfo-output-file-name))) | 213 | (setq buffer (find-file-noselect makeinfo-output-file-name))) |
| 214 | (if (window-dedicated-p (selected-window)) | 214 | (if (window-dedicated-p) |
| 215 | (switch-to-buffer-other-window buffer) | 215 | (switch-to-buffer-other-window buffer) |
| 216 | (switch-to-buffer buffer))) | 216 | (switch-to-buffer buffer))) |
| 217 | (goto-char (point-min)))) | 217 | (goto-char (point-min)))) |
diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index b7ecdb513f5..b67a32a24f7 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el | |||
| @@ -84,48 +84,47 @@ positions of the thing found." | |||
| 84 | (if (get thing 'bounds-of-thing-at-point) | 84 | (if (get thing 'bounds-of-thing-at-point) |
| 85 | (funcall (get thing 'bounds-of-thing-at-point)) | 85 | (funcall (get thing 'bounds-of-thing-at-point)) |
| 86 | (let ((orig (point))) | 86 | (let ((orig (point))) |
| 87 | (condition-case nil | 87 | (ignore-errors |
| 88 | (save-excursion | 88 | (save-excursion |
| 89 | ;; Try moving forward, then back. | 89 | ;; Try moving forward, then back. |
| 90 | (funcall ;; First move to end. | 90 | (funcall ;; First move to end. |
| 91 | (or (get thing 'end-op) | 91 | (or (get thing 'end-op) |
| 92 | (lambda () (forward-thing thing 1)))) | 92 | (lambda () (forward-thing thing 1)))) |
| 93 | (funcall ;; Then move to beg. | 93 | (funcall ;; Then move to beg. |
| 94 | (or (get thing 'beginning-op) | 94 | (or (get thing 'beginning-op) |
| 95 | (lambda () (forward-thing thing -1)))) | 95 | (lambda () (forward-thing thing -1)))) |
| 96 | (let ((beg (point))) | 96 | (let ((beg (point))) |
| 97 | (if (<= beg orig) | 97 | (if (<= beg orig) |
| 98 | ;; If that brings us all the way back to ORIG, | 98 | ;; If that brings us all the way back to ORIG, |
| 99 | ;; it worked. But END may not be the real end. | 99 | ;; it worked. But END may not be the real end. |
| 100 | ;; So find the real end that corresponds to BEG. | 100 | ;; So find the real end that corresponds to BEG. |
| 101 | ;; FIXME: in which cases can `real-end' differ from `end'? | 101 | ;; FIXME: in which cases can `real-end' differ from `end'? |
| 102 | (let ((real-end | 102 | (let ((real-end |
| 103 | (progn | ||
| 104 | (funcall | ||
| 105 | (or (get thing 'end-op) | ||
| 106 | (lambda () (forward-thing thing 1)))) | ||
| 107 | (point)))) | ||
| 108 | (when (and (<= orig real-end) (< beg real-end)) | ||
| 109 | (cons beg real-end))) | ||
| 110 | (goto-char orig) | ||
| 111 | ;; Try a second time, moving backward first and then forward, | ||
| 112 | ;; so that we can find a thing that ends at ORIG. | ||
| 113 | (funcall ;; First, move to beg. | ||
| 114 | (or (get thing 'beginning-op) | ||
| 115 | (lambda () (forward-thing thing -1)))) | ||
| 116 | (funcall ;; Then move to end. | ||
| 117 | (or (get thing 'end-op) | ||
| 118 | (lambda () (forward-thing thing 1)))) | ||
| 119 | (let ((end (point)) | ||
| 120 | (real-beg | ||
| 121 | (progn | 103 | (progn |
| 122 | (funcall | 104 | (funcall |
| 123 | (or (get thing 'beginning-op) | 105 | (or (get thing 'end-op) |
| 124 | (lambda () (forward-thing thing -1)))) | 106 | (lambda () (forward-thing thing 1)))) |
| 125 | (point)))) | 107 | (point)))) |
| 126 | (if (and (<= real-beg orig) (<= orig end) (< real-beg end)) | 108 | (when (and (<= orig real-end) (< beg real-end)) |
| 127 | (cons real-beg end)))))) | 109 | (cons beg real-end))) |
| 128 | (error nil))))) | 110 | (goto-char orig) |
| 111 | ;; Try a second time, moving backward first and then forward, | ||
| 112 | ;; so that we can find a thing that ends at ORIG. | ||
| 113 | (funcall ;; First, move to beg. | ||
| 114 | (or (get thing 'beginning-op) | ||
| 115 | (lambda () (forward-thing thing -1)))) | ||
| 116 | (funcall ;; Then move to end. | ||
| 117 | (or (get thing 'end-op) | ||
| 118 | (lambda () (forward-thing thing 1)))) | ||
| 119 | (let ((end (point)) | ||
| 120 | (real-beg | ||
| 121 | (progn | ||
| 122 | (funcall | ||
| 123 | (or (get thing 'beginning-op) | ||
| 124 | (lambda () (forward-thing thing -1)))) | ||
| 125 | (point)))) | ||
| 126 | (if (and (<= real-beg orig) (<= orig end) (< real-beg end)) | ||
| 127 | (cons real-beg end)))))))))) | ||
| 129 | 128 | ||
| 130 | ;;;###autoload | 129 | ;;;###autoload |
| 131 | (defun thing-at-point (thing &optional no-properties) | 130 | (defun thing-at-point (thing &optional no-properties) |
| @@ -217,21 +216,19 @@ The bounds of THING are determined by `bounds-of-thing-at-point'." | |||
| 217 | \[Internal function used by `bounds-of-thing-at-point'.]" | 216 | \[Internal function used by `bounds-of-thing-at-point'.]" |
| 218 | (save-excursion | 217 | (save-excursion |
| 219 | (let ((opoint (point)) | 218 | (let ((opoint (point)) |
| 220 | (beg (condition-case nil | 219 | (beg (ignore-errors |
| 221 | (progn (up-list -1) | 220 | (up-list -1) |
| 222 | (point)) | 221 | (point)))) |
| 223 | (error nil)))) | 222 | (ignore-errors |
| 224 | (condition-case nil | 223 | (if beg |
| 225 | (if beg | 224 | (progn (forward-sexp) |
| 226 | (progn (forward-sexp) | 225 | (cons beg (point))) |
| 227 | (cons beg (point))) | 226 | ;; Are we are at the beginning of a top-level sexp? |
| 228 | ;; Are we are at the beginning of a top-level sexp? | 227 | (forward-sexp) |
| 229 | (forward-sexp) | 228 | (let ((end (point))) |
| 230 | (let ((end (point))) | 229 | (backward-sexp) |
| 231 | (backward-sexp) | 230 | (if (>= opoint (point)) |
| 232 | (if (>= opoint (point)) | 231 | (cons opoint end)))))))) |
| 233 | (cons opoint end)))) | ||
| 234 | (error nil))))) | ||
| 235 | 232 | ||
| 236 | ;; Defuns | 233 | ;; Defuns |
| 237 | 234 | ||
| @@ -358,7 +355,7 @@ the bounds of a possible ill-formed URI (one lacking a scheme)." | |||
| 358 | (if found | 355 | (if found |
| 359 | (cons (match-beginning 1) (match-end 1)))))) | 356 | (cons (match-beginning 1) (match-end 1)))))) |
| 360 | 357 | ||
| 361 | (defun thing-at-point--bounds-of-well-formed-url (beg end pt) | 358 | (defun thing-at-point--bounds-of-well-formed-url (beg end _pt) |
| 362 | (save-excursion | 359 | (save-excursion |
| 363 | (goto-char beg) | 360 | (goto-char beg) |
| 364 | (let (url-beg paren-end regexp) | 361 | (let (url-beg paren-end regexp) |
| @@ -453,16 +450,14 @@ looks like an email address, \"ftp://\" if it starts with | |||
| 453 | htb ret) | 450 | htb ret) |
| 454 | (while htbs | 451 | (while htbs |
| 455 | (setq htb (car htbs) htbs (cdr htbs)) | 452 | (setq htb (car htbs) htbs (cdr htbs)) |
| 456 | (condition-case nil | 453 | (ignore-errors |
| 457 | (progn | 454 | ;; errs: htb symbol may be unbound, or not a hash-table. |
| 458 | ;; errs: htb symbol may be unbound, or not a hash-table. | 455 | ;; gnus-gethash is just a macro for intern-soft. |
| 459 | ;; gnus-gethash is just a macro for intern-soft. | 456 | (and (symbol-value htb) |
| 460 | (and (symbol-value htb) | 457 | (intern-soft string (symbol-value htb)) |
| 461 | (intern-soft string (symbol-value htb)) | 458 | (setq ret string htbs nil)) |
| 462 | (setq ret string htbs nil)) | 459 | ;; If we made it this far, gnus is running, so ignore "heads": |
| 463 | ;; If we made it this far, gnus is running, so ignore "heads": | 460 | (setq heads nil))) |
| 464 | (setq heads nil)) | ||
| 465 | (error nil))) | ||
| 466 | (or ret (not heads) | 461 | (or ret (not heads) |
| 467 | (let ((head (string-match "\\`\\([[:lower:]]+\\)\\." string))) | 462 | (let ((head (string-match "\\`\\([[:lower:]]+\\)\\." string))) |
| 468 | (and head (setq head (substring string 0 (match-end 1))) | 463 | (and head (setq head (substring string 0 (match-end 1))) |
| @@ -566,9 +561,8 @@ Signal an error if the entire string was not used." | |||
| 566 | (car read-data)))) | 561 | (car read-data)))) |
| 567 | 562 | ||
| 568 | (defun form-at-point (&optional thing pred) | 563 | (defun form-at-point (&optional thing pred) |
| 569 | (let ((sexp (condition-case nil | 564 | (let ((sexp (ignore-errors |
| 570 | (read-from-whole-string (thing-at-point (or thing 'sexp))) | 565 | (read-from-whole-string (thing-at-point (or thing 'sexp)))))) |
| 571 | (error nil)))) | ||
| 572 | (if (or (not pred) (funcall pred sexp)) sexp))) | 566 | (if (or (not pred) (funcall pred sexp)) sexp))) |
| 573 | 567 | ||
| 574 | ;;;###autoload | 568 | ;;;###autoload |
diff --git a/lisp/time.el b/lisp/time.el index 4b5ecf16be1..7e558746c6a 100644 --- a/lisp/time.el +++ b/lisp/time.el | |||
| @@ -323,8 +323,6 @@ would give mode line times like `94/12/30 21:07:48 (UTC)'." | |||
| 323 | 323 | ||
| 324 | (defun display-time-event-handler () | 324 | (defun display-time-event-handler () |
| 325 | (display-time-update) | 325 | (display-time-update) |
| 326 | ;; Do redisplay right now, if no input pending. | ||
| 327 | (sit-for 0) | ||
| 328 | (let* ((current (current-time)) | 326 | (let* ((current (current-time)) |
| 329 | (timer display-time-timer) | 327 | (timer display-time-timer) |
| 330 | ;; Compute the time when this timer will run again, next. | 328 | ;; Compute the time when this timer will run again, next. |
| @@ -352,8 +350,7 @@ Switches from the 1 to 5 to 15 minute load average, and then back to 1." | |||
| 352 | (interactive) | 350 | (interactive) |
| 353 | (if (= 3 (setq display-time-load-average (1+ display-time-load-average))) | 351 | (if (= 3 (setq display-time-load-average (1+ display-time-load-average))) |
| 354 | (setq display-time-load-average 0)) | 352 | (setq display-time-load-average 0)) |
| 355 | (display-time-update) | 353 | (display-time-update)) |
| 356 | (sit-for 0)) | ||
| 357 | 354 | ||
| 358 | (defun display-time-mail-check-directory () | 355 | (defun display-time-mail-check-directory () |
| 359 | (let ((mail-files (directory-files display-time-mail-directory t)) | 356 | (let ((mail-files (directory-files display-time-mail-directory t)) |
diff --git a/lisp/tutorial.el b/lisp/tutorial.el index 39eb9e8b9aa..d581cb13e28 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el | |||
| @@ -156,7 +156,7 @@ options: | |||
| 156 | " RET instead.")) | 156 | " RET instead.")) |
| 157 | (insert "\n\nWith your current key bindings" | 157 | (insert "\n\nWith your current key bindings" |
| 158 | " you can use " | 158 | " you can use " |
| 159 | (if (string-match "^the .*menus?$" where) | 159 | (if (string-match-p "^the .*menus?$" where) |
| 160 | "" | 160 | "" |
| 161 | "the key") | 161 | "the key") |
| 162 | where | 162 | where |
| @@ -346,10 +346,8 @@ from the Emacs default:\n\n" ) | |||
| 346 | (def-fun-txt (nth 2 tk)) | 346 | (def-fun-txt (nth 2 tk)) |
| 347 | (where (nth 3 tk)) | 347 | (where (nth 3 tk)) |
| 348 | (remark (nth 4 tk)) | 348 | (remark (nth 4 tk)) |
| 349 | (rem-fun (command-remapping def-fun)) | ||
| 350 | (key-txt (key-description key)) | 349 | (key-txt (key-description key)) |
| 351 | (key-fun (with-current-buffer tutorial-buffer (key-binding key))) | 350 | (key-fun (with-current-buffer tutorial-buffer (key-binding key)))) |
| 352 | tot-len) | ||
| 353 | (unless (eq def-fun key-fun) | 351 | (unless (eq def-fun key-fun) |
| 354 | ;; Insert key binding description: | 352 | ;; Insert key binding description: |
| 355 | (when (string= key-txt explain-key-desc) | 353 | (when (string= key-txt explain-key-desc) |
| @@ -723,9 +721,7 @@ See `tutorial--save-tutorial' for more information." | |||
| 723 | saved-file | 721 | saved-file |
| 724 | (error-message-string err)))) | 722 | (error-message-string err)))) |
| 725 | ;; An error is raised here?? Is this a bug? | 723 | ;; An error is raised here?? Is this a bug? |
| 726 | (condition-case nil | 724 | (ignore-errors (undo-only)) |
| 727 | (undo-only) | ||
| 728 | (error nil)) | ||
| 729 | ;; Restore point | 725 | ;; Restore point |
| 730 | (goto-char old-point) | 726 | (goto-char old-point) |
| 731 | (if save-err | 727 | (if save-err |
| @@ -881,7 +877,7 @@ Run the Viper tutorial? ")) | |||
| 881 | ;; or just delete the <<...>> line if a [...] line follows. | 877 | ;; or just delete the <<...>> line if a [...] line follows. |
| 882 | (cond ((save-excursion | 878 | (cond ((save-excursion |
| 883 | (forward-line 1) | 879 | (forward-line 1) |
| 884 | (looking-at "\\[")) | 880 | (looking-at-p "\\[")) |
| 885 | (delete-region (point) (progn (forward-line 1) (point)))) | 881 | (delete-region (point) (progn (forward-line 1) (point)))) |
| 886 | ((looking-at "<<Blank lines inserted.*>>") | 882 | ((looking-at "<<Blank lines inserted.*>>") |
| 887 | (replace-match "[Middle of page left blank for didactic purposes. Text continues below]")) | 883 | (replace-match "[Middle of page left blank for didactic purposes. Text continues below]")) |
| @@ -896,7 +892,7 @@ Run the Viper tutorial? ")) | |||
| 896 | ;; inserted at the start of the buffer, the "type C-v to | 892 | ;; inserted at the start of the buffer, the "type C-v to |
| 897 | ;; move to the next screen" might not be visible on the | 893 | ;; move to the next screen" might not be visible on the |
| 898 | ;; first screen (n < 0). How will the novice know what to do? | 894 | ;; first screen (n < 0). How will the novice know what to do? |
| 899 | (let ((n (- (window-height (selected-window)) | 895 | (let ((n (- (window-height) |
| 900 | (count-lines (point-min) (point)) | 896 | (count-lines (point-min) (point)) |
| 901 | 6))) | 897 | 6))) |
| 902 | (if (< n 8) | 898 | (if (< n 8) |
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 120d00002e4..52a69690534 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,24 @@ | |||
| 1 | 2013-08-14 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * url-http.el (url-http-parse-headers): Always place point at the | ||
| 4 | start of the buffer instead of just 80% of the time. | ||
| 5 | |||
| 6 | 2013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 7 | |||
| 8 | * url-http.el (url-handle-content-transfer-encoding): Renamed | ||
| 9 | `zlib-decompress-gzipped-region' and check whether it's available, | ||
| 10 | too. | ||
| 11 | (url-handle-content-transfer-encoding): Renamed | ||
| 12 | `zlib-decompress-region' again. | ||
| 13 | |||
| 14 | 2013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 15 | |||
| 16 | * url-vars.el (url-mime-encoding-string): If we have built-in gzip | ||
| 17 | support, say that we accept gzipped content. | ||
| 18 | |||
| 19 | * url-http.el (url-handle-content-transfer-encoding): Support | ||
| 20 | decompressing gzipped content. | ||
| 21 | |||
| 1 | 2013-07-31 Stefan Monnier <monnier@iro.umontreal.ca> | 22 | 2013-07-31 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 23 | ||
| 3 | * url-handlers.el (url-file-name-completion) | 24 | * url-handlers.el (url-file-name-completion) |
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 7f21a38c535..7047e6b5f13 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el | |||
| @@ -851,11 +851,25 @@ should be shown to the user." | |||
| 851 | (error "Unknown class of HTTP response code: %d (%d)" | 851 | (error "Unknown class of HTTP response code: %d (%d)" |
| 852 | class url-http-response-status))) | 852 | class url-http-response-status))) |
| 853 | (if (not success) | 853 | (if (not success) |
| 854 | (url-mark-buffer-as-dead buffer)) | 854 | (url-mark-buffer-as-dead buffer) |
| 855 | (url-handle-content-transfer-encoding)) | ||
| 855 | (url-http-debug "Finished parsing HTTP headers: %S" success) | 856 | (url-http-debug "Finished parsing HTTP headers: %S" success) |
| 856 | (widen) | 857 | (widen) |
| 858 | (goto-char (point-min)) | ||
| 857 | success)) | 859 | success)) |
| 858 | 860 | ||
| 861 | (defun url-handle-content-transfer-encoding () | ||
| 862 | (let ((encoding (mail-fetch-field "content-encoding"))) | ||
| 863 | (when (and encoding | ||
| 864 | (fboundp 'zlib-decompress-region) | ||
| 865 | (zlib-available-p) | ||
| 866 | (equal (downcase encoding) "gzip")) | ||
| 867 | (save-restriction | ||
| 868 | (widen) | ||
| 869 | (goto-char (point-min)) | ||
| 870 | (when (search-forward "\n\n") | ||
| 871 | (zlib-decompress-region (point) (point-max))))))) | ||
| 872 | |||
| 859 | ;; Miscellaneous | 873 | ;; Miscellaneous |
| 860 | (defun url-http-activate-callback () | 874 | (defun url-http-activate-callback () |
| 861 | "Activate callback specified when this buffer was created." | 875 | "Activate callback specified when this buffer was created." |
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el index 6cd0e9aec3c..0361e01dfb4 100644 --- a/lisp/url/url-vars.el +++ b/lisp/url/url-vars.el | |||
| @@ -210,8 +210,9 @@ Should be an assoc list of headers/contents.") | |||
| 210 | 210 | ||
| 211 | (defvar url-request-method nil "The method to use for the next request.") | 211 | (defvar url-request-method nil "The method to use for the next request.") |
| 212 | 212 | ||
| 213 | ;; FIXME!! (RFC 2616 gives examples like `compress, gzip'.) | 213 | (defvar url-mime-encoding-string (and (fboundp 'zlib-decompress-region) |
| 214 | (defvar url-mime-encoding-string nil | 214 | (zlib-available-p) |
| 215 | "gzip") | ||
| 215 | "String to send in the Accept-encoding: field in HTTP requests.") | 216 | "String to send in the Accept-encoding: field in HTTP requests.") |
| 216 | 217 | ||
| 217 | (defvar mm-mime-mule-charset-alist) | 218 | (defvar mm-mime-mule-charset-alist) |
diff --git a/lisp/userlock.el b/lisp/userlock.el index 4ad96eb41ce..9409409a608 100644 --- a/lisp/userlock.el +++ b/lisp/userlock.el | |||
| @@ -30,8 +30,7 @@ | |||
| 30 | 30 | ||
| 31 | ;;; Code: | 31 | ;;; Code: |
| 32 | 32 | ||
| 33 | (put 'file-locked 'error-conditions '(file-locked file-error error)) | 33 | (define-error 'file-locked "File is locked" 'file-error) |
| 34 | (put 'file-locked 'error-message "File is locked") | ||
| 35 | 34 | ||
| 36 | ;;;###autoload | 35 | ;;;###autoload |
| 37 | (defun ask-user-about-lock (file opponent) | 36 | (defun ask-user-about-lock (file opponent) |
| @@ -94,8 +93,7 @@ You can <q>uit; don't modify this file.") | |||
| 94 | (with-current-buffer standard-output | 93 | (with-current-buffer standard-output |
| 95 | (help-mode)))) | 94 | (help-mode)))) |
| 96 | 95 | ||
| 97 | (put | 96 | (define-error 'file-supersession nil 'file-error) |
| 98 | 'file-supersession 'error-conditions '(file-supersession file-error error)) | ||
| 99 | 97 | ||
| 100 | ;;;###autoload | 98 | ;;;###autoload |
| 101 | (defun ask-user-about-supersession-threat (fn) | 99 | (defun ask-user-about-supersession-threat (fn) |
diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index f0ea9c68464..f926a164797 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el | |||
| @@ -813,12 +813,12 @@ non-nil, otherwise in local time." | |||
| 813 | 813 | ||
| 814 | (unless (equal file-name buffer-file-name) | 814 | (unless (equal file-name buffer-file-name) |
| 815 | (cond | 815 | (cond |
| 816 | ((equal file-name (buffer-file-name (window-buffer (selected-window)))) | 816 | ((equal file-name (buffer-file-name (window-buffer))) |
| 817 | ;; If the selected window already shows the desired buffer don't show | 817 | ;; If the selected window already shows the desired buffer don't show |
| 818 | ;; it again (particularly important if other-window is true). | 818 | ;; it again (particularly important if other-window is true). |
| 819 | ;; This is important for diff-add-change-log-entries-other-window. | 819 | ;; This is important for diff-add-change-log-entries-other-window. |
| 820 | (set-buffer (window-buffer (selected-window)))) | 820 | (set-buffer (window-buffer))) |
| 821 | ((or other-window (window-dedicated-p (selected-window))) | 821 | ((or other-window (window-dedicated-p)) |
| 822 | (find-file-other-window file-name)) | 822 | (find-file-other-window file-name)) |
| 823 | (t (find-file file-name)))) | 823 | (t (find-file file-name)))) |
| 824 | (or (derived-mode-p 'change-log-mode) | 824 | (or (derived-mode-p 'change-log-mode) |
diff --git a/lisp/vc/compare-w.el b/lisp/vc/compare-w.el index ae4fcc99a25..235ebe5a072 100644 --- a/lisp/vc/compare-w.el +++ b/lisp/vc/compare-w.el | |||
| @@ -179,7 +179,7 @@ on third call it again advances points to the next difference and so on." | |||
| 179 | 'compare-windows-sync-regexp | 179 | 'compare-windows-sync-regexp |
| 180 | compare-windows-sync))) | 180 | compare-windows-sync))) |
| 181 | (setq p1 (point) b1 (current-buffer)) | 181 | (setq p1 (point) b1 (current-buffer)) |
| 182 | (setq w2 (next-window (selected-window))) | 182 | (setq w2 (next-window)) |
| 183 | (if (eq w2 (selected-window)) | 183 | (if (eq w2 (selected-window)) |
| 184 | (setq w2 (next-window (selected-window) nil 'visible))) | 184 | (setq w2 (next-window (selected-window) nil 'visible))) |
| 185 | (if (eq w2 (selected-window)) | 185 | (if (eq w2 (selected-window)) |
diff --git a/lisp/vc/ediff-help.el b/lisp/vc/ediff-help.el index 833e84b6cea..78d1a6abfd1 100644 --- a/lisp/vc/ediff-help.el +++ b/lisp/vc/ediff-help.el | |||
| @@ -253,7 +253,7 @@ the value of this variable and the variables `ediff-help-message-*' in | |||
| 253 | 253 | ||
| 254 | 254 | ||
| 255 | (defun ediff-indent-help-message () | 255 | (defun ediff-indent-help-message () |
| 256 | (let* ((shift (/ (max 0 (- (window-width (selected-window)) | 256 | (let* ((shift (/ (max 0 (- (window-width) |
| 257 | (ediff-help-message-line-length))) | 257 | (ediff-help-message-line-length))) |
| 258 | 2)) | 258 | 2)) |
| 259 | (str (make-string shift ?\ ))) | 259 | (str (make-string shift ?\ ))) |
diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index ec227f44e8f..2f2c71a71e6 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el | |||
| @@ -537,7 +537,7 @@ to invocation.") | |||
| 537 | ;; to reside. | 537 | ;; to reside. |
| 538 | (defun ediff-setup-control-buffer (ctl-buf) | 538 | (defun ediff-setup-control-buffer (ctl-buf) |
| 539 | "Set up window for control buffer." | 539 | "Set up window for control buffer." |
| 540 | (if (window-dedicated-p (selected-window)) | 540 | (if (window-dedicated-p) |
| 541 | (set-buffer ctl-buf) ; we are in control frame but just in case | 541 | (set-buffer ctl-buf) ; we are in control frame but just in case |
| 542 | (switch-to-buffer ctl-buf)) | 542 | (switch-to-buffer ctl-buf)) |
| 543 | (let ((window-min-height 2)) | 543 | (let ((window-min-height 2)) |
| @@ -1629,7 +1629,7 @@ the width of the A/B/C windows." | |||
| 1629 | (setq lines (1+ lines))) | 1629 | (setq lines (1+ lines))) |
| 1630 | ;; And position the beginning on the right line | 1630 | ;; And position the beginning on the right line |
| 1631 | (goto-char beg) | 1631 | (goto-char beg) |
| 1632 | (recenter (/ (1+ (max (- (1- (window-height (selected-window))) | 1632 | (recenter (/ (1+ (max (- (1- (window-height)) |
| 1633 | lines) | 1633 | lines) |
| 1634 | 1) | 1634 | 1) |
| 1635 | ) | 1635 | ) |
| @@ -2818,7 +2818,7 @@ Hit \\[ediff-recenter] to reset the windows afterward." | |||
| 2818 | (with-output-to-temp-buffer ediff-msg-buffer | 2818 | (with-output-to-temp-buffer ediff-msg-buffer |
| 2819 | (ediff-with-current-buffer standard-output | 2819 | (ediff-with-current-buffer standard-output |
| 2820 | (fundamental-mode)) | 2820 | (fundamental-mode)) |
| 2821 | (raise-frame (selected-frame)) | 2821 | (raise-frame) |
| 2822 | (princ (ediff-version)) | 2822 | (princ (ediff-version)) |
| 2823 | (princ "\n\n") | 2823 | (princ "\n\n") |
| 2824 | (ediff-with-current-buffer ediff-buffer-A | 2824 | (ediff-with-current-buffer ediff-buffer-A |
| @@ -3468,7 +3468,7 @@ Without an argument, it saves customized diff argument, if available | |||
| 3468 | (ediff-with-current-buffer buf | 3468 | (ediff-with-current-buffer buf |
| 3469 | (goto-char (point-min))) | 3469 | (goto-char (point-min))) |
| 3470 | (switch-to-buffer buf) | 3470 | (switch-to-buffer buf) |
| 3471 | (raise-frame (selected-frame))))) | 3471 | (raise-frame)))) |
| 3472 | (if (frame-live-p ediff-control-frame) | 3472 | (if (frame-live-p ediff-control-frame) |
| 3473 | (ediff-reset-mouse ediff-control-frame)) | 3473 | (ediff-reset-mouse ediff-control-frame)) |
| 3474 | (if (window-live-p ediff-control-window) | 3474 | (if (window-live-p ediff-control-window) |
diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el index 124bdbd26df..5a14c193344 100644 --- a/lisp/vc/ediff-wind.el +++ b/lisp/vc/ediff-wind.el | |||
| @@ -861,7 +861,7 @@ into icons, regardless of the window manager." | |||
| 861 | ;; create a new splittable frame if none is found | 861 | ;; create a new splittable frame if none is found |
| 862 | (defun ediff-skip-unsuitable-frames (&optional ok-unsplittable) | 862 | (defun ediff-skip-unsuitable-frames (&optional ok-unsplittable) |
| 863 | (if (ediff-window-display-p) | 863 | (if (ediff-window-display-p) |
| 864 | (let ((wind-frame (window-frame (selected-window))) | 864 | (let ((wind-frame (window-frame)) |
| 865 | seen-windows) | 865 | seen-windows) |
| 866 | (while (and (not (memq (selected-window) seen-windows)) | 866 | (while (and (not (memq (selected-window) seen-windows)) |
| 867 | (or | 867 | (or |
| @@ -877,7 +877,7 @@ into icons, regardless of the window manager." | |||
| 877 | (setq seen-windows (cons (selected-window) seen-windows)) | 877 | (setq seen-windows (cons (selected-window) seen-windows)) |
| 878 | ;; try new window | 878 | ;; try new window |
| 879 | (other-window 1 t) | 879 | (other-window 1 t) |
| 880 | (setq wind-frame (window-frame (selected-window))) | 880 | (setq wind-frame (window-frame)) |
| 881 | ) | 881 | ) |
| 882 | (if (memq (selected-window) seen-windows) | 882 | (if (memq (selected-window) seen-windows) |
| 883 | ;; fed up, no appropriate frames | 883 | ;; fed up, no appropriate frames |
| @@ -939,7 +939,7 @@ into icons, regardless of the window manager." | |||
| 939 | 939 | ||
| 940 | (setq ctl-frame-iconified-p (ediff-frame-iconified-p ctl-frame)) | 940 | (setq ctl-frame-iconified-p (ediff-frame-iconified-p ctl-frame)) |
| 941 | (select-frame ctl-frame) | 941 | (select-frame ctl-frame) |
| 942 | (if (window-dedicated-p (selected-window)) | 942 | (if (window-dedicated-p) |
| 943 | () | 943 | () |
| 944 | (delete-other-windows) | 944 | (delete-other-windows) |
| 945 | (switch-to-buffer ctl-buffer)) | 945 | (switch-to-buffer ctl-buffer)) |
diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index e9a6a97409c..d35c3e53e9a 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el | |||
| @@ -1499,7 +1499,7 @@ With optional NODE, goes to that node." | |||
| 1499 | (if node | 1499 | (if node |
| 1500 | (Info-goto-node node) | 1500 | (Info-goto-node node) |
| 1501 | (message "Type `i' to search for a specific topic")) | 1501 | (message "Type `i' to search for a specific topic")) |
| 1502 | (raise-frame (selected-frame))) | 1502 | (raise-frame)) |
| 1503 | (error (beep 1) | 1503 | (error (beep 1) |
| 1504 | (with-output-to-temp-buffer ediff-msg-buffer | 1504 | (with-output-to-temp-buffer ediff-msg-buffer |
| 1505 | (ediff-with-current-buffer standard-output | 1505 | (ediff-with-current-buffer standard-output |
diff --git a/lisp/vc/emerge.el b/lisp/vc/emerge.el index 0a1bd044125..8d0e8efc75c 100644 --- a/lisp/vc/emerge.el +++ b/lisp/vc/emerge.el | |||
| @@ -1770,7 +1770,7 @@ to the left margin, if they are in windows." | |||
| 1770 | (setq lines (1+ lines))) | 1770 | (setq lines (1+ lines))) |
| 1771 | ;; And position the beginning on the right line | 1771 | ;; And position the beginning on the right line |
| 1772 | (goto-char beg) | 1772 | (goto-char beg) |
| 1773 | (recenter (/ (1+ (- (1- (window-height (selected-window))) | 1773 | (recenter (/ (1+ (- (1- (window-height)) |
| 1774 | lines)) | 1774 | lines)) |
| 1775 | 2)))))) | 1775 | 2)))))) |
| 1776 | (goto-char pos)) | 1776 | (goto-char pos)) |
diff --git a/lisp/vc/pcvs-util.el b/lisp/vc/pcvs-util.el index 28ae4ed3de3..2868bb98b29 100644 --- a/lisp/vc/pcvs-util.el +++ b/lisp/vc/pcvs-util.el | |||
| @@ -97,7 +97,7 @@ try to split a new window instead." | |||
| 97 | BUF is assumed to be a temporary buffer used from the buffer MAINBUF." | 97 | BUF is assumed to be a temporary buffer used from the buffer MAINBUF." |
| 98 | (interactive (list (current-buffer))) | 98 | (interactive (list (current-buffer))) |
| 99 | (save-current-buffer | 99 | (save-current-buffer |
| 100 | (let ((win (if (eq buf (window-buffer (selected-window))) (selected-window) | 100 | (let ((win (if (eq buf (window-buffer)) (selected-window) |
| 101 | (get-buffer-window buf t)))) | 101 | (get-buffer-window buf t)))) |
| 102 | (when win | 102 | (when win |
| 103 | (if (window-dedicated-p win) | 103 | (if (window-dedicated-p win) |
| @@ -111,8 +111,8 @@ BUF is assumed to be a temporary buffer used from the buffer MAINBUF." | |||
| 111 | ;;; ) | 111 | ;;; ) |
| 112 | ))) | 112 | ))) |
| 113 | (with-current-buffer buf | 113 | (with-current-buffer buf |
| 114 | (bury-buffer (unless (and (eq buf (window-buffer (selected-window))) | 114 | (bury-buffer (unless (and (eq buf (window-buffer)) |
| 115 | (not (window-dedicated-p (selected-window)))) | 115 | (not (window-dedicated-p))) |
| 116 | buf))) | 116 | buf))) |
| 117 | (when mainbuf | 117 | (when mainbuf |
| 118 | (let ((mainwin (or (get-buffer-window mainbuf) | 118 | (let ((mainwin (or (get-buffer-window mainbuf) |
diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el index f61e97216a9..87336b6a357 100644 --- a/lisp/vc/smerge-mode.el +++ b/lisp/vc/smerge-mode.el | |||
| @@ -57,7 +57,6 @@ | |||
| 57 | 57 | ||
| 58 | (defcustom smerge-diff-buffer-name "*vc-diff*" | 58 | (defcustom smerge-diff-buffer-name "*vc-diff*" |
| 59 | "Buffer name to use for displaying diffs." | 59 | "Buffer name to use for displaying diffs." |
| 60 | :group 'smerge | ||
| 61 | :type '(choice | 60 | :type '(choice |
| 62 | (const "*vc-diff*") | 61 | (const "*vc-diff*") |
| 63 | (const "*cvs-diff*") | 62 | (const "*cvs-diff*") |
| @@ -69,12 +68,10 @@ | |||
| 69 | (if (listp diff-switches) diff-switches (list diff-switches))) | 68 | (if (listp diff-switches) diff-switches (list diff-switches))) |
| 70 | "A list of strings specifying switches to be passed to diff. | 69 | "A list of strings specifying switches to be passed to diff. |
| 71 | Used in `smerge-diff-base-mine' and related functions." | 70 | Used in `smerge-diff-base-mine' and related functions." |
| 72 | :group 'smerge | ||
| 73 | :type '(repeat string)) | 71 | :type '(repeat string)) |
| 74 | 72 | ||
| 75 | (defcustom smerge-auto-leave t | 73 | (defcustom smerge-auto-leave t |
| 76 | "Non-nil means to leave `smerge-mode' when the last conflict is resolved." | 74 | "Non-nil means to leave `smerge-mode' when the last conflict is resolved." |
| 77 | :group 'smerge | ||
| 78 | :type 'boolean) | 75 | :type 'boolean) |
| 79 | 76 | ||
| 80 | (defface smerge-mine | 77 | (defface smerge-mine |
| @@ -84,8 +81,7 @@ Used in `smerge-diff-base-mine' and related functions." | |||
| 84 | :background "#553333") | 81 | :background "#553333") |
| 85 | (((class color)) | 82 | (((class color)) |
| 86 | :foreground "red")) | 83 | :foreground "red")) |
| 87 | "Face for your code." | 84 | "Face for your code.") |
| 88 | :group 'smerge) | ||
| 89 | (define-obsolete-face-alias 'smerge-mine-face 'smerge-mine "22.1") | 85 | (define-obsolete-face-alias 'smerge-mine-face 'smerge-mine "22.1") |
| 90 | (defvar smerge-mine-face 'smerge-mine) | 86 | (defvar smerge-mine-face 'smerge-mine) |
| 91 | 87 | ||
| @@ -96,8 +92,7 @@ Used in `smerge-diff-base-mine' and related functions." | |||
| 96 | :background "#335533") | 92 | :background "#335533") |
| 97 | (((class color)) | 93 | (((class color)) |
| 98 | :foreground "green")) | 94 | :foreground "green")) |
| 99 | "Face for the other code." | 95 | "Face for the other code.") |
| 100 | :group 'smerge) | ||
| 101 | (define-obsolete-face-alias 'smerge-other-face 'smerge-other "22.1") | 96 | (define-obsolete-face-alias 'smerge-other-face 'smerge-other "22.1") |
| 102 | (defvar smerge-other-face 'smerge-other) | 97 | (defvar smerge-other-face 'smerge-other) |
| 103 | 98 | ||
| @@ -108,8 +103,7 @@ Used in `smerge-diff-base-mine' and related functions." | |||
| 108 | :background "#888833") | 103 | :background "#888833") |
| 109 | (((class color)) | 104 | (((class color)) |
| 110 | :foreground "yellow")) | 105 | :foreground "yellow")) |
| 111 | "Face for the base code." | 106 | "Face for the base code.") |
| 112 | :group 'smerge) | ||
| 113 | (define-obsolete-face-alias 'smerge-base-face 'smerge-base "22.1") | 107 | (define-obsolete-face-alias 'smerge-base-face 'smerge-base "22.1") |
| 114 | (defvar smerge-base-face 'smerge-base) | 108 | (defvar smerge-base-face 'smerge-base) |
| 115 | 109 | ||
| @@ -118,15 +112,13 @@ Used in `smerge-diff-base-mine' and related functions." | |||
| 118 | (:background "grey85")) | 112 | (:background "grey85")) |
| 119 | (((background dark)) | 113 | (((background dark)) |
| 120 | (:background "grey30"))) | 114 | (:background "grey30"))) |
| 121 | "Face for the conflict markers." | 115 | "Face for the conflict markers.") |
| 122 | :group 'smerge) | ||
| 123 | (define-obsolete-face-alias 'smerge-markers-face 'smerge-markers "22.1") | 116 | (define-obsolete-face-alias 'smerge-markers-face 'smerge-markers "22.1") |
| 124 | (defvar smerge-markers-face 'smerge-markers) | 117 | (defvar smerge-markers-face 'smerge-markers) |
| 125 | 118 | ||
| 126 | (defface smerge-refined-change | 119 | (defface smerge-refined-change |
| 127 | '((t nil)) | 120 | '((t nil)) |
| 128 | "Face used for char-based changes shown by `smerge-refine'." | 121 | "Face used for char-based changes shown by `smerge-refine'.") |
| 129 | :group 'smerge) | ||
| 130 | 122 | ||
| 131 | (defface smerge-refined-removed | 123 | (defface smerge-refined-removed |
| 132 | '((default | 124 | '((default |
| @@ -137,7 +129,6 @@ Used in `smerge-diff-base-mine' and related functions." | |||
| 137 | :background "#aa2222") | 129 | :background "#aa2222") |
| 138 | (t :inverse-video t)) | 130 | (t :inverse-video t)) |
| 139 | "Face used for removed characters shown by `smerge-refine'." | 131 | "Face used for removed characters shown by `smerge-refine'." |
| 140 | :group 'smerge | ||
| 141 | :version "24.3") | 132 | :version "24.3") |
| 142 | 133 | ||
| 143 | (defface smerge-refined-added | 134 | (defface smerge-refined-added |
| @@ -149,7 +140,6 @@ Used in `smerge-diff-base-mine' and related functions." | |||
| 149 | :background "#22aa22") | 140 | :background "#22aa22") |
| 150 | (t :inverse-video t)) | 141 | (t :inverse-video t)) |
| 151 | "Face used for added characters shown by `smerge-refine'." | 142 | "Face used for added characters shown by `smerge-refine'." |
| 152 | :group 'smerge | ||
| 153 | :version "24.3") | 143 | :version "24.3") |
| 154 | 144 | ||
| 155 | (easy-mmode-defmap smerge-basic-map | 145 | (easy-mmode-defmap smerge-basic-map |
| @@ -172,7 +162,6 @@ Used in `smerge-diff-base-mine' and related functions." | |||
| 172 | 162 | ||
| 173 | (defcustom smerge-command-prefix "\C-c^" | 163 | (defcustom smerge-command-prefix "\C-c^" |
| 174 | "Prefix for `smerge-mode' commands." | 164 | "Prefix for `smerge-mode' commands." |
| 175 | :group 'smerge | ||
| 176 | :type '(choice (const :tag "ESC" "\e") | 165 | :type '(choice (const :tag "ESC" "\e") |
| 177 | (const :tag "C-c ^" "\C-c^" ) | 166 | (const :tag "C-c ^" "\C-c^" ) |
| 178 | (const :tag "none" "") | 167 | (const :tag "none" "") |
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 07b7d15299f..7e555825e38 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -649,11 +649,18 @@ If toggling on, also insert its message into the buffer." | |||
| 649 | It is based on `log-edit-mode', and has Git-specific extensions.") | 649 | It is based on `log-edit-mode', and has Git-specific extensions.") |
| 650 | 650 | ||
| 651 | (defun vc-git-checkin (files _rev comment) | 651 | (defun vc-git-checkin (files _rev comment) |
| 652 | (let ((coding-system-for-write vc-git-commits-coding-system)) | 652 | (let* ((file1 (or (car files) default-directory)) |
| 653 | (root (vc-git-root file1)) | ||
| 654 | (default-directory (expand-file-name root)) | ||
| 655 | (only (or (cdr files) | ||
| 656 | (not (equal root (abbreviate-file-name file1))))) | ||
| 657 | (coding-system-for-write vc-git-commits-coding-system)) | ||
| 653 | (cl-flet ((boolean-arg-fn | 658 | (cl-flet ((boolean-arg-fn |
| 654 | (argument) | 659 | (argument) |
| 655 | (lambda (value) (when (equal value "yes") (list argument))))) | 660 | (lambda (value) (when (equal value "yes") (list argument))))) |
| 656 | (apply 'vc-git-command nil 0 files | 661 | ;; When operating on the whole tree, better pass nil than ".", since "." |
| 662 | ;; fails when we're committing a merge. | ||
| 663 | (apply 'vc-git-command nil 0 (if only files) | ||
| 657 | (nconc (list "commit" "-m") | 664 | (nconc (list "commit" "-m") |
| 658 | (log-edit-extract-headers | 665 | (log-edit-extract-headers |
| 659 | `(("Author" . "--author") | 666 | `(("Author" . "--author") |
| @@ -661,7 +668,7 @@ It is based on `log-edit-mode', and has Git-specific extensions.") | |||
| 661 | ("Amend" . ,(boolean-arg-fn "--amend")) | 668 | ("Amend" . ,(boolean-arg-fn "--amend")) |
| 662 | ("Sign-Off" . ,(boolean-arg-fn "--signoff"))) | 669 | ("Sign-Off" . ,(boolean-arg-fn "--signoff"))) |
| 663 | comment) | 670 | comment) |
| 664 | (list "--only" "--")))))) | 671 | (if only (list "--only" "--"))))))) |
| 665 | 672 | ||
| 666 | (defun vc-git-find-revision (file rev buffer) | 673 | (defun vc-git-find-revision (file rev buffer) |
| 667 | (let* (process-file-side-effects | 674 | (let* (process-file-side-effects |
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index ae9aa0118ae..c47bc4c7f97 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el | |||
| @@ -190,7 +190,7 @@ individually should stay local." | |||
| 190 | (make-variable-buffer-local 'vc-mode) | 190 | (make-variable-buffer-local 'vc-mode) |
| 191 | (put 'vc-mode 'permanent-local t) | 191 | (put 'vc-mode 'permanent-local t) |
| 192 | 192 | ||
| 193 | (defun vc-mode (&optional arg) | 193 | (defun vc-mode (&optional _arg) |
| 194 | ;; Dummy function for C-h m | 194 | ;; Dummy function for C-h m |
| 195 | "Version Control minor mode. | 195 | "Version Control minor mode. |
| 196 | This minor mode is automatically activated whenever you visit a file under | 196 | This minor mode is automatically activated whenever you visit a file under |
| @@ -631,7 +631,7 @@ this function." | |||
| 631 | (define-obsolete-function-alias | 631 | (define-obsolete-function-alias |
| 632 | 'vc-toggle-read-only 'toggle-read-only "24.1") | 632 | 'vc-toggle-read-only 'toggle-read-only "24.1") |
| 633 | 633 | ||
| 634 | (defun vc-default-make-version-backups-p (backend file) | 634 | (defun vc-default-make-version-backups-p (_backend _file) |
| 635 | "Return non-nil if unmodified versions should be backed up locally. | 635 | "Return non-nil if unmodified versions should be backed up locally. |
| 636 | The default is to switch off this feature." | 636 | The default is to switch off this feature." |
| 637 | nil) | 637 | nil) |
| @@ -834,7 +834,7 @@ current, and kill the buffer that visits the link." | |||
| 834 | (set-buffer true-buffer) | 834 | (set-buffer true-buffer) |
| 835 | (kill-buffer this-buffer)))) | 835 | (kill-buffer this-buffer)))) |
| 836 | 836 | ||
| 837 | (defun vc-default-find-file-hook (backend) | 837 | (defun vc-default-find-file-hook (_backend) |
| 838 | nil) | 838 | nil) |
| 839 | 839 | ||
| 840 | (defun vc-find-file-hook () | 840 | (defun vc-find-file-hook () |
| @@ -1033,7 +1033,7 @@ current, and kill the buffer that visits the link." | |||
| 1033 | '((ext-menu-separator "--")) | 1033 | '((ext-menu-separator "--")) |
| 1034 | ext-binding)))) | 1034 | ext-binding)))) |
| 1035 | 1035 | ||
| 1036 | (defun vc-default-extra-menu (backend) | 1036 | (defun vc-default-extra-menu (_backend) |
| 1037 | nil) | 1037 | nil) |
| 1038 | 1038 | ||
| 1039 | (provide 'vc-hooks) | 1039 | (provide 'vc-hooks) |
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 007bbe86f34..fcab6f36c6f 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -486,7 +486,7 @@ | |||
| 486 | ;; default implementation always returns nil. | 486 | ;; default implementation always returns nil. |
| 487 | ;; | 487 | ;; |
| 488 | ;; - root (file) | 488 | ;; - root (file) |
| 489 | ;; | 489 | ;; |
| 490 | ;; Return the root of the VC controlled hierarchy for file. | 490 | ;; Return the root of the VC controlled hierarchy for file. |
| 491 | ;; | 491 | ;; |
| 492 | ;; - repository-hostname (dirname) | 492 | ;; - repository-hostname (dirname) |
| @@ -505,12 +505,13 @@ | |||
| 505 | ;; from ignored files. | 505 | ;; from ignored files. |
| 506 | ;; When called from Lisp code, if DIRECTORY is non-nil, the | 506 | ;; When called from Lisp code, if DIRECTORY is non-nil, the |
| 507 | ;; repository to use will be deduced by DIRECTORY. | 507 | ;; repository to use will be deduced by DIRECTORY. |
| 508 | ;; | 508 | ;; |
| 509 | ;; - ignore-completion-table | 509 | ;; - ignore-completion-table |
| 510 | ;; | 510 | ;; |
| 511 | ;; Return the completion table for files ignored by the version | 511 | ;; Return the completion table for files ignored by the current |
| 512 | ;; control system in `default-directory'. | 512 | ;; version control system, e.g., the entries in `.gitignore' and |
| 513 | ;; | 513 | ;; `.bzrignore'. |
| 514 | ;; | ||
| 514 | ;; - previous-revision (file rev) | 515 | ;; - previous-revision (file rev) |
| 515 | ;; | 516 | ;; |
| 516 | ;; Return the revision number that precedes REV for FILE, or nil if no such | 517 | ;; Return the revision number that precedes REV for FILE, or nil if no such |
diff --git a/lisp/version.el b/lisp/version.el index 5db45da860c..96674566781 100644 --- a/lisp/version.el +++ b/lisp/version.el | |||
| @@ -104,7 +104,7 @@ Returns nil if unable to find this information." | |||
| 104 | (looking-at "[0-9]+\0\\([^\0\n]+\\)\0") | 104 | (looking-at "[0-9]+\0\\([^\0\n]+\\)\0") |
| 105 | (match-string 1)))))) | 105 | (match-string 1)))))) |
| 106 | 106 | ||
| 107 | (defun emacs-bzr-version-bzr (dir) | 107 | (defun emacs-bzr-version-bzr (_dir) |
| 108 | "Ask bzr itself for the version information for directory DIR." | 108 | "Ask bzr itself for the version information for directory DIR." |
| 109 | ;; Comments on `bzr version-info': | 109 | ;; Comments on `bzr version-info': |
| 110 | ;; i) Unknown files also cause clean != 1. | 110 | ;; i) Unknown files also cause clean != 1. |
diff --git a/lisp/view.el b/lisp/view.el index f9326399a26..333a9883d14 100644 --- a/lisp/view.el +++ b/lisp/view.el | |||
| @@ -322,7 +322,7 @@ own View-like bindings." | |||
| 322 | (view-mode-enter nil exit-action))) | 322 | (view-mode-enter nil exit-action))) |
| 323 | 323 | ||
| 324 | ;;;###autoload | 324 | ;;;###autoload |
| 325 | (defun view-buffer-other-window (buffer &optional not-return exit-action) | 325 | (defun view-buffer-other-window (buffer &optional _not-return exit-action) |
| 326 | "View BUFFER in View mode in another window. | 326 | "View BUFFER in View mode in another window. |
| 327 | Emacs commands editing the buffer contents are not available; | 327 | Emacs commands editing the buffer contents are not available; |
| 328 | instead, a special set of commands (mostly letters and | 328 | instead, a special set of commands (mostly letters and |
| @@ -349,7 +349,7 @@ own View-like bindings." | |||
| 349 | (view-mode-enter nil exit-action))) | 349 | (view-mode-enter nil exit-action))) |
| 350 | 350 | ||
| 351 | ;;;###autoload | 351 | ;;;###autoload |
| 352 | (defun view-buffer-other-frame (buffer &optional not-return exit-action) | 352 | (defun view-buffer-other-frame (buffer &optional _not-return exit-action) |
| 353 | "View BUFFER in View mode in another frame. | 353 | "View BUFFER in View mode in another frame. |
| 354 | Emacs commands editing the buffer contents are not available; | 354 | Emacs commands editing the buffer contents are not available; |
| 355 | instead, a special set of commands (mostly letters and | 355 | instead, a special set of commands (mostly letters and |
diff --git a/lisp/wdired.el b/lisp/wdired.el index 55665fbb6a0..6c2c9777a47 100644 --- a/lisp/wdired.el +++ b/lisp/wdired.el | |||
| @@ -239,7 +239,8 @@ See `wdired-mode'." | |||
| 239 | (dired-remember-marks (point-min) (point-max))) | 239 | (dired-remember-marks (point-min) (point-max))) |
| 240 | (set (make-local-variable 'wdired-old-point) (point)) | 240 | (set (make-local-variable 'wdired-old-point) (point)) |
| 241 | (set (make-local-variable 'query-replace-skip-read-only) t) | 241 | (set (make-local-variable 'query-replace-skip-read-only) t) |
| 242 | (add-hook 'isearch-filter-predicates 'wdired-isearch-filter-read-only nil t) | 242 | (add-function :after-while (local 'isearch-filter-predicate) |
| 243 | #'wdired-isearch-filter-read-only) | ||
| 243 | (use-local-map wdired-mode-map) | 244 | (use-local-map wdired-mode-map) |
| 244 | (force-mode-line-update) | 245 | (force-mode-line-update) |
| 245 | (setq buffer-read-only nil) | 246 | (setq buffer-read-only nil) |
diff --git a/lisp/window.el b/lisp/window.el index 86d93c0a9f6..a111b3cb5b4 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -477,7 +477,8 @@ WINDOW must be an internal window. Return WINDOW." | |||
| 477 | (error "Window %s is not an internal window" window) | 477 | (error "Window %s is not an internal window" window) |
| 478 | (walk-window-subtree | 478 | (walk-window-subtree |
| 479 | (lambda (window) | 479 | (lambda (window) |
| 480 | (set-window-parameter window 'window-atom t)) | 480 | (unless (window-parameter window 'window-atom) |
| 481 | (set-window-parameter window 'window-atom t))) | ||
| 481 | window t) | 482 | window t) |
| 482 | window)) | 483 | window)) |
| 483 | 484 | ||
| @@ -498,24 +499,39 @@ following symbols can be used. | |||
| 498 | sibling of an atomic window's root. If an internal window is | 499 | sibling of an atomic window's root. If an internal window is |
| 499 | specified here, all children of that window become part of the | 500 | specified here, all children of that window become part of the |
| 500 | atomic window too. If no window is specified, the new window | 501 | atomic window too. If no window is specified, the new window |
| 501 | becomes a sibling of the selected window. | 502 | becomes a sibling of the selected window. By default, the |
| 503 | `window-atom' parameter of the existing window is set to `main' | ||
| 504 | provided it is live and was not set before. | ||
| 502 | 505 | ||
| 503 | `side' denotes the side of the existing window where the new | 506 | `side' denotes the side of the existing window where the new |
| 504 | window shall be located. Valid values are `below', `right', | 507 | window shall be located. Valid values are `below', `right', |
| 505 | `above' and `left'. The default is `below'. | 508 | `above' and `left'. The default is `below'. By default, the |
| 509 | `window-atom' parameter of the new window is set to this value. | ||
| 506 | 510 | ||
| 507 | The return value is the new window, nil when creating that window | 511 | The return value is the new window, nil when creating that window |
| 508 | failed." | 512 | failed." |
| 509 | (let ((ignore-window-parameters t) | 513 | (let* ((ignore-window-parameters t) |
| 510 | (window-combination-limit t) | 514 | (window-combination-limit t) |
| 511 | (window (cdr (assq 'window alist))) | 515 | (window-combination-resize 'atom) |
| 512 | (side (cdr (assq 'side alist))) | 516 | (window (cdr (assq 'window alist))) |
| 513 | new) | 517 | (side (cdr (assq 'side alist))) |
| 518 | (atom (when window (window-parameter window 'window-atom))) | ||
| 519 | root new) | ||
| 514 | (setq window (window-normalize-window window)) | 520 | (setq window (window-normalize-window window)) |
| 515 | ;; Split off new window | 521 | (setq root (window-atom-root window)) |
| 522 | ;; Split off new window. | ||
| 516 | (when (setq new (split-window window nil side)) | 523 | (when (setq new (split-window window nil side)) |
| 517 | ;; Make sure we have a valid atomic window. | 524 | (window-make-atom |
| 518 | (window-make-atom (window-parent window)) | 525 | (if (and root (not (eq root window))) |
| 526 | ;; When WINDOW was part of an atomic window and we did not | ||
| 527 | ;; split its root, root atomic window at old root. | ||
| 528 | root | ||
| 529 | ;; Otherwise, root atomic window at WINDOW's new parent. | ||
| 530 | (window-parent window))) | ||
| 531 | ;; Assign `window-atom' parameters, if needed. | ||
| 532 | (when (and (not atom) (window-live-p window)) | ||
| 533 | (set-window-parameter window 'window-atom 'main)) | ||
| 534 | (set-window-parameter new 'window-atom side) | ||
| 519 | ;; Display BUFFER in NEW and return NEW. | 535 | ;; Display BUFFER in NEW and return NEW. |
| 520 | (window--display-buffer | 536 | (window--display-buffer |
| 521 | buffer new 'window alist display-buffer-mark-dedicated)))) | 537 | buffer new 'window alist display-buffer-mark-dedicated)))) |
| @@ -631,7 +647,7 @@ its root window." | |||
| 631 | (and (setq sibling (window-next-sibling window)) | 647 | (and (setq sibling (window-next-sibling window)) |
| 632 | (window-parameter sibling 'window-side))) | 648 | (window-parameter sibling 'window-side))) |
| 633 | (setq major window))) | 649 | (setq major window))) |
| 634 | frame t) | 650 | frame t 'nomini) |
| 635 | (or major (frame-root-window frame)))) | 651 | (or major (frame-root-window frame)))) |
| 636 | 652 | ||
| 637 | (defun window--major-side-window (side) | 653 | (defun window--major-side-window (side) |
| @@ -685,10 +701,8 @@ symbols and values as passed to `display-buffer-in-side-window'. | |||
| 685 | This function may be called only if no window on SIDE exists yet. | 701 | This function may be called only if no window on SIDE exists yet. |
| 686 | The new window automatically becomes the \"major\" side window on | 702 | The new window automatically becomes the \"major\" side window on |
| 687 | SIDE. Return the new window, nil if its creation window failed." | 703 | SIDE. Return the new window, nil if its creation window failed." |
| 688 | (let* ((root (frame-root-window)) | 704 | (let* ((left-or-right (memq side '(left right))) |
| 689 | (left-or-right (memq side '(left right))) | ||
| 690 | (major (window--major-side-window side)) | 705 | (major (window--major-side-window side)) |
| 691 | (selected-window (selected-window)) | ||
| 692 | (on-side (cond | 706 | (on-side (cond |
| 693 | ((eq side 'top) 'above) | 707 | ((eq side 'top) 'above) |
| 694 | ((eq side 'bottom) 'below) | 708 | ((eq side 'bottom) 'below) |
| @@ -698,8 +712,7 @@ SIDE. Return the new window, nil if its creation window failed." | |||
| 698 | ;; parent window unless needed. | 712 | ;; parent window unless needed. |
| 699 | (window-combination-resize 'side) | 713 | (window-combination-resize 'side) |
| 700 | (window-combination-limit nil) | 714 | (window-combination-limit nil) |
| 701 | (new (split-window major nil on-side)) | 715 | (new (split-window major nil on-side))) |
| 702 | fun) | ||
| 703 | (when new | 716 | (when new |
| 704 | ;; Initialize `window-side' parameter of new window to SIDE. | 717 | ;; Initialize `window-side' parameter of new window to SIDE. |
| 705 | (set-window-parameter new 'window-side side) | 718 | (set-window-parameter new 'window-side side) |
| @@ -749,8 +762,7 @@ following symbols can be used: | |||
| 749 | A positive value means use a slot following (that is, below or | 762 | A positive value means use a slot following (that is, below or |
| 750 | on the right of) the middle slot. The default is zero." | 763 | on the right of) the middle slot. The default is zero." |
| 751 | (let ((side (or (cdr (assq 'side alist)) 'bottom)) | 764 | (let ((side (or (cdr (assq 'side alist)) 'bottom)) |
| 752 | (slot (or (cdr (assq 'slot alist)) 0)) | 765 | (slot (or (cdr (assq 'slot alist)) 0))) |
| 753 | new) | ||
| 754 | (cond | 766 | (cond |
| 755 | ((not (memq side '(top bottom left right))) | 767 | ((not (memq side '(top bottom left right))) |
| 756 | (error "Invalid side %s specified" side)) | 768 | (error "Invalid side %s specified" side)) |
| @@ -766,7 +778,8 @@ following symbols can be used: | |||
| 766 | (walk-window-tree | 778 | (walk-window-tree |
| 767 | (lambda (window) | 779 | (lambda (window) |
| 768 | (when (eq (window-parameter window 'window-side) side) | 780 | (when (eq (window-parameter window 'window-side) side) |
| 769 | (setq windows (cons window windows))))) | 781 | (setq windows (cons window windows)))) |
| 782 | nil nil 'nomini) | ||
| 770 | (nreverse windows)))) | 783 | (nreverse windows)))) |
| 771 | (slots (when major (max 1 (window-child-count major)))) | 784 | (slots (when major (max 1 (window-child-count major)))) |
| 772 | (max-slots | 785 | (max-slots |
| @@ -776,9 +789,8 @@ following symbols can be used: | |||
| 776 | ((eq side 'right) 2) | 789 | ((eq side 'right) 2) |
| 777 | ((eq side 'bottom) 3)) | 790 | ((eq side 'bottom) 3)) |
| 778 | window-sides-slots)) | 791 | window-sides-slots)) |
| 779 | (selected-window (selected-window)) | ||
| 780 | window this-window this-slot prev-window next-window | 792 | window this-window this-slot prev-window next-window |
| 781 | best-window best-slot abs-slot new-window) | 793 | best-window best-slot abs-slot) |
| 782 | 794 | ||
| 783 | (cond | 795 | (cond |
| 784 | ((and (numberp max-slots) (<= max-slots 0)) | 796 | ((and (numberp max-slots) (<= max-slots 0)) |
| @@ -924,14 +936,14 @@ of all windows on FRAME to nil." | |||
| 924 | (if bottom (throw 'reset t) (setq bottom t))) | 936 | (if bottom (throw 'reset t) (setq bottom t))) |
| 925 | (t | 937 | (t |
| 926 | (throw 'reset t)))) | 938 | (throw 'reset t)))) |
| 927 | frame t)) | 939 | frame t 'nomini)) |
| 928 | ;; If there's a side window, there must be at least one | 940 | ;; If there's a side window, there must be at least one |
| 929 | ;; non-side window. | 941 | ;; non-side window. |
| 930 | (and (or left top right bottom) (not none))) | 942 | (and (or left top right bottom) (not none))) |
| 931 | (walk-window-tree | 943 | (walk-window-tree |
| 932 | (lambda (window) | 944 | (lambda (window) |
| 933 | (set-window-parameter window 'window-side nil)) | 945 | (set-window-parameter window 'window-side nil)) |
| 934 | frame t)))) | 946 | frame t 'nomini)))) |
| 935 | 947 | ||
| 936 | (defun window--check (&optional frame) | 948 | (defun window--check (&optional frame) |
| 937 | "Check atomic and side windows on FRAME. | 949 | "Check atomic and side windows on FRAME. |
| @@ -985,8 +997,8 @@ means ignore all of the above restrictions for all windows." | |||
| 985 | (setq value (+ value | 997 | (setq value (+ value |
| 986 | (window--min-size-1 sub horizontal ignore))) | 998 | (window--min-size-1 sub horizontal ignore))) |
| 987 | (setq sub (window-right sub))) | 999 | (setq sub (window-right sub))) |
| 988 | ;; The minimum size of an ortho-combination is the maximum of | 1000 | ;; The minimum size of an ortho-combination is the maximum |
| 989 | ;; the minimum sizes of its child windows. | 1001 | ;; of the minimum sizes of its child windows. |
| 990 | (while sub | 1002 | (while sub |
| 991 | (setq value (max value | 1003 | (setq value (max value |
| 992 | (window--min-size-1 sub horizontal ignore))) | 1004 | (window--min-size-1 sub horizontal ignore))) |
| @@ -1486,7 +1498,7 @@ This function changes neither the order of recently selected | |||
| 1486 | windows nor the buffer list." | 1498 | windows nor the buffer list." |
| 1487 | ;; If we start from the minibuffer window, don't fail to come | 1499 | ;; If we start from the minibuffer window, don't fail to come |
| 1488 | ;; back to it. | 1500 | ;; back to it. |
| 1489 | (when (window-minibuffer-p (selected-window)) | 1501 | (when (window-minibuffer-p) |
| 1490 | (setq minibuf t)) | 1502 | (setq minibuf t)) |
| 1491 | ;; Make sure to not mess up the order of recently selected | 1503 | ;; Make sure to not mess up the order of recently selected |
| 1492 | ;; windows. Use `save-selected-window' and `select-window' | 1504 | ;; windows. Use `save-selected-window' and `select-window' |
| @@ -2813,10 +2825,11 @@ and no others." | |||
| 2813 | (defun window-deletable-p (&optional window) | 2825 | (defun window-deletable-p (&optional window) |
| 2814 | "Return t if WINDOW can be safely deleted from its frame. | 2826 | "Return t if WINDOW can be safely deleted from its frame. |
| 2815 | WINDOW must be a valid window and defaults to the selected one. | 2827 | WINDOW must be a valid window and defaults to the selected one. |
| 2816 | Return `frame' if deleting WINDOW should also delete its frame." | 2828 | Return 'frame if deleting WINDOW should also delete its frame." |
| 2817 | (setq window (window-normalize-window window)) | 2829 | (setq window (window-normalize-window window)) |
| 2818 | 2830 | ||
| 2819 | (unless ignore-window-parameters | 2831 | (unless (or ignore-window-parameters |
| 2832 | (eq (window-parameter window 'delete-window) t)) | ||
| 2820 | ;; Handle atomicity. | 2833 | ;; Handle atomicity. |
| 2821 | (when (window-parameter window 'window-atom) | 2834 | (when (window-parameter window 'window-atom) |
| 2822 | (setq window (window-atom-root window)))) | 2835 | (setq window (window-atom-root window)))) |
| @@ -2828,6 +2841,14 @@ Return `frame' if deleting WINDOW should also delete its frame." | |||
| 2828 | ;; on the same terminal, and it does not contain the active | 2841 | ;; on the same terminal, and it does not contain the active |
| 2829 | ;; minibuffer. | 2842 | ;; minibuffer. |
| 2830 | (unless (or (eq frame (next-frame frame 0)) | 2843 | (unless (or (eq frame (next-frame frame 0)) |
| 2844 | ;; We can delete our frame only if no other frame | ||
| 2845 | ;; currently uses our minibuffer window. | ||
| 2846 | (catch 'other | ||
| 2847 | (dolist (other (frame-list)) | ||
| 2848 | (when (and (not (eq other frame)) | ||
| 2849 | (eq (window-frame (minibuffer-window other)) | ||
| 2850 | frame)) | ||
| 2851 | (throw 'other t)))) | ||
| 2831 | (let ((minibuf (active-minibuffer-window))) | 2852 | (let ((minibuf (active-minibuffer-window))) |
| 2832 | (and minibuf (eq frame (window-frame minibuf))))) | 2853 | (and minibuf (eq frame (window-frame minibuf))))) |
| 2833 | 'frame)) | 2854 | 'frame)) |
| @@ -3065,7 +3086,9 @@ WINDOW must be a live window and defaults to the selected one." | |||
| 3065 | ;; (Bug#12588). | 3086 | ;; (Bug#12588). |
| 3066 | point window-point-insertion-type))))) | 3087 | point window-point-insertion-type))))) |
| 3067 | (set-window-prev-buffers | 3088 | (set-window-prev-buffers |
| 3068 | window (cons entry (window-prev-buffers window)))))))) | 3089 | window (cons entry (window-prev-buffers window))))) |
| 3090 | |||
| 3091 | (run-hooks 'buffer-list-update-hook)))) | ||
| 3069 | 3092 | ||
| 3070 | (defun unrecord-window-buffer (&optional window buffer) | 3093 | (defun unrecord-window-buffer (&optional window buffer) |
| 3071 | "Unrecord BUFFER in WINDOW. | 3094 | "Unrecord BUFFER in WINDOW. |
| @@ -3899,7 +3922,8 @@ frame. The selected window is not changed by this function." | |||
| 3899 | 3922 | ||
| 3900 | (let* ((new (split-window-internal window new-size side new-normal))) | 3923 | (let* ((new (split-window-internal window new-size side new-normal))) |
| 3901 | ;; Assign window-side parameters, if any. | 3924 | ;; Assign window-side parameters, if any. |
| 3902 | (when (eq window-combination-resize 'side) | 3925 | (cond |
| 3926 | ((eq window-combination-resize 'side) | ||
| 3903 | (let ((window-side | 3927 | (let ((window-side |
| 3904 | (cond | 3928 | (cond |
| 3905 | (window-side window-side) | 3929 | (window-side window-side) |
| @@ -3913,6 +3937,14 @@ frame. The selected window is not changed by this function." | |||
| 3913 | ;; new parent the same window-side parameter. | 3937 | ;; new parent the same window-side parameter. |
| 3914 | (set-window-parameter | 3938 | (set-window-parameter |
| 3915 | (window-parent new) 'window-side window-side)))) | 3939 | (window-parent new) 'window-side window-side)))) |
| 3940 | ((eq window-combination-resize 'atom) | ||
| 3941 | ;; Make sure `window--check-frame' won't destroy an existing | ||
| 3942 | ;; atomic window in case the new window gets nested inside. | ||
| 3943 | (unless (window-parameter window 'window-atom) | ||
| 3944 | (set-window-parameter window 'window-atom t)) | ||
| 3945 | (when new-parent | ||
| 3946 | (set-window-parameter (window-parent new) 'window-atom t)) | ||
| 3947 | (set-window-parameter new 'window-atom t))) | ||
| 3916 | 3948 | ||
| 3917 | (run-window-configuration-change-hook frame) | 3949 | (run-window-configuration-change-hook frame) |
| 3918 | (window--check frame) | 3950 | (window--check frame) |
| @@ -5610,7 +5642,10 @@ new frame." | |||
| 5610 | (fun pop-up-frame-function) | 5642 | (fun pop-up-frame-function) |
| 5611 | frame window) | 5643 | frame window) |
| 5612 | (when (and fun | 5644 | (when (and fun |
| 5613 | (setq frame (funcall fun)) | 5645 | ;; Make BUFFER current so `make-frame' will use it as the |
| 5646 | ;; new frame's buffer (Bug#15133). | ||
| 5647 | (with-current-buffer buffer | ||
| 5648 | (setq frame (funcall fun))) | ||
| 5614 | (setq window (frame-selected-window frame))) | 5649 | (setq window (frame-selected-window frame))) |
| 5615 | (prog1 (window--display-buffer | 5650 | (prog1 (window--display-buffer |
| 5616 | buffer window 'frame alist display-buffer-mark-dedicated) | 5651 | buffer window 'frame alist display-buffer-mark-dedicated) |
| @@ -5681,7 +5716,8 @@ This either splits the window at the bottom of the frame or the | |||
| 5681 | frame's root window, or reuses an existing window at the bottom | 5716 | frame's root window, or reuses an existing window at the bottom |
| 5682 | of the selected frame." | 5717 | of the selected frame." |
| 5683 | (let (bottom-window window) | 5718 | (let (bottom-window window) |
| 5684 | (walk-window-tree (lambda (window) (setq bottom-window window))) | 5719 | (walk-window-tree |
| 5720 | (lambda (window) (setq bottom-window window)) nil nil 'nomini) | ||
| 5685 | (or (and (not (frame-parameter nil 'unsplittable)) | 5721 | (or (and (not (frame-parameter nil 'unsplittable)) |
| 5686 | (setq window (window--try-to-split-window bottom-window alist)) | 5722 | (setq window (window--try-to-split-window bottom-window alist)) |
| 5687 | (window--display-buffer | 5723 | (window--display-buffer |
| @@ -5689,7 +5725,7 @@ of the selected frame." | |||
| 5689 | (and (not (frame-parameter nil 'unsplittable)) | 5725 | (and (not (frame-parameter nil 'unsplittable)) |
| 5690 | (setq window | 5726 | (setq window |
| 5691 | (condition-case nil | 5727 | (condition-case nil |
| 5692 | (split-window (frame-root-window)) | 5728 | (split-window (window--major-non-side-window)) |
| 5693 | (error nil))) | 5729 | (error nil))) |
| 5694 | (window--display-buffer | 5730 | (window--display-buffer |
| 5695 | buffer window 'window alist display-buffer-mark-dedicated)) | 5731 | buffer window 'window alist display-buffer-mark-dedicated)) |
| @@ -5730,7 +5766,7 @@ above, even if that window never showed BUFFER before." | |||
| 5730 | 0) | 5766 | 0) |
| 5731 | (display-buffer-reuse-frames 0) | 5767 | (display-buffer-reuse-frames 0) |
| 5732 | (t (last-nonminibuffer-frame)))) | 5768 | (t (last-nonminibuffer-frame)))) |
| 5733 | entry best-window second-best-window window) | 5769 | best-window second-best-window window) |
| 5734 | ;; Scan windows whether they have shown the buffer recently. | 5770 | ;; Scan windows whether they have shown the buffer recently. |
| 5735 | (catch 'best | 5771 | (catch 'best |
| 5736 | (dolist (window (window-list-1 (frame-first-window) 'nomini frames)) | 5772 | (dolist (window (window-list-1 (frame-first-window) 'nomini frames)) |
| @@ -5777,7 +5813,7 @@ that frame." | |||
| 5777 | (unless (and not-this-window | 5813 | (unless (and not-this-window |
| 5778 | (eq window (selected-window))) | 5814 | (eq window (selected-window))) |
| 5779 | window)) | 5815 | window)) |
| 5780 | (get-largest-window 0 not-this-window)))) | 5816 | (get-largest-window 0 nil not-this-window)))) |
| 5781 | (when (window-live-p window) | 5817 | (when (window-live-p window) |
| 5782 | (prog1 | 5818 | (prog1 |
| 5783 | (window--display-buffer buffer window 'reuse alist) | 5819 | (window--display-buffer buffer window 'reuse alist) |
| @@ -5808,7 +5844,8 @@ at the front of the list of recently selected ones." | |||
| 5808 | (interactive (list (read-buffer "Pop to buffer: " (other-buffer)) | 5844 | (interactive (list (read-buffer "Pop to buffer: " (other-buffer)) |
| 5809 | (if current-prefix-arg t))) | 5845 | (if current-prefix-arg t))) |
| 5810 | (setq buffer (window-normalize-buffer-to-switch-to buffer)) | 5846 | (setq buffer (window-normalize-buffer-to-switch-to buffer)) |
| 5811 | (set-buffer buffer) | 5847 | ;; This should be done by `select-window' below. |
| 5848 | ;; (set-buffer buffer) | ||
| 5812 | (let* ((old-frame (selected-frame)) | 5849 | (let* ((old-frame (selected-frame)) |
| 5813 | (window (display-buffer buffer action)) | 5850 | (window (display-buffer buffer action)) |
| 5814 | (frame (window-frame window))) | 5851 | (frame (window-frame window))) |
| @@ -6646,9 +6683,12 @@ is active. This function is run by `mouse-autoselect-window-timer'." | |||
| 6646 | (cond | 6683 | (cond |
| 6647 | ((or (menu-or-popup-active-p) | 6684 | ((or (menu-or-popup-active-p) |
| 6648 | (and window | 6685 | (and window |
| 6649 | (not (coordinates-in-window-p (cdr mouse-position) window)))) | 6686 | (let ((coords (coordinates-in-window-p |
| 6650 | ;; A menu / popup dialog is active or the mouse is on the scroll-bar | 6687 | (cdr mouse-position) window))) |
| 6651 | ;; of WINDOW, temporarily suspend delayed autoselection. | 6688 | (and (not (consp coords)) |
| 6689 | (not (memq coords '(left-margin right-margin))))))) | ||
| 6690 | ;; A menu / popup dialog is active or the mouse is not on the | ||
| 6691 | ;; text region of WINDOW: Suspend autoselection temporarily. | ||
| 6652 | (mouse-autoselect-window-start mouse-position nil t)) | 6692 | (mouse-autoselect-window-start mouse-position nil t)) |
| 6653 | ((eq mouse-autoselect-window-state 'suspend) | 6693 | ((eq mouse-autoselect-window-state 'suspend) |
| 6654 | ;; Delayed autoselection was temporarily suspended, reenable it. | 6694 | ;; Delayed autoselection was temporarily suspended, reenable it. |
| @@ -6676,7 +6716,7 @@ is active. This function is run by `mouse-autoselect-window-timer'." | |||
| 6676 | ;; minibuffer. Use `unread-command-events' in order to execute pre- | 6716 | ;; minibuffer. Use `unread-command-events' in order to execute pre- |
| 6677 | ;; and post-command hooks and trigger idle timers. To avoid delaying | 6717 | ;; and post-command hooks and trigger idle timers. To avoid delaying |
| 6678 | ;; autoselection again, set `mouse-autoselect-window-state'." | 6718 | ;; autoselection again, set `mouse-autoselect-window-state'." |
| 6679 | (unless (window-minibuffer-p (selected-window)) | 6719 | (unless (window-minibuffer-p) |
| 6680 | (setq mouse-autoselect-window-state 'select) | 6720 | (setq mouse-autoselect-window-state 'select) |
| 6681 | (setq unread-command-events | 6721 | (setq unread-command-events |
| 6682 | (cons (list 'select-window (list window)) | 6722 | (cons (list 'select-window (list window)) |
| @@ -6702,7 +6742,7 @@ is active. This function is run by `mouse-autoselect-window-timer'." | |||
| 6702 | ;; minibuffer gets unselected unexpectedly, and where | 6742 | ;; minibuffer gets unselected unexpectedly, and where |
| 6703 | ;; you then have to move your mouse all the way down to | 6743 | ;; you then have to move your mouse all the way down to |
| 6704 | ;; the minibuffer to select it. | 6744 | ;; the minibuffer to select it. |
| 6705 | (window-minibuffer-p (selected-window)) | 6745 | (window-minibuffer-p) |
| 6706 | ;; Don't switch to minibuffer window unless it's active. | 6746 | ;; Don't switch to minibuffer window unless it's active. |
| 6707 | (and (window-minibuffer-p window) | 6747 | (and (window-minibuffer-p window) |
| 6708 | (not (minibuffer-window-active-p window))) | 6748 | (not (minibuffer-window-active-p window))) |
diff --git a/lisp/winner.el b/lisp/winner.el index e7e7d0614b4..e81052f8499 100644 --- a/lisp/winner.el +++ b/lisp/winner.el | |||
| @@ -227,8 +227,7 @@ You may want to include buffer names such as *Help*, *Apropos*, | |||
| 227 | (set-window-configuration winconf)) | 227 | (set-window-configuration winconf)) |
| 228 | (cond | 228 | (cond |
| 229 | ((window-live-p chosen) (select-window chosen)) | 229 | ((window-live-p chosen) (select-window chosen)) |
| 230 | ((window-minibuffer-p (selected-window)) | 230 | ((window-minibuffer-p) (other-window 1))) |
| 231 | (other-window 1))) | ||
| 232 | (when (/= minisize (window-height miniwin)) | 231 | (when (/= minisize (window-height miniwin)) |
| 233 | (with-selected-window miniwin | 232 | (with-selected-window miniwin |
| 234 | (setf (window-height) minisize))))) | 233 | (setf (window-height) minisize))))) |
| @@ -381,7 +380,7 @@ In other words, \"undo\" changes in window configuration." | |||
| 381 | (setq winner-undone-data (list (winner-win-data)))) | 380 | (setq winner-undone-data (list (winner-win-data)))) |
| 382 | (cl-incf winner-undo-counter) ; starting at 1 | 381 | (cl-incf winner-undo-counter) ; starting at 1 |
| 383 | (when (and (winner-undo-this) | 382 | (when (and (winner-undo-this) |
| 384 | (not (window-minibuffer-p (selected-window)))) | 383 | (not (window-minibuffer-p))) |
| 385 | (message "Winner undo (%d / %d)" | 384 | (message "Winner undo (%d / %d)" |
| 386 | winner-undo-counter | 385 | winner-undo-counter |
| 387 | (1- (ring-length winner-pending-undo-ring))))))) | 386 | (1- (ring-length winner-pending-undo-ring))))))) |
diff --git a/lisp/woman.el b/lisp/woman.el index 1cead32ab2f..b1be2d67b62 100644 --- a/lisp/woman.el +++ b/lisp/woman.el | |||
| @@ -438,7 +438,7 @@ As a special case, if PATHS is nil then replace it by calling | |||
| 438 | (if (memq system-type '(windows-nt ms-dos)) | 438 | (if (memq system-type '(windows-nt ms-dos)) |
| 439 | (cond ((null paths) | 439 | (cond ((null paths) |
| 440 | (mapcar 'woman-Cyg-to-Win (woman-parse-man.conf))) | 440 | (mapcar 'woman-Cyg-to-Win (woman-parse-man.conf))) |
| 441 | ((string-match ";" paths) | 441 | ((string-match-p ";" paths) |
| 442 | ;; Assume DOS-style path-list... | 442 | ;; Assume DOS-style path-list... |
| 443 | (woman-mapcan ; splice list into list | 443 | (woman-mapcan ; splice list into list |
| 444 | (lambda (x) | 444 | (lambda (x) |
| @@ -446,7 +446,7 @@ As a special case, if PATHS is nil then replace it by calling | |||
| 446 | (list x) | 446 | (list x) |
| 447 | (mapcar 'woman-Cyg-to-Win (woman-parse-man.conf)))) | 447 | (mapcar 'woman-Cyg-to-Win (woman-parse-man.conf)))) |
| 448 | (parse-colon-path paths))) | 448 | (parse-colon-path paths))) |
| 449 | ((string-match "\\`[a-zA-Z]:" paths) | 449 | ((string-match-p "\\`[a-zA-Z]:" paths) |
| 450 | ;; Assume single DOS-style path... | 450 | ;; Assume single DOS-style path... |
| 451 | (list paths)) | 451 | (list paths)) |
| 452 | (t | 452 | (t |
| @@ -974,7 +974,7 @@ This is usually either black or white." | |||
| 974 | ;; With NTEmacs 20.5, the PATTERN option to `x-list-fonts' does | 974 | ;; With NTEmacs 20.5, the PATTERN option to `x-list-fonts' does |
| 975 | ;; not seem to work and fonts may be repeated, so ... | 975 | ;; not seem to work and fonts may be repeated, so ... |
| 976 | (dolist (font fonts) | 976 | (dolist (font fonts) |
| 977 | (and (string-match "-Symbol-" font) | 977 | (and (string-match-p "-Symbol-" font) |
| 978 | (not (member font symbol-fonts)) | 978 | (not (member font symbol-fonts)) |
| 979 | (setq symbol-fonts (cons font symbol-fonts)))) | 979 | (setq symbol-fonts (cons font symbol-fonts)))) |
| 980 | symbol-fonts)) | 980 | symbol-fonts)) |
| @@ -1173,7 +1173,7 @@ Used non-interactively, arguments are optional: if given then TOPIC | |||
| 1173 | should be a topic string and non-nil RE-CACHE forces re-caching." | 1173 | should be a topic string and non-nil RE-CACHE forces re-caching." |
| 1174 | (interactive (list nil current-prefix-arg)) | 1174 | (interactive (list nil current-prefix-arg)) |
| 1175 | ;; The following test is for non-interactive calls via gnudoit etc. | 1175 | ;; The following test is for non-interactive calls via gnudoit etc. |
| 1176 | (if (or (not (stringp topic)) (string-match "\\S " topic)) | 1176 | (if (or (not (stringp topic)) (string-match-p "\\S " topic)) |
| 1177 | (let ((file-name (woman-file-name topic re-cache))) | 1177 | (let ((file-name (woman-file-name topic re-cache))) |
| 1178 | (if file-name | 1178 | (if file-name |
| 1179 | (woman-find-file file-name) | 1179 | (woman-find-file file-name) |
| @@ -1614,7 +1614,7 @@ decompress the file if appropriate. See the documentation for the | |||
| 1614 | (let* ((bufname (file-name-nondirectory file-name)) | 1614 | (let* ((bufname (file-name-nondirectory file-name)) |
| 1615 | (case-fold-search t) | 1615 | (case-fold-search t) |
| 1616 | (compressed | 1616 | (compressed |
| 1617 | (not (not (string-match woman-file-compression-regexp bufname))))) | 1617 | (and (string-match-p woman-file-compression-regexp bufname) t))) |
| 1618 | (if compressed | 1618 | (if compressed |
| 1619 | (setq bufname (file-name-sans-extension bufname))) | 1619 | (setq bufname (file-name-sans-extension bufname))) |
| 1620 | (setq bufname (if exists | 1620 | (setq bufname (if exists |
| @@ -1756,7 +1756,7 @@ Leave point at end of new text. Return length of inserted text." | |||
| 1756 | ;; Co-operate with auto-compression mode: | 1756 | ;; Co-operate with auto-compression mode: |
| 1757 | (if (and compressed | 1757 | (if (and compressed |
| 1758 | (or (eq compressed t) | 1758 | (or (eq compressed t) |
| 1759 | (string-match woman-file-compression-regexp filename)) | 1759 | (string-match-p woman-file-compression-regexp filename)) |
| 1760 | ;; (not auto-compression-mode) | 1760 | ;; (not auto-compression-mode) |
| 1761 | (not (rassq 'jka-compr-handler file-name-handler-alist)) ) | 1761 | (not (rassq 'jka-compr-handler file-name-handler-alist)) ) |
| 1762 | ;; (error "Compressed file requires Auto File Decompression turned on") | 1762 | ;; (error "Compressed file requires Auto File Decompression turned on") |
| @@ -2192,7 +2192,7 @@ To be called on original buffer and any .so insertions." | |||
| 2192 | (let ((face-list (face-list))) | 2192 | (let ((face-list (face-list))) |
| 2193 | (dolist (face face-list) | 2193 | (dolist (face face-list) |
| 2194 | (let ((face-name (symbol-name face))) | 2194 | (let ((face-name (symbol-name face))) |
| 2195 | (if (and (string-match "\\`woman-" face-name) | 2195 | (if (and (string-match-p "\\`woman-" face-name) |
| 2196 | (face-underline-p face)) | 2196 | (face-underline-p face)) |
| 2197 | (let ((face-no-ul (intern (concat face-name "-no-ul")))) | 2197 | (let ((face-no-ul (intern (concat face-name "-no-ul")))) |
| 2198 | (copy-face face face-no-ul) | 2198 | (copy-face face face-no-ul) |
| @@ -3029,6 +3029,8 @@ Leave point at TO (which should be a marker)." | |||
| 3029 | "Delete any double-quote characters up to the end of the line." | 3029 | "Delete any double-quote characters up to the end of the line." |
| 3030 | (woman-unquote (save-excursion (end-of-line) (point-marker)))) | 3030 | (woman-unquote (save-excursion (end-of-line) (point-marker)))) |
| 3031 | 3031 | ||
| 3032 | (defvar woman1-unquote) ; bound locally by woman1-roff-buffer | ||
| 3033 | |||
| 3032 | (defun woman1-roff-buffer () | 3034 | (defun woman1-roff-buffer () |
| 3033 | "Process non-breaking requests." | 3035 | "Process non-breaking requests." |
| 3034 | (let ((case-fold-search t) | 3036 | (let ((case-fold-search t) |
| @@ -3069,8 +3071,6 @@ Leave point at TO (which should be a marker)." | |||
| 3069 | ".I -- Set words of current line in italic font." | 3071 | ".I -- Set words of current line in italic font." |
| 3070 | (woman1-B-or-I ".ft I\n")) | 3072 | (woman1-B-or-I ".ft I\n")) |
| 3071 | 3073 | ||
| 3072 | (defvar woman1-unquote) ; bound locally by woman1-roff-buffer | ||
| 3073 | |||
| 3074 | (defun woman1-B-or-I (B-or-I) | 3074 | (defun woman1-B-or-I (B-or-I) |
| 3075 | ".B/I -- Set words of current line in bold/italic font. | 3075 | ".B/I -- Set words of current line in bold/italic font. |
| 3076 | B-OR-I is the appropriate complete control line." | 3076 | B-OR-I is the appropriate complete control line." |
diff --git a/lisp/xml.el b/lisp/xml.el index a3d34670bfb..b62065eb48f 100644 --- a/lisp/xml.el +++ b/lisp/xml.el | |||
| @@ -479,7 +479,7 @@ Return one of: | |||
| 479 | xml-default-ns)))) | 479 | xml-default-ns)))) |
| 480 | (cond | 480 | (cond |
| 481 | ;; Processing instructions, like <?xml version="1.0"?>. | 481 | ;; Processing instructions, like <?xml version="1.0"?>. |
| 482 | ((looking-at "<\\?") | 482 | ((looking-at-p "<\\?") |
| 483 | (search-forward "?>") | 483 | (search-forward "?>") |
| 484 | (skip-syntax-forward " ") | 484 | (skip-syntax-forward " ") |
| 485 | (xml-parse-tag-1 parse-dtd xml-ns)) | 485 | (xml-parse-tag-1 parse-dtd xml-ns)) |
| @@ -492,14 +492,14 @@ Return one of: | |||
| 492 | (buffer-substring-no-properties pos (match-beginning 0)) | 492 | (buffer-substring-no-properties pos (match-beginning 0)) |
| 493 | (xml-parse-string)))) | 493 | (xml-parse-string)))) |
| 494 | ;; DTD for the document | 494 | ;; DTD for the document |
| 495 | ((looking-at "<!DOCTYPE[ \t\n\r]") | 495 | ((looking-at-p "<!DOCTYPE[ \t\n\r]") |
| 496 | (let ((dtd (xml-parse-dtd parse-ns))) | 496 | (let ((dtd (xml-parse-dtd parse-ns))) |
| 497 | (skip-syntax-forward " ") | 497 | (skip-syntax-forward " ") |
| 498 | (if xml-validating-parser | 498 | (if xml-validating-parser |
| 499 | (cons dtd (xml-parse-tag-1 nil xml-ns)) | 499 | (cons dtd (xml-parse-tag-1 nil xml-ns)) |
| 500 | (xml-parse-tag-1 nil xml-ns)))) | 500 | (xml-parse-tag-1 nil xml-ns)))) |
| 501 | ;; skip comments | 501 | ;; skip comments |
| 502 | ((looking-at "<!--") | 502 | ((looking-at-p "<!--") |
| 503 | (search-forward "-->") | 503 | (search-forward "-->") |
| 504 | ;; FIXME: This loses the skipped-over spaces. | 504 | ;; FIXME: This loses the skipped-over spaces. |
| 505 | (skip-syntax-forward " ") | 505 | (skip-syntax-forward " ") |
| @@ -507,7 +507,7 @@ Return one of: | |||
| 507 | (let ((xml-sub-parser t)) | 507 | (let ((xml-sub-parser t)) |
| 508 | (xml-parse-tag-1 parse-dtd xml-ns)))) | 508 | (xml-parse-tag-1 parse-dtd xml-ns)))) |
| 509 | ;; end tag | 509 | ;; end tag |
| 510 | ((looking-at "</") | 510 | ((looking-at-p "</") |
| 511 | '()) | 511 | '()) |
| 512 | ;; opening tag | 512 | ;; opening tag |
| 513 | ((looking-at (eval-when-compile (concat "<\\(" xml-name-re "\\)"))) | 513 | ((looking-at (eval-when-compile (concat "<\\(" xml-name-re "\\)"))) |
| @@ -530,7 +530,7 @@ Return one of: | |||
| 530 | (setq children (list attrs (xml-maybe-do-ns node-name "" xml-ns))) | 530 | (setq children (list attrs (xml-maybe-do-ns node-name "" xml-ns))) |
| 531 | (cond | 531 | (cond |
| 532 | ;; is this an empty element ? | 532 | ;; is this an empty element ? |
| 533 | ((looking-at "/>") | 533 | ((looking-at-p "/>") |
| 534 | (forward-char 2) | 534 | (forward-char 2) |
| 535 | (nreverse children)) | 535 | (nreverse children)) |
| 536 | ;; is this a valid start tag ? | 536 | ;; is this a valid start tag ? |
| @@ -543,7 +543,7 @@ Return one of: | |||
| 543 | ((eobp) | 543 | ((eobp) |
| 544 | (error "XML: (Not Well-Formed) End of document while reading element `%s'" | 544 | (error "XML: (Not Well-Formed) End of document while reading element `%s'" |
| 545 | node-name)) | 545 | node-name)) |
| 546 | ((looking-at "</") | 546 | ((looking-at-p "</") |
| 547 | (forward-char 2) | 547 | (forward-char 2) |
| 548 | (error "XML: (Not Well-Formed) Invalid end tag `%s' (expecting `%s')" | 548 | (error "XML: (Not Well-Formed) Invalid end tag `%s' (expecting `%s')" |
| 549 | (let ((pos (point))) | 549 | (let ((pos (point))) |
| @@ -591,7 +591,7 @@ references." | |||
| 591 | (old-remaining-size (- (buffer-size) (point))) | 591 | (old-remaining-size (- (buffer-size) (point))) |
| 592 | ref val) | 592 | ref val) |
| 593 | (while (and (not (eobp)) | 593 | (while (and (not (eobp)) |
| 594 | (not (looking-at "<"))) | 594 | (not (looking-at-p "<"))) |
| 595 | ;; Find the next < or & character. | 595 | ;; Find the next < or & character. |
| 596 | (skip-chars-forward "^<&") | 596 | (skip-chars-forward "^<&") |
| 597 | (when (eq (char-after) ?&) | 597 | (when (eq (char-after) ?&) |
| @@ -690,11 +690,11 @@ This follows the rule [28] in the XML specifications." | |||
| 690 | (let ((xml-validating-parser nil)) | 690 | (let ((xml-validating-parser nil)) |
| 691 | (xml-parse-dtd))) | 691 | (xml-parse-dtd))) |
| 692 | 692 | ||
| 693 | (defun xml-parse-dtd (&optional parse-ns) | 693 | (defun xml-parse-dtd (&optional _parse-ns) |
| 694 | "Parse the DTD at point." | 694 | "Parse the DTD at point." |
| 695 | (forward-char (eval-when-compile (length "<!DOCTYPE"))) | 695 | (forward-char (eval-when-compile (length "<!DOCTYPE"))) |
| 696 | (skip-syntax-forward " ") | 696 | (skip-syntax-forward " ") |
| 697 | (if (and (looking-at ">") | 697 | (if (and (looking-at-p ">") |
| 698 | xml-validating-parser) | 698 | xml-validating-parser) |
| 699 | (error "XML: (Validity) Invalid DTD (expecting name of the document)")) | 699 | (error "XML: (Validity) Invalid DTD (expecting name of the document)")) |
| 700 | 700 | ||
| @@ -755,7 +755,7 @@ This follows the rule [28] in the XML specifications." | |||
| 755 | 755 | ||
| 756 | ;; Parse the rest of the DTD | 756 | ;; Parse the rest of the DTD |
| 757 | ;; Fixme: Deal with NOTATION, PIs. | 757 | ;; Fixme: Deal with NOTATION, PIs. |
| 758 | (while (not (looking-at "\\s-*\\]")) | 758 | (while (not (looking-at-p "\\s-*\\]")) |
| 759 | (skip-syntax-forward " ") | 759 | (skip-syntax-forward " ") |
| 760 | (cond | 760 | (cond |
| 761 | ((eobp) | 761 | ((eobp) |
| @@ -771,14 +771,14 @@ This follows the rule [28] in the XML specifications." | |||
| 771 | (end-pos (match-end 0))) | 771 | (end-pos (match-end 0))) |
| 772 | ;; Translation of rule [46] of XML specifications | 772 | ;; Translation of rule [46] of XML specifications |
| 773 | (cond | 773 | (cond |
| 774 | ((string-match "\\`EMPTY\\s-*\\'" type) ; empty declaration | 774 | ((string-match-p "\\`EMPTY\\s-*\\'" type) ; empty declaration |
| 775 | (setq type 'empty)) | 775 | (setq type 'empty)) |
| 776 | ((string-match "\\`ANY\\s-*$" type) ; any type of contents | 776 | ((string-match-p "\\`ANY\\s-*$" type) ; any type of contents |
| 777 | (setq type 'any)) | 777 | (setq type 'any)) |
| 778 | ((string-match "\\`(\\(.*\\))\\s-*\\'" type) ; children ([47]) | 778 | ((string-match "\\`(\\(.*\\))\\s-*\\'" type) ; children ([47]) |
| 779 | (setq type (xml-parse-elem-type | 779 | (setq type (xml-parse-elem-type |
| 780 | (match-string-no-properties 1 type)))) | 780 | (match-string-no-properties 1 type)))) |
| 781 | ((string-match "^%[^;]+;[ \t\n\r]*\\'" type) ; substitution | 781 | ((string-match-p "^%[^;]+;[ \t\n\r]*\\'" type) ; substitution |
| 782 | nil) | 782 | nil) |
| 783 | (xml-validating-parser | 783 | (xml-validating-parser |
| 784 | (error "XML: (Validity) Invalid element type in the DTD"))) | 784 | (error "XML: (Validity) Invalid element type in the DTD"))) |
| @@ -803,7 +803,7 @@ This follows the rule [28] in the XML specifications." | |||
| 803 | (goto-char (match-end 0))) | 803 | (goto-char (match-end 0))) |
| 804 | 804 | ||
| 805 | ;; Comments (skip to end, ignoring parameter entity): | 805 | ;; Comments (skip to end, ignoring parameter entity): |
| 806 | ((looking-at "<!--") | 806 | ((looking-at-p "<!--") |
| 807 | (search-forward "-->") | 807 | (search-forward "-->") |
| 808 | (and next-parameter-entity | 808 | (and next-parameter-entity |
| 809 | (> (point) next-parameter-entity) | 809 | (> (point) next-parameter-entity) |
| @@ -856,7 +856,6 @@ This follows the rule [28] in the XML specifications." | |||
| 856 | (unless (looking-at xml-pe-reference-re) | 856 | (unless (looking-at xml-pe-reference-re) |
| 857 | (error "XML: Internal error")) | 857 | (error "XML: Internal error")) |
| 858 | (let* ((entity (match-string 1)) | 858 | (let* ((entity (match-string 1)) |
| 859 | (beg (point-marker)) | ||
| 860 | (elt (assoc entity xml-parameter-entity-alist))) | 859 | (elt (assoc entity xml-parameter-entity-alist))) |
| 861 | (if elt | 860 | (if elt |
| 862 | (progn | 861 | (progn |
| @@ -916,11 +915,11 @@ references and parameter-entity references." | |||
| 916 | (progn | 915 | (progn |
| 917 | (setq elem (match-string-no-properties 1 string) | 916 | (setq elem (match-string-no-properties 1 string) |
| 918 | modifier (match-string-no-properties 2 string)) | 917 | modifier (match-string-no-properties 2 string)) |
| 919 | (if (string-match "|" elem) | 918 | (if (string-match-p "|" elem) |
| 920 | (setq elem (cons 'choice | 919 | (setq elem (cons 'choice |
| 921 | (mapcar 'xml-parse-elem-type | 920 | (mapcar 'xml-parse-elem-type |
| 922 | (split-string elem "|")))) | 921 | (split-string elem "|")))) |
| 923 | (if (string-match "," elem) | 922 | (if (string-match-p "," elem) |
| 924 | (setq elem (cons 'seq | 923 | (setq elem (cons 'seq |
| 925 | (mapcar 'xml-parse-elem-type | 924 | (mapcar 'xml-parse-elem-type |
| 926 | (split-string elem ","))))))) | 925 | (split-string elem ","))))))) |
| @@ -987,13 +986,12 @@ by \"*\"." | |||
| 987 | (if (and string (stringp string)) | 986 | (if (and string (stringp string)) |
| 988 | (let ((start 0)) | 987 | (let ((start 0)) |
| 989 | (while (string-match "&#\\([0-9]+\\);" string start) | 988 | (while (string-match "&#\\([0-9]+\\);" string start) |
| 990 | (condition-case nil | 989 | (ignore-errors |
| 991 | (setq string (replace-match | 990 | (setq string (replace-match |
| 992 | (string (read (substring string | 991 | (string (read (substring string |
| 993 | (match-beginning 1) | 992 | (match-beginning 1) |
| 994 | (match-end 1)))) | 993 | (match-end 1)))) |
| 995 | nil nil string)) | 994 | nil nil string))) |
| 996 | (error nil)) | ||
| 997 | (setq start (1+ (match-beginning 0)))) | 995 | (setq start (1+ (match-beginning 0)))) |
| 998 | string) | 996 | string) |
| 999 | nil)) | 997 | nil)) |