Mercurial > emacs
comparison lisp/allout.el @ 70244:ccd02e1ca0e3
Remove local autoload declaration for
pgg-gpg-symmetric-key-p, since that's now done in pgg-gpg.el.
(allout-show-bodies, allout-header-prefix, allout-primary-bullet)
(allout-plain-bullets-string, allout-distinctive-bullets-string)
(allout-use-mode-specific-leader, allout-old-style-prefixes)
(allout-stylish-prefixes, allout-numbered-bullet)
(allout-file-xref-bullet, allout-presentation-padding)
(allout-use-hanging-indents, allout-reindent-bodies): Mark as
safe-local-variable with suitable value spec, and add autoload
cookie for loaddefs inclusion. We now use an explicit spec everywhere.
(move-beginning-of-line, move-end-of-line): Repair so these compat
functions now actually resituate the point, when appropriate.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 26 Apr 2006 21:54:51 +0000 |
parents | 81a284d45346 |
children | 12b22e9828df 966a40e7fb54 |
comparison
equal
deleted
inserted
replaced
70243:040cb1efa4bc | 70244:ccd02e1ca0e3 |
---|---|
82 (require 'overlay) | 82 (require 'overlay) |
83 (eval-when-compile (progn (require 'pgg) | 83 (eval-when-compile (progn (require 'pgg) |
84 (require 'pgg-gpg) | 84 (require 'pgg-gpg) |
85 (require 'overlay) | 85 (require 'overlay) |
86 )) | 86 )) |
87 (autoload 'pgg-gpg-symmetric-key-p "pgg-gpg" | |
88 "True if decoded armor MESSAGE-KEYS has symmetric encryption indicator.") | |
89 | 87 |
90 ;;;_* USER CUSTOMIZATION VARIABLES: | 88 ;;;_* USER CUSTOMIZATION VARIABLES: |
91 | 89 |
92 ;;;_ > defgroup allout | 90 ;;;_ > defgroup allout |
93 (defgroup allout nil | 91 (defgroup allout nil |
197 "*If non-nil, show entire body when exposing a topic, rather than | 195 "*If non-nil, show entire body when exposing a topic, rather than |
198 just the header." | 196 just the header." |
199 :type 'boolean | 197 :type 'boolean |
200 :group 'allout) | 198 :group 'allout) |
201 (make-variable-buffer-local 'allout-show-bodies) | 199 (make-variable-buffer-local 'allout-show-bodies) |
200 ;;;###autoload | |
201 (put 'allout-show-bodies 'safe-local-variable | |
202 (lambda (x) (member x '(t nil)))) | |
202 | 203 |
203 ;;;_ = allout-header-prefix | 204 ;;;_ = allout-header-prefix |
204 (defcustom allout-header-prefix "." | 205 (defcustom allout-header-prefix "." |
205 "*Leading string which helps distinguish topic headers. | 206 "*Leading string which helps distinguish topic headers. |
206 | 207 |
210 character, which is typically set to the `allout-primary-bullet'. Many | 211 character, which is typically set to the `allout-primary-bullet'. Many |
211 outlines start at level 2 to avoid this discrepancy." | 212 outlines start at level 2 to avoid this discrepancy." |
212 :type 'string | 213 :type 'string |
213 :group 'allout) | 214 :group 'allout) |
214 (make-variable-buffer-local 'allout-header-prefix) | 215 (make-variable-buffer-local 'allout-header-prefix) |
216 ;;;###autoload | |
217 (put 'allout-header-prefix 'safe-local-variable 'stringp) | |
215 ;;;_ = allout-primary-bullet | 218 ;;;_ = allout-primary-bullet |
216 (defcustom allout-primary-bullet "*" | 219 (defcustom allout-primary-bullet "*" |
217 "Bullet used for top-level outline topics. | 220 "Bullet used for top-level outline topics. |
218 | 221 |
219 Outline topic header lines are identified by a leading topic header | 222 Outline topic header lines are identified by a leading topic header |
225 and `allout-distinctive-bullets-string' for the range of available | 228 and `allout-distinctive-bullets-string' for the range of available |
226 bullets." | 229 bullets." |
227 :type 'string | 230 :type 'string |
228 :group 'allout) | 231 :group 'allout) |
229 (make-variable-buffer-local 'allout-primary-bullet) | 232 (make-variable-buffer-local 'allout-primary-bullet) |
233 ;;;###autoload | |
234 (put 'allout-primary-bullet 'safe-local-variable 'stringp) | |
230 ;;;_ = allout-plain-bullets-string | 235 ;;;_ = allout-plain-bullets-string |
231 (defcustom allout-plain-bullets-string ".," | 236 (defcustom allout-plain-bullets-string ".," |
232 "*The bullets normally used in outline topic prefixes. | 237 "*The bullets normally used in outline topic prefixes. |
233 | 238 |
234 See `allout-distinctive-bullets-string' for the other kind of | 239 See `allout-distinctive-bullets-string' for the other kind of |
239 Outline mode has to be reactivated in order for changes to the value | 244 Outline mode has to be reactivated in order for changes to the value |
240 of this var to take effect." | 245 of this var to take effect." |
241 :type 'string | 246 :type 'string |
242 :group 'allout) | 247 :group 'allout) |
243 (make-variable-buffer-local 'allout-plain-bullets-string) | 248 (make-variable-buffer-local 'allout-plain-bullets-string) |
249 ;;;###autoload | |
250 (put 'allout-plain-bullets-string 'safe-local-variable 'stringp) | |
244 ;;;_ = allout-distinctive-bullets-string | 251 ;;;_ = allout-distinctive-bullets-string |
245 (defcustom allout-distinctive-bullets-string "*+-=>()[{}&!?#%\"X@$~_\\:;^" | 252 (defcustom allout-distinctive-bullets-string "*+-=>()[{}&!?#%\"X@$~_\\:;^" |
246 "*Persistent outline header bullets used to distinguish special topics. | 253 "*Persistent outline header bullets used to distinguish special topics. |
247 | 254 |
248 These bullets are used to distinguish topics from the run-of-the-mill | 255 These bullets are used to distinguish topics from the run-of-the-mill |
272 DO NOT include the close-square-bracket, `]', on either of the bullet | 279 DO NOT include the close-square-bracket, `]', on either of the bullet |
273 strings." | 280 strings." |
274 :type 'string | 281 :type 'string |
275 :group 'allout) | 282 :group 'allout) |
276 (make-variable-buffer-local 'allout-distinctive-bullets-string) | 283 (make-variable-buffer-local 'allout-distinctive-bullets-string) |
284 ;;;###autoload | |
285 (put 'allout-distinctive-bullets-string 'safe-local-variable 'stringp) | |
277 | 286 |
278 ;;;_ = allout-use-mode-specific-leader | 287 ;;;_ = allout-use-mode-specific-leader |
279 (defcustom allout-use-mode-specific-leader t | 288 (defcustom allout-use-mode-specific-leader t |
280 "*When non-nil, use mode-specific topic-header prefixes. | 289 "*When non-nil, use mode-specific topic-header prefixes. |
281 | 290 |
290 \(See note about use of comment-start strings, below.) | 299 \(See note about use of comment-start strings, below.) |
291 | 300 |
292 Set to the symbol for either of `allout-mode-leaders' or | 301 Set to the symbol for either of `allout-mode-leaders' or |
293 `comment-start' to use only one of them, respectively. | 302 `comment-start' to use only one of them, respectively. |
294 | 303 |
295 Value nil means to always use the default \(`.'). | 304 Value nil means to always use the default \(`.').t |
296 | 305 |
297 comment-start strings that do not end in spaces are tripled, and an | 306 comment-start strings that do not end in spaces are tripled, and an |
298 `_' underscore is tacked on the end, to distinguish them from regular | 307 `_' underscore is tacked on the end, to distinguish them from regular |
299 comment strings. comment-start strings that do end in spaces are not | 308 comment strings. comment-start strings that do end in spaces are not |
300 tripled, but an underscore is substituted for the space. [This | 309 tripled, but an underscore is substituted for the space. [This |
303 incorrect.]" | 312 incorrect.]" |
304 :type '(choice (const t) (const nil) string | 313 :type '(choice (const t) (const nil) string |
305 (const allout-mode-leaders) | 314 (const allout-mode-leaders) |
306 (const comment-start)) | 315 (const comment-start)) |
307 :group 'allout) | 316 :group 'allout) |
317 ;;;###autoload | |
318 (put 'allout-use-mode-specific-leader 'safe-local-variable | |
319 (lambda (x) (or (member x '(t nil)) (stringp x)))) | |
308 ;;;_ = allout-mode-leaders | 320 ;;;_ = allout-mode-leaders |
309 (defvar allout-mode-leaders '() | 321 (defvar allout-mode-leaders '() |
310 "Specific allout-prefix leading strings per major modes. | 322 "Specific allout-prefix leading strings per major modes. |
311 | 323 |
312 Entries will be used instead or in lieu of mode-specific | 324 Entries will be used instead or in lieu of mode-specific |
328 Whatever the setting of this variable, both old and new style prefixes | 340 Whatever the setting of this variable, both old and new style prefixes |
329 are always respected by the topic maneuvering functions." | 341 are always respected by the topic maneuvering functions." |
330 :type 'boolean | 342 :type 'boolean |
331 :group 'allout) | 343 :group 'allout) |
332 (make-variable-buffer-local 'allout-old-style-prefixes) | 344 (make-variable-buffer-local 'allout-old-style-prefixes) |
345 ;;;###autoload | |
346 (put 'allout-old-style-prefixes 'safe-local-variable | |
347 (lambda (x) (member x '(t nil)))) | |
333 ;;;_ = allout-stylish-prefixes - alternating bullets | 348 ;;;_ = allout-stylish-prefixes - alternating bullets |
334 (defcustom allout-stylish-prefixes t | 349 (defcustom allout-stylish-prefixes t |
335 "*Do fancy stuff with topic prefix bullets according to level, etc. | 350 "*Do fancy stuff with topic prefix bullets according to level, etc. |
336 | 351 |
337 Non-nil enables topic creation, modification, and repositioning | 352 Non-nil enables topic creation, modification, and repositioning |
374 The setting of this var is not relevant when `allout-old-style-prefixes' | 389 The setting of this var is not relevant when `allout-old-style-prefixes' |
375 is non-nil." | 390 is non-nil." |
376 :type 'boolean | 391 :type 'boolean |
377 :group 'allout) | 392 :group 'allout) |
378 (make-variable-buffer-local 'allout-stylish-prefixes) | 393 (make-variable-buffer-local 'allout-stylish-prefixes) |
394 ;;;###autoload | |
395 (put 'allout-stylish-prefixes 'safe-local-variable | |
396 (lambda (x) (member x '(t nil)))) | |
379 | 397 |
380 ;;;_ = allout-numbered-bullet | 398 ;;;_ = allout-numbered-bullet |
381 (defcustom allout-numbered-bullet "#" | 399 (defcustom allout-numbered-bullet "#" |
382 "*String designating bullet of topics that have auto-numbering; nil for none. | 400 "*String designating bullet of topics that have auto-numbering; nil for none. |
383 | 401 |
386 to \"#\", you can set it to a bullet of your choice. A nil value | 404 to \"#\", you can set it to a bullet of your choice. A nil value |
387 disables numbering maintenance." | 405 disables numbering maintenance." |
388 :type '(choice (const nil) string) | 406 :type '(choice (const nil) string) |
389 :group 'allout) | 407 :group 'allout) |
390 (make-variable-buffer-local 'allout-numbered-bullet) | 408 (make-variable-buffer-local 'allout-numbered-bullet) |
409 ;;;###autoload | |
410 (put 'allout-numbered-bullet 'safe-local-variable | |
411 (lambda (x) (or (not x) (stringp x)))) | |
391 ;;;_ = allout-file-xref-bullet | 412 ;;;_ = allout-file-xref-bullet |
392 (defcustom allout-file-xref-bullet "@" | 413 (defcustom allout-file-xref-bullet "@" |
393 "*Bullet signifying file cross-references, for `allout-resolve-xref'. | 414 "*Bullet signifying file cross-references, for `allout-resolve-xref'. |
394 | 415 |
395 Set this var to the bullet you want to use for file cross-references." | 416 Set this var to the bullet you want to use for file cross-references." |
396 :type '(choice (const nil) string) | 417 :type '(choice (const nil) string) |
397 :group 'allout) | 418 :group 'allout) |
419 ;;;###autoload | |
420 (put 'allout-file-xref-bullet 'safe-local-variable | |
421 (lambda (x) (or (not x) (stringp x)))) | |
398 ;;;_ = allout-presentation-padding | 422 ;;;_ = allout-presentation-padding |
399 (defcustom allout-presentation-padding 2 | 423 (defcustom allout-presentation-padding 2 |
400 "*Presentation-format white-space padding factor, for greater indent." | 424 "*Presentation-format white-space padding factor, for greater indent." |
401 :type 'integer | 425 :type 'integer |
402 :group 'allout) | 426 :group 'allout) |
403 | 427 |
404 (make-variable-buffer-local 'allout-presentation-padding) | 428 (make-variable-buffer-local 'allout-presentation-padding) |
429 ;;;###autoload | |
430 (put 'allout-presentation-padding 'safe-local-variable 'integerp) | |
405 | 431 |
406 ;;;_ = allout-abbreviate-flattened-numbering | 432 ;;;_ = allout-abbreviate-flattened-numbering |
407 (defcustom allout-abbreviate-flattened-numbering nil | 433 (defcustom allout-abbreviate-flattened-numbering nil |
408 "*If non-nil, `allout-flatten-exposed-to-buffer' abbreviates topic | 434 "*If non-nil, `allout-flatten-exposed-to-buffer' abbreviates topic |
409 numbers to minimal amount with some context. Otherwise, entire | 435 numbers to minimal amount with some context. Otherwise, entire |
453 "*LaTeX formatted depth-indent spacing." | 479 "*LaTeX formatted depth-indent spacing." |
454 :type 'string | 480 :type 'string |
455 :group 'allout) | 481 :group 'allout) |
456 | 482 |
457 ;;;_ + Topic encryption | 483 ;;;_ + Topic encryption |
484 ;;;_ = allout-encryption group | |
485 (defgroup allout-encryption nil | |
486 "Settings for topic encryption features of allout outliner." | |
487 :group 'allout) | |
458 ;;;_ = allout-topic-encryption-bullet | 488 ;;;_ = allout-topic-encryption-bullet |
459 (defcustom allout-topic-encryption-bullet "~" | 489 (defcustom allout-topic-encryption-bullet "~" |
460 "*Bullet signifying encryption of the entry's body." | 490 "*Bullet signifying encryption of the entry's body." |
461 :type '(choice (const nil) string) | 491 :type '(choice (const nil) string) |
462 :group 'allout) | 492 :version "22.0" |
493 :group 'allout-encryption) | |
463 ;;;_ = allout-passphrase-verifier-handling | 494 ;;;_ = allout-passphrase-verifier-handling |
464 (defcustom allout-passphrase-verifier-handling t | 495 (defcustom allout-passphrase-verifier-handling t |
465 "*Enable use of symmetric encryption passphrase verifier if non-nil. | 496 "*Enable use of symmetric encryption passphrase verifier if non-nil. |
466 | 497 |
467 See the docstring for the `allout-enable-file-variable-adjustment' | 498 See the docstring for the `allout-enable-file-variable-adjustment' |
468 variable for details about allout ajustment of file variables." | 499 variable for details about allout ajustment of file variables." |
469 :type 'boolean | 500 :type 'boolean |
470 :group 'allout) | 501 :version "22.0" |
502 :group 'allout-encryption) | |
471 (make-variable-buffer-local 'allout-passphrase-verifier-handling) | 503 (make-variable-buffer-local 'allout-passphrase-verifier-handling) |
472 ;;;_ = allout-passphrase-hint-handling | 504 ;;;_ = allout-passphrase-hint-handling |
473 (defcustom allout-passphrase-hint-handling 'always | 505 (defcustom allout-passphrase-hint-handling 'always |
474 "*Dictate outline encryption passphrase reminder handling: | 506 "*Dictate outline encryption passphrase reminder handling: |
475 | 507 |
480 See the docstring for the `allout-enable-file-variable-adjustment' | 512 See the docstring for the `allout-enable-file-variable-adjustment' |
481 variable for details about allout ajustment of file variables." | 513 variable for details about allout ajustment of file variables." |
482 :type '(choice (const always) | 514 :type '(choice (const always) |
483 (const needed) | 515 (const needed) |
484 (const disabled)) | 516 (const disabled)) |
485 :group 'allout) | 517 :version "22.0" |
518 :group 'allout-encryption) | |
486 (make-variable-buffer-local 'allout-passphrase-hint-handling) | 519 (make-variable-buffer-local 'allout-passphrase-hint-handling) |
487 ;;;_ = allout-encrypt-unencrypted-on-saves | 520 ;;;_ = allout-encrypt-unencrypted-on-saves |
488 (defcustom allout-encrypt-unencrypted-on-saves t | 521 (defcustom allout-encrypt-unencrypted-on-saves t |
489 "*When saving, should topics pending encryption be encrypted? | 522 "*When saving, should topics pending encryption be encrypted? |
490 | 523 |
512 disable auto-saves for that file." | 545 disable auto-saves for that file." |
513 | 546 |
514 :type '(choice (const :tag "Yes" t) | 547 :type '(choice (const :tag "Yes" t) |
515 (const :tag "All except current topic" except-current) | 548 (const :tag "All except current topic" except-current) |
516 (const :tag "No" nil)) | 549 (const :tag "No" nil)) |
517 :group 'allout) | 550 :version "22.0" |
551 :group 'allout-encryption) | |
518 (make-variable-buffer-local 'allout-encrypt-unencrypted-on-saves) | 552 (make-variable-buffer-local 'allout-encrypt-unencrypted-on-saves) |
519 | 553 |
520 ;;;_ + Miscellaneous customization | 554 ;;;_ + Miscellaneous customization |
521 | 555 |
522 ;;;_ = allout-command-prefix | 556 ;;;_ = allout-command-prefix |
583 relevant mostly for use with indented-text-mode, or other situations | 617 relevant mostly for use with indented-text-mode, or other situations |
584 where auto-fill occurs." | 618 where auto-fill occurs." |
585 :type 'boolean | 619 :type 'boolean |
586 :group 'allout) | 620 :group 'allout) |
587 (make-variable-buffer-local 'allout-use-hanging-indents) | 621 (make-variable-buffer-local 'allout-use-hanging-indents) |
622 ;;;###autoload | |
623 (put 'allout-use-hanging-indents 'safe-local-variable | |
624 (lambda (x) (member x '(t nil)))) | |
588 | 625 |
589 ;;;_ = allout-reindent-bodies | 626 ;;;_ = allout-reindent-bodies |
590 (defcustom allout-reindent-bodies (if allout-use-hanging-indents | 627 (defcustom allout-reindent-bodies (if allout-use-hanging-indents |
591 'text) | 628 'text) |
592 "*Non-nil enables auto-adjust of topic body hanging indent with depth shifts. | 629 "*Non-nil enables auto-adjust of topic body hanging indent with depth shifts. |
600 `force' enables reindent whether or not `comment-start' is set." | 637 `force' enables reindent whether or not `comment-start' is set." |
601 :type '(choice (const nil) (const t) (const text) (const force)) | 638 :type '(choice (const nil) (const t) (const text) (const force)) |
602 :group 'allout) | 639 :group 'allout) |
603 | 640 |
604 (make-variable-buffer-local 'allout-reindent-bodies) | 641 (make-variable-buffer-local 'allout-reindent-bodies) |
642 ;;;###autoload | |
643 (put 'allout-reindent-bodies 'safe-local-variable | |
644 (lambda (x) (member x '(nil t text force)))) | |
605 | 645 |
606 ;;;_ = allout-enable-file-variable-adjustment | 646 ;;;_ = allout-enable-file-variable-adjustment |
607 (defcustom allout-enable-file-variable-adjustment t | 647 (defcustom allout-enable-file-variable-adjustment t |
608 "*If non-nil, some allout outline actions edit Emacs local file var text. | 648 "*If non-nil, some allout outline actions edit Emacs local file var text. |
609 | 649 |
665 `allout-default-layout' describes the specification format. | 705 `allout-default-layout' describes the specification format. |
666 `allout-layout' can additionally have the value `t', in which | 706 `allout-layout' can additionally have the value `t', in which |
667 case the value of `allout-default-layout' is used.") | 707 case the value of `allout-default-layout' is used.") |
668 (make-variable-buffer-local 'allout-layout) | 708 (make-variable-buffer-local 'allout-layout) |
669 ;;;###autoload | 709 ;;;###autoload |
670 (put 'allout-layout 'safe-local-variable (lambda (x) (or (listp x) (symbolp x)))) | 710 (put 'allout-layout 'safe-local-variable |
711 (lambda (x) (or (numberp x) (listp x) (integerp x) | |
712 (member x '(: * + -))))) | |
671 | 713 |
672 ;;;_ : Topic header format | 714 ;;;_ : Topic header format |
673 ;;;_ = allout-regexp | 715 ;;;_ = allout-regexp |
674 (defvar allout-regexp "" | 716 (defvar allout-regexp "" |
675 "*Regular expression to match the beginning of a heading line. | 717 "*Regular expression to match the beginning of a heading line. |
1051 | 1093 |
1052 The verifier string is retained as an Emacs file variable, as well as in | 1094 The verifier string is retained as an Emacs file variable, as well as in |
1053 the emacs buffer state, if file variable adjustments are enabled. See | 1095 the emacs buffer state, if file variable adjustments are enabled. See |
1054 `allout-enable-file-variable-adjustment' for details about that.") | 1096 `allout-enable-file-variable-adjustment' for details about that.") |
1055 (make-variable-buffer-local 'allout-passphrase-verifier-string) | 1097 (make-variable-buffer-local 'allout-passphrase-verifier-string) |
1098 ;;;###autoload | |
1056 (put 'allout-passphrase-verifier-string 'safe-local-variable 'stringp) | 1099 (put 'allout-passphrase-verifier-string 'safe-local-variable 'stringp) |
1057 ;;;_ = allout-passphrase-hint-string | 1100 ;;;_ = allout-passphrase-hint-string |
1058 (defvar allout-passphrase-hint-string "" | 1101 (defvar allout-passphrase-hint-string "" |
1059 "Variable used to retain reminder string for file's encryption passphrase. | 1102 "Variable used to retain reminder string for file's encryption passphrase. |
1060 | 1103 |
1063 | 1106 |
1064 The hint is retained as an Emacs file variable, as well as in the emacs buffer | 1107 The hint is retained as an Emacs file variable, as well as in the emacs buffer |
1065 state, if file variable adjustments are enabled. See | 1108 state, if file variable adjustments are enabled. See |
1066 `allout-enable-file-variable-adjustment' for details about that.") | 1109 `allout-enable-file-variable-adjustment' for details about that.") |
1067 (make-variable-buffer-local 'allout-passphrase-hint-string) | 1110 (make-variable-buffer-local 'allout-passphrase-hint-string) |
1111 (setq-default allout-passphrase-hint-string "") | |
1112 ;;;###autoload | |
1068 (put 'allout-passphrase-hint-string 'safe-local-variable 'stringp) | 1113 (put 'allout-passphrase-hint-string 'safe-local-variable 'stringp) |
1069 (setq-default allout-passphrase-hint-string "") | |
1070 ;;;_ = allout-after-save-decrypt | 1114 ;;;_ = allout-after-save-decrypt |
1071 (defvar allout-after-save-decrypt nil | 1115 (defvar allout-after-save-decrypt nil |
1072 "Internal variable, is nil or has the value of two points: | 1116 "Internal variable, is nil or has the value of two points: |
1073 | 1117 |
1074 - the location of a topic to be decrypted after saving is done | 1118 - the location of a topic to be decrypted after saving is done |
1571 | 1615 |
1572 (progn ; V19, and maybe lucid and | 1616 (progn ; V19, and maybe lucid and |
1573 ; epoch, minor-mode key bindings: | 1617 ; epoch, minor-mode key bindings: |
1574 (setq allout-mode-map | 1618 (setq allout-mode-map |
1575 (produce-allout-mode-map allout-keybindings-list)) | 1619 (produce-allout-mode-map allout-keybindings-list)) |
1620 (substitute-key-definition 'beginning-of-line | |
1621 'move-beginning-of-line | |
1622 allout-mode-map global-map) | |
1623 (substitute-key-definition 'end-of-line | |
1624 'move-end-of-line | |
1625 allout-mode-map global-map) | |
1576 (produce-allout-mode-menubar-entries) | 1626 (produce-allout-mode-menubar-entries) |
1577 (fset 'allout-mode-map allout-mode-map) | 1627 (fset 'allout-mode-map allout-mode-map) |
1578 ; Include on minor-mode-map-alist, | 1628 ; Include on minor-mode-map-alist, |
1579 ; if not already there: | 1629 ; if not already there: |
1580 (if (not (member '(allout-mode . allout-mode-map) | 1630 (if (not (member '(allout-mode . allout-mode-map) |
5776 (interactive "p") | 5826 (interactive "p") |
5777 (or arg (setq arg 1)) | 5827 (or arg (setq arg 1)) |
5778 (if (/= arg 1) | 5828 (if (/= arg 1) |
5779 (condition-case nil (line-move (1- arg)) (error nil))) | 5829 (condition-case nil (line-move (1- arg)) (error nil))) |
5780 | 5830 |
5781 (let ((orig (point))) | 5831 ;; Move to beginning-of-line, ignoring fields and invisibles. |
5782 ;; Move to beginning-of-line, ignoring fields and invisibles. | 5832 (skip-chars-backward "^\n") |
5783 (skip-chars-backward "^\n") | 5833 (while (and (not (bobp)) (line-move-invisible-p (1- (point)))) |
5784 (while (and (not (bobp)) (line-move-invisible-p (1- (point)))) | 5834 (goto-char (if (featurep 'xemacs) |
5785 (goto-char (if (featurep 'xemacs) | 5835 (previous-property-change (point)) |
5786 (previous-property-change (point)) | 5836 (previous-char-property-change (point)))) |
5787 (previous-char-property-change (point)))) | 5837 (skip-chars-backward "^\n")) |
5788 (skip-chars-backward "^\n")) | 5838 (vertical-motion 0)) |
5789 (vertical-motion 0) | |
5790 (if (/= orig (point)) | |
5791 (goto-char orig)))) | |
5792 ) | 5839 ) |
5793 ;;;_ > move-end-of-line if necessary - older emacs, xemacs | 5840 ;;;_ > move-end-of-line if necessary - older emacs, xemacs |
5794 (if (not (fboundp 'move-end-of-line)) | 5841 (if (not (fboundp 'move-end-of-line)) |
5795 (defun move-end-of-line (arg) | 5842 (defun move-end-of-line (arg) |
5796 "Move point to end of current line as displayed. | 5843 "Move point to end of current line as displayed. |
5800 With argument ARG not nil or 1, move forward ARG - 1 lines first. | 5847 With argument ARG not nil or 1, move forward ARG - 1 lines first. |
5801 If point reaches the beginning or end of buffer, it stops there. | 5848 If point reaches the beginning or end of buffer, it stops there. |
5802 To ignore intangibility, bind `inhibit-point-motion-hooks' to t." | 5849 To ignore intangibility, bind `inhibit-point-motion-hooks' to t." |
5803 (interactive "p") | 5850 (interactive "p") |
5804 (or arg (setq arg 1)) | 5851 (or arg (setq arg 1)) |
5805 (let ((orig (point)) | 5852 (let (done) |
5806 done) | |
5807 (while (not done) | 5853 (while (not done) |
5808 (let ((newpos | 5854 (let ((newpos |
5809 (save-excursion | 5855 (save-excursion |
5810 (let ((goal-column 0)) | 5856 (let ((goal-column 0)) |
5811 (and (condition-case nil | 5857 (and (condition-case nil |
5812 (or (line-move arg) t) | 5858 (or (line-move arg) t) |
5813 (error nil)) | 5859 (error nil)) |
5814 (not (bobp)) | 5860 (not (bobp)) |
5815 (progn | 5861 (progn |
5816 (while (and (not (bobp)) (line-move-invisible-p (1- (point)))) | 5862 (while (and (not (bobp)) |
5817 (goto-char (previous-char-property-change (point)))) | 5863 (line-move-invisible-p (1- (point)))) |
5864 (goto-char | |
5865 (previous-char-property-change (point)))) | |
5818 (backward-char 1))) | 5866 (backward-char 1))) |
5819 (point))))) | 5867 (point))))) |
5820 (goto-char newpos) | 5868 (goto-char newpos) |
5821 (if (and (> (point) newpos) | 5869 (if (and (> (point) newpos) |
5822 (eq (preceding-char) ?\n)) | 5870 (eq (preceding-char) ?\n)) |
5825 (not (eq (following-char) ?\n))) | 5873 (not (eq (following-char) ?\n))) |
5826 ;; If we skipped something intangible | 5874 ;; If we skipped something intangible |
5827 ;; and now we're not really at eol, | 5875 ;; and now we're not really at eol, |
5828 ;; keep going. | 5876 ;; keep going. |
5829 (setq arg 1) | 5877 (setq arg 1) |
5830 (setq done t))))) | 5878 (setq done t))))))) |
5831 (if (/= orig (point)) | |
5832 (goto-char orig)))) | |
5833 ) | 5879 ) |
5834 ;;;_ > line-move-invisible-p if necessary | 5880 ;;;_ > line-move-invisible-p if necessary |
5835 (if (not (fboundp 'line-move-invisible-p)) | 5881 (if (not (fboundp 'line-move-invisible-p)) |
5836 (defun line-move-invisible-p (pos) | 5882 (defun line-move-invisible-p (pos) |
5837 "Return non-nil if the character after POS is currently invisible." | 5883 "Return non-nil if the character after POS is currently invisible." |