-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinfo+.el
executable file
·5203 lines (4880 loc) · 278 KB
/
info+.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;;; info+.el --- Extensions to `info.el'. -*- coding:utf-8 -*-
;;
;; Filename: info+.el
;; Description: Extensions to `info.el'.
;; Author: Drew Adams
;; Maintainer: Drew Adams (concat "drew.adams" "@" "oracle" ".com")
;; Copyright (C) 1996-2018, Drew Adams, all rights reserved.
;; Created: Tue Sep 12 16:30:11 1995
;; Version: 0
;; Package-Requires: ()
;; Last-Updated: Thu Jun 14 13:33:53 2018 (-0700)
;; By: dradams
;; Update #: 6370
;; URL: https://www.emacswiki.org/emacs/download/info%2b.el
;; Doc URL: https://www.emacswiki.org/emacs/InfoPlus
;; Keywords: help, docs, internal
;; Compatibility: GNU Emacs: 23.x, 24.x, 25.x, 26.x
;;
;; Features that might be required by this library:
;;
;; `apropos', `apropos+', `avoid', `backquote', `bookmark',
;; `bookmark+', `bookmark+-1', `bookmark+-bmu', `bookmark+-key',
;; `bookmark+-lit', `button', `cl', `cmds-menu', `col-highlight',
;; `crosshairs', `fit-frame', `font-lock', `font-lock+',
;; `frame-fns', `help+', `help-fns', `help-fns+', `help-macro',
;; `help-macro+', `help-mode', `hl-line', `hl-line+', `info',
;; `info+', `kmacro', `menu-bar', `menu-bar+', `misc-cmds',
;; `misc-fns', `naked', `pp', `pp+', `second-sel', `strings',
;; `syntax', `thingatpt', `thingatpt+', `view', `vline',
;; `w32browser-dlgopen', `wid-edit', `wid-edit+'.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Commentary:
;;
;; Extensions to `info.el'.
;;
;; More description below.
;;
;; If you use Emacs 20, 21, or 22 then use library `info+20.el'
;; instead of `info+.el'.
;;(@> "Index")
;;
;; Index
;; -----
;;
;; If you have library `linkd.el', load `linkd.el' and turn on
;; `linkd-mode' now. It lets you easily navigate around the sections
;; of this doc. Linkd mode will highlight this Index, as well as the
;; cross-references and section headings throughout this file. You
;; can get `linkd.el' here:
;; https://www.emacswiki.org/emacs/download/linkd.el.
;;
;; (@> "Things Defined Here")
;; (@> "Documentation")
;; (@> "Macros")
;; (@> "Faces (Customizable)")
;; (@> "User Options (Customizable)")
;; (@> "Internal Variables")
;; (@> "New Commands")
;; (@> "Replacements for Existing Functions")
;; (@> "Non-Interactive Functions")
;;(@* "Things Defined Here")
;;
;; Things Defined Here
;; -------------------
;;
;; Commands defined here:
;;
;; `Info-breadcrumbs-in-mode-line-mode',
;; `Info-change-visited-status' (Emacs 24+),
;; `Info-describe-bookmark' (Emacs 24.2+),
;; `Info-follow-nearest-node-new-window', `Info-goto-node-web',
;; `Info-history-clear', `Info-make-node-unvisited', `info-manual',
;; `Info-merge-subnodes',
;; `Info-mouse-follow-nearest-node-new-window',
;; `Info-outline-demote', `Info-outline-promote',
;; `Info-persist-history-mode' (Emacs 24.4+),
;; `Info-save-current-node', `Info-set-breadcrumbs-depth',
;; `Info-set-face-for-bookmarked-xref' (Emacs 24.2+),
;; `Info-toggle-breadcrumbs-in-header',
;; `Info-toggle-fontify-angle-bracketed',
;; `Info-toggle-fontify-bookmarked-xrefs' (Emacs 24.2+),
;; `Info-toggle-fontify-emphasis',
;; `Info-toggle-fontify-quotations',
;; `Info-toggle-fontify-single-quote',
;; `Info-toggle-node-access-invokes-bookmark' (Emacs 24.4+),
;; `Info-toc-outline', `Info-toc-outline-refontify-region',
;; `Info-url-for-node', `Info-virtual-book'.
;;
;; Faces defined here:
;;
;; `info-command-ref-item', `info-constant-ref-item',
;; `info-double-quoted-name', `info-emphasis', `info-file',
;; `info-function-ref-item',`info-macro-ref-item', `info-menu',
;; `info-node', `info-quoted-name', `info-reference-item',
;; `info-single-quote', `info-special-form-ref-item',
;; `info-string', `info-syntax-class-item',
;; `info-user-option-ref-item', `info-variable-ref-item',
;; `info-xref-bookmarked' (Emacs 24.2+).
;;
;; Options (user variables) defined here:
;;
;; `Info-bookmarked-node-xref-faces' (Emacs 24.2+),
;; `Info-breadcrumbs-in-header-flag',
;; `Info-display-node-header-fn', `Info-emphasis-regexp',
;; `Info-fit-frame-flag', `Info-fontify-angle-bracketed-flag',
;; `Info-fontify-bookmarked-xrefs-flag' (Emacs 24.2+),
;; `Info-fontify-emphasis-flag', `Info-fontify-quotations-flag',
;; `Info-fontify-reference-items-flag',
;; `Info-fontify-single-quote-flag',
;; `Info-node-access-invokes-bookmark-flag' (Emacs 24.4+),
;; `Info-saved-history-file' (Emacs 24.4+), `Info-saved-nodes',
;; `Info-subtree-separator', `Info-toc-outline-no-redundancy-flag'.
;;
;; Macros defined here:
;;
;; `info-user-error'.
;;
;; Non-interactive functions defined here:
;;
;; `Info-bookmark-for-node', `Info-bookmark-name-at-point',
;; `Info-bookmark-named-at-point', `Info-bookmark-name-for-node',
;; `Info-display-node-default-header', `info-fontify-quotations',
;; `info-fontify-reference-items',
;; `Info-insert-breadcrumbs-in-mode-line', `Info-isearch-search-p',
;; `Info-node-name-at-point', `Info-read-bookmarked-node-name',
;; `Info-restore-history-list' (Emacs 24.4+),
;; `Info-save-history-list' (Emacs 24.4+), `Info-search-beg',
;; `Info-search-end', `Info-toc-outline-find-node',
;; `Info-toc-outline-refontify-links'.
;;
;; Internal variables defined here:
;;
;; `Info-breadcrumbs-depth-internal', `info-fontify-emphasis',
;; `Info-merged-map', `Info-mode-syntax-table',
;; `info-quotation-regexp', `info-quoted+<>-regexp',
;; `Info-toc-outline-map'.
;;
;;
;; ***** NOTE: The following standard faces defined in `info.el'
;; have been REDEFINED HERE:
;;
;; `info-title-1', `info-title-2', `info-title-3', `info-title-4'.
;;
;;
;; ***** NOTE: The following standard functions defined in `info.el'
;; have been REDEFINED or ADVISED HERE:
;;
;; `info-apropos' - Apropos, not literal string, match by default.
;; Use other window if not already in Info.
;; `Info-apropos-matches' - Added optional arg REGEXP-P.
;; `info-display-manual' - Use completion to input manual name.
;; `Info-find-emacs-command-nodes' - Added arg MSGP and message.
;; `Info-find-file' - Handle virtual books.
;; `Info-find-node', `Info-find-node-2' -
;; Call `fit-frame' if `Info-fit-frame-flag'.
;; Added optional arg NOMSG.
;; `Info-fontify-node' -
;; 1. Show breadcrumbs in header line and/or mode line.
;; 2. File name in face `info-file'.
;; 3. Node names in face `info-node'.
;; 4. Menu items in face `info-menu'.
;; 5. Only 5th and 9th menu items have their `*' colored.
;; 6. Notes in face `info-xref'.
;; 7. If `Info-fontify-emphasis-flag', then fontify _..._.
;; 8. If `Info-fontify-quotations-flag', then fontify ‘...’ or
;; `...' in face `info-quoted-name', “...” in face
;; `info-double-quoted-name', and "..." in face `info-string'.
;; 9. If `Info-fontify-angle-bracketed-flag' and
;; `Info-fontify-quotations-flag' then fontify <...> in face
;; `info-quoted-name'.
;; 10. If `Info-fontify-single-quote-flag' and
;; `Info-fontify-quotations-flag', then fontify ' in face
;; `info-single-quote'.
;; `Info-goto-emacs-command-node' -
;; 1. Uses `completing-read' in interactive spec, with,
;; as default, `symbol-nearest-point'.
;; 2. Added optional arg MSGP.
;; 3. Message if single node found.
;; 4. Returns `num-matches' if found; nil if not.
;; `Info-goto-emacs-key-command-node' -
;; 1. Added optional arg MSGP.
;; 2. If key's command not found, then `Info-search's for key
;; sequence in text and displays message about repeating.
;; `Info-goto-node' - Respect option
;; `Info-node-access-invokes-bookmark-flag' (Emacs 24.4+).
;; `Info-history' - A prefix arg clears the history.
;; `Info-insert-dir' -
;; Added optional arg NOMSG to inhibit showing progress msgs.
;; `Info-mode' - Doc string shows all bindings.
;; `Info-read-node-name' - Added optional arg DEFAULT.
;; `Info-search' - 1. Fits frame.
;; 2. Highlights found regexp if `search-highlight'.
;; `Info-set-mode-line' - Handles breadcrumbs in the mode line.
;; `Info-mouse-follow-nearest-node' - With prefix arg, show node in
;; a new Info buffer.
;; `Info-isearch-search' - Respect restriction to active region.
;; `Info-isearch-wrap' - Respect restriction to active region.
;;
;;
;; ***** NOTE: The following standard function
;; has been REDEFINED HERE:
;;
;; `outline-invisible-p' - Fixes Emacs bug #28080.
;;(@* "Documentation")
;;
;; Documentation
;; -------------
;;
;; Library `info+.el' extends the standard Emacs library `info.el' in
;; several ways. It provides:
;;
;; * Association of additional information (metadata) with Info
;; nodes. You do this by bookmarking the nodes. Library Bookmark+
;; gives you the following features in combination with `info+.el'.
;; In many ways an Info node and its default bookmark can be
;; thought of as the same animal.
;;
;; - Rich node metadata. In particular, you can tag nodes with any
;; number of arbitrary tags, to classify them in different and
;; overlapping ways. You can also annotate them (in Org mode, by
;; default).
;;
;; - You can use `C-h C-b' to show the metadata for a (bookmarked)
;; node. This is all of the associated bookmark information,
;; including the annotation and tags for that node and the number
;; of times you have visited it. If invoked with point on a
;; link, the targeted node is described; otherwise, you are
;; prompted for the node name.
;;
;; - Links for bookmarked nodes can have a different face, to let
;; you know that those nodes have associated metadata. Option
;; `Info-fontify-bookmarked-xrefs-flag' controls whether this is
;; done.
;;
;; - The face for this is `info-xref-bookmarked' by default, but
;; you can set the face to use for a given Info bookmark using
;; `C-x f' (command `Info-set-face-for-bookmarked-xref'). This
;; gives you an easy way to classify nodes and show the class of
;; a node by its links. Uses faces to make clear which nodes are
;; most important to you, or which are related to this or that
;; general topic.
;;
;; - If option `Info-node-access-invokes-bookmark-flag' is non-nil
;; then going to a bookmarked Info node invokes its bookmark, so
;; that the node metadata (such as number of visits) gets
;; updated. Command `Info-toggle-node-access-invokes-bookmark'
;; toggles the option value.
;;
;; - You can automatically bookmark nodes you visit, by enabling
;; mode `bmkp-info-auto-bookmark-mode'. Toggle the mode off
;; anytime you do not want to record Info visits.
;;
;; - In the bookmark-list display (from `C-x r l') you can sort
;; bookmarks by the time of last visit (`s d') or by the number
;; of visits (`s v'). This gives you an easy way to see which
;; parts of which Info manuals you have visited most recently and
;; how much you have visited them.
;;
;; * Editable, outline-enabled tables of contents (TOCs). Command
;; `Info-toc-outline' (bound to `O') opens a separate Info buffer
;; showing the table of contents (TOC). This is similar to the
;; standard command `Info-toc' (bound to `T'), but the buffer is
;; cloned from the manual and is in `outline-minor-mode'. Also,
;; there is no redundancy, by default: each TOC entry is listed
;; only once, not multiple times. (This is controlled by option
;; `Info-toc-outline-no-redundancy-flag'.)
;;
;; You can have any number of such TOCs, for the same manual or for
;; different manuals.
;;
;; Outline minor mode lets you hide and show, and promote and
;; demote, various parts of the TOC tree for a manual. And since
;; the TOC is editable you can make other changes to it: sort parts
;; of it, delete parts of it, duplicate parts of it, move parts
;; aroundin an ad hoc way, and so on. Info+ makes the outlining
;; commands behave, so that hidden Info text (e.g. markup text such
;; as `*note'...`::' surrounding links) is kept hidden.
;;
;; Especially when combined with `Info-persist-history-mode',
;; command `Info-change-visited-status' (`C-x DEL', see below), and
;; the Info+ bookmarking enhancements (e.g., special link
;; highlighting and persistently tracking the number of visits per
;; node), `Info-toc-outline' gives you a way to organize access and
;; visibility of a manual's nodes, to reflect how you use it.
;;
;; * Additional, finer-grained Info highlighting. This can make a
;; big difference in readability.
;;
;; - Quoted names, like this: `name-stands-out' or
;; `name-stands-out', and strings, like this: "string-stands-out"
;; are highlighted if `Info-fontify-quotations-flag' is
;; non-`nil'.
;;
;; - Angle-bracketed names, like this: <tab>, are highlighted if
;; `Info-fontify-angle-bracketed-flag' and
;; `Info-fontify-quotations-flag' are non-`nil'.
;;
;; - Isolated single quotes, like this: 'foobar, are highlighted if
;; `Info-fontify-single-quote-flag' and
;; `Info-fontify-quotations-flag' are non-`nil'.
;;
;; - Emphasized text, that is, text enclosed in underscore
;; characters, like this: _this is emphasized text_, is
;; highlighted if `Info-fontify-emphasis-flag' is non-`nil'.
;; (But if internal variable `info-fontify-emphasis' is `nil'
;; then there is no such highlighting, and that option has no
;; effect.)
;;
;; - In the Emacs Lisp manual, reference items are highlighted, so
;; they stand out. This means: constants, commands, functions,
;; macros, special forms, syntax classes, user options, and other
;; variables.
;;
;; Be aware that such highlighting is not 100% foolproof.
;; Especially for a manual such as Emacs or Elisp, where arbitrary
;; keys and characters can be present anywhere, the highlighting
;; can be thrown off.
;;
;; You can toggle each of the `Info-fontify-*-flag' options from
;; the `Info' menu or using an `Info-toggle-fontify-*' command.
;; For example, command `Info-toggle-fontify-emphasis' toggles
;; option `Info-fontify-emphasis-flag'.
;;
;; * You can show breadcrumbs in the mode line or the header line, or
;; both. See where you are in the Info hierarchy, and access higher
;; nodes directly.
;;
;; - In the mode line. Turned on by default.
;;
;; See ‘Toggle Breadcrumbs’ in the `mouse-3' mode-line menu and
;; `Toggle Breadcrumbs in Mode Line' in the `Info' menu (in the
;; menu-bar or in the minor-mode indicator). You can customize
;; option `Info-breadcrumbs-in-mode-line-mode' if you want to
;; turn this off by default. (Available for Emacs 23+ only.)
;;
;; - In the header (just below the header line).
;;
;; (I also added this to vanilla Emacs 23.) This is OFF by
;; default in `Info+'. See `Toggle Breadcrumbs in Header Line'
;; in `Info' menu. Be aware that unlike breadcrumbs in the mode
;; line, this can occasionally throw off the destination accuracy
;; of cross references and searches slightly.
;;
;; * Some of the commands defined here:
;;
;; - `Info-virtual-book' (bound to `v') – Open a virtual Info
;; manual of saved nodes from any number of manuals. The nodes
;; are those saved in option `Info-virtual-book'. With `C-u',
;; bookmarked Info nodes are also included. (If you use Icicles,
;; see also `icicle-Info-virtual-book'.)
;;
;; - `Info-persist-history-mode' - Enabling this minor mode saves
;; the list of your visited Info nodes between Emacs sessions.
;; Together with command `Info-history' (bound to `L' by
;; default), this gives you a persistent virtual manual of the
;; nodes you have visited in the past. If the mode is enabled
;; then the list of visited nodes is saved to the file named by
;; option `Info-saved-history-file' when you quit Emacs (not
;; Info) or when you kill an Info buffer.
;;
;; (If you also use library Bookmark+ then you can bookmark Info
;; nodes, including automatically. This records how many times
;; you have visited each node and when you last did so.)
;;
;; - `Info-change-visited-status' (bound to `C-x DEL') - Toggle or
;; set the visited status of the node at point or the nodes in
;; the active region. Useful if you use
;; `Info-fontify-visited-nodes' to show you which nodes you have
;; visited. No prefix arg: toggle. Non-negative prefix arg: set
;; to visited. Negative prefix arg: set to unvisited.
;;
;; - `Info-save-current-node' (bound to `.') – Save the name of the
;; current node to list `Info-saved-nodes', for use by `v'
;; (`Info-virtual-book').
;;
;; - `Info-merge-subnodes' – Integrate the current Info node with
;; its subnodes (the nodes in its Menu), perhaps recursively.
;;
;; Use `Info-merge-subnodes' to extract a self-contained report
;; (possibly the whole manual) from an Info manual. The report
;; is itself an Info buffer, with hyperlinks and normal Info
;; behavior.
;;
;; There are various prefix-argument possibilities that govern
;; just how subnodes are treated (recursively or not, for
;; instance). There are a few user options that let you
;; customize the report appearance.
;;
;;
;; The following bindings are made here for Info-mode:
;;
;; `?' `describe-mode' (replaces `Info-summary')
;; `+' `Info-merge-subnodes'
;; `.' `Info-save-current-node'
;; `a' `info-apropos'
;; `G' `Info-goto-node-web'
;; `O' `Info-toc-outline'
;; `v' `Info-virtual-book'
;; `mouse-4' `Info-history-back'
;; `mouse-5' `Info-history-forward'
;; `S-down-mouse-2' `Info-mouse-follow-nearest-node-new-window'
;; `S-RET' `Info-follow-nearest-node-new-window'
;;
;; The following bindings are made here for merged Info buffers:
;;
;; `.' `beginning-of-buffer'
;; `b' `beginning-of-buffer'
;; `q' `quit-window'
;; `s' `nonincremental-re-search-forward'
;; `M-s' `nonincremental-re-search-forward'
;; `TAB' `Info-next-reference'
;; `ESC TAB' `Info-prev-reference'
;;
;; The global binding `C-h r' is changed from `info-emacs-manual' to
;; `info-manual', which behaves the same except if you use a prefix
;; arg. With a prefix arg you can open any manual, choosing either
;; from all installed manuals or from those that are already shown in
;; Info buffers.
;;
;; The following behavior defined in `info.el' has been changed:
;; "*info" has been removed from `same-window-buffer-names', so that
;; a separate window can be used if you so choose.
;;
;; Suggestion: Use a medium-dark background for Info. Try, for
;; example, setting the background to "LightSteelBlue" in your
;; `~/.emacs' file. You can do this as follows:
;;
;; (setq special-display-buffer-names
;; (cons '("*info*" (background-color . "LightSteelBlue"))
;; special-display-buffer-names))
;;
;; Alternatively, you can change the background value of
;; `special-display-frame-alist' and set `special-display-regexps' to
;; something matching "*info*":
;;
;; (setq special-display-frame-alist
;; (cons '(background-color . "LightSteelBlue")
;; special-display-frame-alist))
;; (setq special-display-regexps '("[ ]?[*][^*]+[*]"))
;;
;; If you do use a medium-dark background for Info, consider
;; customizing face to a lighter foreground color - I use "Yellow".
;;
;; Also, consider customizing face `link' to remove its underline
;; attribute.
;;
;; This file should be loaded after loading the standard GNU file
;; `info.el'. So, in your `~/.emacs' file, do this:
;; (eval-after-load "info" '(require 'info+))
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Change Log:
;;
;; 2018/06/14 dadams
;; Added: redefinitions of info-apropos, Info-apropos-matches.
;; bmkp-string-match-p - > string-match-p everywhere.
;; 2018/06/03 dadams
;; info-quotation-regexp, info-quoted+<>-regexp:
;; Use shy groups everywhere. [CHAR] -> CHAR, \\CHAR -> CHAR. Added equivalent rx sexps.
;; info-fontify-reference-items, Info-node-name-at-point: [\n] -> \n.
;; 2018/04/12 dadams
;; Info-read-node-name: Use Info-minibuffer-history, not Info-history, for completing-read.
;; Info-find-node(-2): Added arg STRICT-CASE, moving arg MSG to the end.
;; Info-find-node-2: Updated for Emacs 25+ - use filepos-to-bufferpos etc.
;; 2017/11/17 dadams
;; Info-TOC-outline stuff needs Info-virtual-nodes. Thx to Mike Fitzgerald.
;; http -> https everywhere.
;; 2017/11/09 dadams
;; info-quotation-regexp, info-quoted+<>-regexp: Added \\ to first alternative of each ... type, to exclude \ from it.
;; 2017/09/23 dadams
;; Info-url-for-node: Fix per TeXInfo manual - encode embedded hyphens etc.
;; 2017/08/30 dadams
;; Renamed: Info-refontify-toc-outline-region to Info-toc-outline-refontify-region.
;; 2017/08/28 dadams
;; Added: Info-refontify-toc-outline-region.
;; Info-refontify-toc-outline-region: Add Info-refontify-toc-outline-region to post-command-hook and bind to C-x M-l.
;; Info-toc-outline: Turn off Info-breadcrumbs-in-mode-line-mode in TOC buffer.
;; Info-change-visited-status: Typo: go-to-char.
;; 2017/08/25 dadams
;; Added: Info-change-visited-status. Bound to `C-x DEL (instead of Info-make-node-unvisited).
;; Info-node-name-at-point: Replace newline chars by spaces.
;; Info-toc-outline: Pass NEWNAME arg to clone-buffer, instead of explicitly renaming buffer.
;; 2017/08/22 dadams
;; Added: Info-toc-outline, Info-outline-demote, Info-outline-promote, Info-toc-outline-no-redundancy-flag,
;; Info-toc-outline-find-node, Info-toc-outline-map, Info-toc-outline-refontify-links, redefinition of
;; outline-invisible-p.
;; Bind Info-toc-outline to O.
;; Info-mode-menu: Added Editable Outline TOC item for Info-toc-outline.
;; Info-node-access-invokes-bookmark-flag, Info-toggle-node-access-invokes-bookmark, Info-goto-node advice:
;; Reserve for Emacs 24.4+.
;; 2017/08/10 dadams
;; Info-goto-node: Define it for Emacs 23 also.
;; Info-mode-menu: Add menu items for Info-toggle-node-access-invokes-bookmark, Info-toggle-fontify-bookmarked-xrefs.
;; 2017/08/07 dadams
;; Added: Info-make-node-unvisited. Bound to C-x DEL.
;; 2017/08/06 dadams
;; Added: Info-bookmarked-node-xref-faces, Info-read-bookmarked-node-name,
;; Info-set-face-for-bookmarked-xref.
;; Bind Info-set-face-for-bookmarked-xref to C-x f.
;; Info-describe-bookmark: If no bookmarked node name at point, use Info-read-bookmarked-node-name.
;; Info-bookmark-for-node: Made NODE arg optional - if nil then read the node name. Added LOCALP arg.
;; Info-fontify-node (Emacs 24.2+): Get face for bookmarked xref from bmkp-info-face tag value, if any.
;; Call Info-bookmark-for-node with arg LOCALP.
;; 2017/08/04 dadams
;; Info-describe-bookmark: Use Info-bookmark-name-at-point, not Info-node-name-at-point.
;; Info-goto-node: Do it only for Emacs 24.2+.
;; 2017/08/02 dadams
;; Info-goto-node: Define only if can soft-require bookmark+.el.
;; No-op if NODE is in Info-index-nodes.
;; Bind Info-node-access-invokes-bookmark-flag to nil while invoking bookmark.
;; Use bookmark--jump-via with ignore as display function, instead of bookmark-jump.
;; 2017/07/30 dadams
;; Added advice of Info-goto-node, to respect Info-node-access-invokes-bookmark-flag.
;; Removed redefinitions of Info-follow-nearest-node, Info-try-follow-nearest-node.
;; Replaced Info-follow-xref-bookmarks-flag by Info-node-access-invokes-bookmark-flag.
;; Replaced Info-toggle-follow-bookmarked-xrefs by Info-toggle-node-access-invokes-bookmark.
;; Info-bookmark-for-node, Info-bookmark-named-at-point: Include manual name in bookmark name.
;; 2017/07/29 dadams
;; Added: Info-fontify-bookmarked-xrefs-flag, face info-xref-bookmarked, Info-describe-bookmark,
;; Info-bookmark-for-node, Info-bookmark-name-at-point, Info-bookmark-named-at-point,
;; Info-bookmark-name-for-node, Info-toggle-fontify-bookmarked-xrefs,
;; Info-follow-xref-bookmarks-flag, Info-toggle-follow-bookmarked-xrefs.
;; Added (redefinition of): Info-follow-nearest-node, Info-try-follow-nearest-node.
;; Info-fontify-node (24.2+): Respect Info-fontify-bookmarked-xrefs-flag.
;; Bind Info-describe-bookmark to C-h C-b.
;; 2017/02/20 dadams
;; Added: Info-saved-history-file, Info-persist-history-mode, Info-save-history-list,
;; Info-restore-history-list.
;; Added autoload cookies: Info-breadcrumbs-in-mode-line-mode, Info-set-breadcrumbs-depth,
;; Info-search, Info-mouse-follow-nearest-node, info-display-manual.
;; 2017/01/09 dadams
;; Info-find-emacs-command-nodes: Updated to handle LINE-NUMBER (Emacs 24.5+).
;; 2016/12/13 dadams
;; Removed obsolete face aliases: info-menu-5, Info-title-*-face.
;; 2016/12/11 dadams
;; Added defvars for isearch(-regexp)-lax-whitespace for Emacs 24.1 and 24.2.
;; 2016/12/10 dadams
;; Use string as 3rd arg to make-obsolete.
;; 2016/10/31 dadams
;; info-quotation-regexp: Typo: misplaced curly double-quote. Thx to Don March.
;; 2016/07/02 dadams
;; Added: Info-toggle-fontify-emphasis, Info-breadcrumbs-in-header-flag, Info-emphasis-regexp,
;; Info-fontify-emphasis-flag, info-fontify-emphasis, and face info-emphasis.
;; Added some doc from Emacs Wiki to commentary.
;; Info-mode-menu:
;; Add toggle indicators. Moved toggle commands to Toggle submenu. Added Info-toggle-fontify-emphasis.
;; Info-fontify-node: Fontify emphasis.
;; 2015/09/14 dadams
;; info-double-quoted-name: Changed default colors.
;; 2015/09/13 dadams
;; Added face info-double-quoted-name.
;; info-quotation-regexp, info-quoted+<>-regexp: Added pattern for curly double-quotes (“...”).
;; Use shy groups for all parts.
;; info-fontify-quotations: Fontify text between curly double-quotes (“...”).
;; 2015/03/19 dadams
;; info-quoted+<>-regexp: Highlight <...> only if the first char is alphabetic.
;; 2015/03/06 dadams
;; Added: info-manual. Bound it globally to C-h r.
;; Info-fontify-node (Emacs 24.1.N+): Updated per Emacs 24.4: allow Info-fontify-maximum-menu-size to be t.
;; info-display-manual: Updated for Emacs 25: use info--manual-names with prefix arg.
;; 2015/02/28 dadams
;; Added: redefinition of Info-read-node-name.
;; Info-goto-node-web, Info-url-for-node: Use Info-current-node as default.
;; 2014/12/21 dadams
;; Added: Info-goto-node-web, Info-url-for-node.
;; Reorganized. Code cleanup. Improved commentary. Added index links.
;; Info-toggle-breadcrumbs-in-header-line: Added 3rd arg to make-obsolete.
;; Info-breadcrumbs-in-mode-line-mode: (default-value 'mode-line-format), not default-mode-line-format,
;; Info-display-node-default-header: (goto-char (point-min)), not (beginning-of-buffer).
;; Info-merge-subnodes: with-current-buffer, not save-excursion + set-buffer.
;; 2014/05/04 dadams
;; REMOVED SUPPORT for Emacs 20-22. That support is offered by a new library now: info+20.el.
;; Added coding:utf-8 declaration. Replace \x2018, \x2019 with literal ‘ and ’, since now Emacs 23+.
;; 2014/05/03 dadams
;; info-quotation-regexp, info-quoted+<>-regexp: Handle also curly single quotes (Emacs 24.4+).
;; Removed double * and moved openers outside \(...\) group.
;; info-fontify-quotations: Handle also curly single quotes (Emacs 24.4+).
;; 2014/03/04 dadams
;; Renamed Info-toggle-breadcrumbs-in-header-line to Info-toggle-breadcrumbs-in-header.
;; Declared old name obsolete.
;; 2014/03/02 dadams
;; Info-find-file: Go to directory if no previous file (per Emacs 24.4+).
;; Info-find-node-2 (Emacs > 22): Go to Top node at end, if no history.
;; 2013/10/17 dadams
;; Added: Info-search-beg, Info-search-end, Info-isearch-search-p.
;; Added redefinition: Info-isearch-wrap, Info-isearch-search.
;; Info-display-node-default-header, Info-merge-subnodes: Renamed node-name to infop-node-name.
;; 2013/03/17 dadams
;; Added: Info-history-clear, macro info-user-error (and font-lock it). Advised: Info-history.
;; Use info-user-error instead of error, where appropriate.
;; 2013/02/26 dadams
;; Info-mode-menu and Info-mode doc string: Removed Info-edit, Info-enable-edit (now obsolete).
;; 2013/02/09 dadams
;; Info-read-node-name-1: Removed Emacs 23+ redefinition.
;; 2013/02/03 dadams
;; Added: Info-fontify-angle-bracketed-flag, Info-toggle-fontify-angle-bracketed,
;; Info-toggle-fontify-quotations, Info-toggle-fontify-single-quote, info-quoted+<>-regexp.
;; info-fontify-quotations: Fixed case for Info-toggle-fontify-single-quote = nil.
;; Handle also Info-fontify-angle-bracketed-flag.
;; Added Info-fontify-*-flag to Info menu (so menu bar and C-mouse-3).
;; 2012/09/24 dadams
;; Info-search. Info-mode: Applied latest Emacs 24 updates by Juri (from 2012-09-12).
;; 2012/08/25 dadams
;; Info-fontify-node: Hide any empty lines at end of node (fixes bug #12272).
;; 2012/08/24 dadams
;; info-fontify-reference-items: Fontify parameters on continuation lines also.
;; Info-fontify-node: Juri's fix for Emacs bug #12187.
;; Reverted Juri's change from 08/20, since Juri fixed it elsewhere afterward.
;; 2012/08/21 dadams
;; Call tap-put-thing-at-point-props after load thingatpt+.el.
;; 2012/08/20 dadams
;; Applied Juri's fix for Emacs bug #12230:
;; Added: Info-file-attributes.
;; Info-find-file: Clear caches of modified Info files.
;; 2012/08/18 dadams
;; Invoke tap-define-aliases-wo-prefix if thingatpt+.el is loaded.
;; 2012/08/12 dadams
;; Added: info-constant-ref-item (face).
;; info-fontify-reference-items: Handle constants, using face info-constant-ref-item.
;; Info-toggle-breadcrumbs-in-header-line, Info-save-current-node: Added MSGP arg.
;; 2012/08/10 dadams
;; Info-search: Use latest Emacs 24 msg: _end of node_, not _initial node_.
;; 2012/08/09 dadams
;; Info-fontify-node: Updated guards for Emacs 24 versions.
;; 2012/07/28 dadams
;; Info-fontify-node: Typo on guard: (/= 1 emacs-minor-version) should have been =, not /=.
;; 2012/07/17 dadams
;; Added redefinition of Info-fontify-node for post-Emacs 24.1.
;; Added redefinitions of Info-insert-dir, Info(-directory)-find-node, with args controlling msgs.
;; info-find-node-2: Added optional arg NOMSG.
;; Info-find-emacs-command-nodes, Info-goto-emacs(-key)-command-node: Added optional arg MSGP.
;; Info-search, Info-save-current-node: Show messages only if interactive-p.
;; 2012/01/15 dadams
;; Added: info-display-manual (redefinition).
;; Info-find-file: Do not define for < Emacs 23.2 - no virtual books.
;; 2011/11/15 dadams
;; Added: redefinition of Info-find-file for Emacs 23+, to handle virtual books.
;; 2011/08/23 dadams
;; Removed hard-code removal of info from same-window-(regexps|buffer-names). Thx to PasJa.
;; 2011/02/06 dadams
;; info-user-option-ref-item: Corrected background for light-bg case.
;; 2011/02/03 dadams
;; All deffaces: Provided default values for dark-background screens too.
;; 2011/01/04 dadams
;; Removed autoload cookies from non def* sexps. Added for defgroup and defface.
;; 2010/05/27 dadams
;; Added: Info-set-mode-line.
;; Info-find-node-2:
;; Added redefinition of it for Emacs 23.2 (they keep twiddling it).
;; Do not call Info-insert-breadcrumbs-in-mode-line. Do that in Info-set-mode-line now.
;; 2010/04/06 dadams
;; Added: Info-breadcrumbs-in-header-flag, Info-toggle-breadcrumbs-in-header-line,
;; Info-breadcrumbs-in-mode-line-mode, Info-set-breadcrumbs-depth,
;; Info-insert-breadcrumbs-in-mode-line, Info-breadcrumbs-depth-internal.
;; Added to Info-mode-menu (Emacs 23+): Info-breadcrumbs-in-mode-line-mode.
;; Info-find-node-2 (Emacs 23+): Add breadcrumbs to header line & mode line only according to vars.
;; Info-fontify-node (Emacs 23+): Handle breadcrumbs in header only if flag says to.
;; 2010/01/12 dadams
;; Info-find-node for Emacs 20, Info-find-node-2 for Emacs 21, 22, Info-search:
;; save-excursion + set-buffer -> with-current-buffer.
;; 2010/01/10 dadams
;; Info-find-node-2 for Emacs 23+: Updated for Emacs 23.2 (pretest) - virtual function stuff.
;; 2009/12/13 dadams
;; Typo: Incorrectly used Emacs 22 version for Emacs 21 also.
;; 2009/12/11 dadams
;; info-fontify-(node|quotations|reference-items), Info-merge-subnodes:
;; Use font-lock-face property, not face, if > Emacs 21.
;; 2009/08/03 dadams
;; Updated for Emacs 23.1 release: Info-find-node-2, Info-fontify-node, Info-search: new version.
;; 2009/06/10 dadams
;; Added: Info-fontify-reference-items-flag, Info-mode-syntax-table.
;; Info-mode: Use Info-mode-syntax-table, not text-mode-syntax-table.
;; Info-fontify-node: Fontify ref items if *-reference-items-flag, not just for Elisp manual.
;; Renamed: info-elisp-* to info-*.
;; 2009/06/09 dadams
;; info-fontify-quotations: Allow \ before ', just not before`.
;; 2009/06/08 dadams
;; info-fontify-quotations: Rewrote, using better regexp. Don't fontify escaped ` or '.
;; Fontify `\', `\\', etc. Respect Info-fontify-single-quote-flag.
;; Added: info-single-quote, Info-fontify-single-quote-flag, info-quotation-regexp.
;; info-quoted-name: Changed face spec to (:inherit font-lock-string-face :foreground "DarkViolet")
;; 2009/05/25 dadams
;; Info-virtual-book: Treat info-node bookmarks too.
;; 2009/05/23 dadams
;; Added: Info-mode for Emacs 23.
;; They added Info-isearch-filter, Info-revert-buffer-function, Info-bookmark-make-record.
;; 2009/05/22 dadams
;; Added: Info-saved-nodes, Info-save-current-node, Info-virtual-book. Added to Info-mode-menu.
;; Bind info-apropos, Info-save-current-node, Info-virtual-book to a, ., and v.
;; Info-mode: Updated doc string.
;; 2009/04/26 dadams
;; Info-merge-subnodes: Bind inhibit-field-text-motion to t, for end-of-line.
;; 2008/10/07 dadams
;; Require cl.el at compile time for all Emacs versions, because of case.
;; 2008/10/05 dadams
;; Added: Info-read-node-name-1, Info-read-node-name-2.
;; 2008-07-11 dadams
;; Info-fontify-node (Emacs 22+): Protect histories when getting ancestor nodes for breadcrumbs.
;; (Emacs 22+) Don't change faces info-menu-header, *-title-*, *(-header)-node, header-line.
;; (Emacs 20, 21): Removed bold and italic attributes from info-node and info-xref.
;; Removed commented out defface for info-xref and info-node.
;; Face info-file: Blue, not DarkBlue, foreground, by default.
;; 2008/06/12 dadams
;; Info-fontify-node (Emacs 22+):
;; Prevent infinite recursion from Info-goto-node calling Info-fontify-node.
;; Fixed for nil Info-hide-note-references.
;; 2008/06/10 dadams
;; Info-fontify-node (Emacs 22+): Added breadcrumbs.
;; 2008/03/06 dadams
;; info-mode: Use fboundp for Info-clone-buffer, not version test, for Emacs 22+. Thx to Sebastien Vauban.
;; 2008/02/01 dadams
;; Info-mode: Renamed Info-clone-buffer-hook to Info-clone-buffer for Emacs 22.1.90.
;; 2008/01/08 dadams
;; Info-search (Emacs 22): Removed phony pred arg.
;; 2008/01/06 dadams
;; Removed soft require of Icicles due to cirular dependency. Thx to Tennis Smith.
;; 2007/11/27 dadams
;; Info-search: Use icicle-read-string-completing, if available.
;; Added soft require Icicles.
;; 2007/11/20 dadams
;; Info-subtree-separator: Escaped slashes in doc string: \f -> \\f.
;; 2007/09/26 dadams
;; Better default color for info-quoted-name. Added group face to all deffaces.
;; 2007/09/25 dadams
;; Bound Info-mouse-*-new-* to S-down-mouse-2, not S-mouse-2, because of mouse-scan-lines-or-M-:.
;; Info-goto-emacs-command-node: Convert completion default value to string.
;; 2007/08/27 dadams
;; Info-fontify-node: Ensure Info-fontify-node is a string when fontifiy quotations. Updated for Emacs 22.
;; 2007/07/13 dadams
;; Info-find-node: Redefine only for Emacs < 21.
;; 2006/09/15 dadams
;; Info-mouse-follow-nearest-node redefinition is only for Emacs >= 22.
;; Changed Emacs 22 tests to just (>= emacs-major-version 22).
;; Bind tool-bar-map for Emacs 21. Otherwise, binding of [tool-bar] gives an error (why?).
;; 2006/08/18 dadams
;; Everywhere: Corrected previous change: minibuffer-selected-window to window-minibuffer-p.
;; 2006/08/14 dadams
;; Everywhere: fit-frame only if not a minibuffer window.
;; 2006/08/12 dadams
;; Info-merge-subnodes: Bug fixes:
;; Added concat for insertion of main node when recursive-display-p is negative.
;; Don't recurse down Index menus.
;; When checking for subnodes menu, check for nonfile menu item also.
;; After come back from recursion, go back to Info buffer before trying to go back in history.
;; Call fit-frame at end.
;; 2006/06/10 dadams
;; Added: Info(-mouse)-follow-nearest-node-new-window. Bound to S-RET, S-mouse-2.
;; 2006/03/31 dadams
;; info-menu-header: Removed :underline, because links are underlined in Emacs 22.
;; No longer use display-in-minibuffer.
;; 2006/01/08 dadams
;; Added: redefinition of Info-mouse-follow-nearest-node.
;; 2006/01/07 dadams
;; Added :link for sending bug report.
;; 2006/01/06 dadams
;; Added defgroup Info-Plus and used it. Added :link.
;; 2005/12/30 dadams
;; Moved everything from setup-info.el to here, after getting rid of some of it.
;; Use defface for all faces. Renamed faces, without "-face".
;; Use minibuffer-prompt face, not info-msg-face.
;; No longer require setup-info.el. No longer require cl.el when compile.
;; 2005/11/21 dadams
;; Info-search for Emacs 22: Don't display repeat `s' message if isearch-mode.
;; 2005/11/09 dadams
;; Info-fontify-node: Updated to reflect latest CVS (replaced Info-escape-percent header).
;; 2005/10/31 dadams
;; Use nil as init-value arg in calls to completing-read, everywhere.
;; 2005/07/04 dadams
;; info-fontify-quotations: Use font-lock-face property, instead of face, for Emacs 22.
;; Wrap re-search-forward in condition-case for stack overflow.
;; 2005/07/02 dadams
;; Info-search: fit-frame. Added Emacs 22 version too.
;; Info-goto-emacs-command-node, Info-goto-emacs-key-command-node, Info-merge-subnodes:
;; Use Info-history-back for Emacs 22.
;; Info-mode: Added Emacs 22 version.
;; 2005/06/23 dadams
;; Info-fontify-node: Fontify reference items if in Emacs-Lisp manual.
;; Added: info-fontify-reference-items
;; 2005/05/17 dadams
;; Updated to work with Emacs 22.x.
;; 2004/11/20 dadams
;; Info-find-emacs-command-nodes: bug fix: regexp (cmd-desc) was only for Emacs 21.
;; Refined to deal with Emacs 21 < 21.3.50 (soon to be 22.x)
;; 2004/10/09 dadams
;; info-fontify-quotations:
;; 1) Allow all characters inside `...'.
;; 2) Treat case of "..." preceded by backslashes
;; Info-fontify-node (for Emacs 21): Moved info-fontify-quotations before fontification of titles.
;; 2004/10/07 dadams
;; Renamed Info-resize-frame-p to Info-fit-frame-flag.
;; 2004/10/05 dadams
;; Improved regexp treatment further for fontifying quotations.
;; 2004/10/04 dadams
;; Improved regexp treatment for fontifying quotations.
;; Added info-fontify-quotations. Removed info-fontify-strings-p.
;; Renamed Info-fontify-quotations-p to Info-fontify-quotations-flag.
;; 2004/10/03/dadams
;; Major update: updated to work with Emacs 21 also.
;; Made require of setup-info.el mandatory.
;; Removed all variables and keys to setup-info.el.
;; Renamed to Emacs 21 names and only define for Emacs < 21: emacs-info -> info-emacs-manual.
;; 2004/09/28 dadams
;; Removed dir-info (same as Info-directory).
;; Renamed to Emacs 21 names and only define for Emacs < 21: emacs-lisp-info -> menu-bar-read-lispref
;; 2004/06/01 dadams
;; Renamed: Info-fit-frame-p to Info-resize-frame-p, shrink-frame-to-fit to resize-frame.
;; 2000/09/27 dadams
;; 1. Added: Info-fit-frame-p.
;; 2. Info-find-node: added shrink-frame-to-fit.
;; 1999/04/14 dadams
;; Info-fontify-node: Fontify indexes too.
;; 1999/04/14 dadams
;; 1. Added vars: info-file-face, info-menu-face, info-node-face, info-quoted-name-face, info-string-face,
;; info-xref-face.
;; 2. No longer use (or define) faces: info-node, info-file, info-xref, info-menu-5, info-quoted-name,
;; info-string.
;; 3. Info-fontify-node: Use new face variables instead of faces in #2, above.
;; Corrected: node names in info-node-face (was xref). Use info-menu-face for * and menu item.
;; 4. Info-mode: Redefined like original, but: no make-face's; use face vars.
;; Added user options description to doc string.
;; 1999/04/08 dadams
;; Info-goto-emacs-key-command-node: regexp-quote pp-key for Info-search.
;; 1999/04/07 dadams
;; Info-goto-emacs-key-command-node: a) msgs only if interactive, b) return nil if not found, else non-nil,
;; c) "is undefined" -> "doc not found", d) use display-in-minibuffer more, e) corrected error handler.
;; 1999/04/01 dadams
;; 1. Added: (remove-hook 'same-window-buffer-names "*info*").
;; 2. Info-find-node: switch-to-buffer-other-window -> pop-to-buffer.
;; 1999/03/31 dadams
;; 1. Added (put 'Info-goto-emacs-(key-)command-node 'info-file "emacs").
;; 2. Info-find-node: Mention searched file in error messages.
;; 3. Added (replacement): Info-find-emacs-command-nodes, with progress msg.
;; 4. a. Info-goto-emacs-key-command-node: Use global-map, unless menu item.
;; b. Added message "Not found using Index ...".
;; 1999/03/31 dadams
;; 1. Info-goto-emacs(-key)-command-node: Only display-in-minibuffer if
;; interactive-p.
;; 2. Info-goto-emacs-key-command-node: Messages: "key"; other entries.
;; 1999/03/31 dadams
;; 1. Added (put 'info 'info-file "emacs") so find doc on `info' cmd.
;; 2. Info-goto-emacs-command-node:
;; a. Added message when =< 1 match.
;; b. Return num-matches if found.
;; c. Uses `display-in-minibuffer' instead of `message'.
;; 3. a. Wrapped call to Info-search in condition-case, not if.
;; b. Info-goto-emacs-key-command-node: Return num-matches if found.
;; 1999/03/30 dadams
;; 1. Added Info menu bar menu.
;; 2. Info-goto-emacs-command-node: Only error if interactive-p.
;; 3. Info-goto-emacs-key-command-node:
;; a. Print key in msgs
;; b. If Info-goto-emacs-command-node doesn't find it, then try Info-search.
;; If found & interactive-p, then msg ("repeat"). Else error.
;; 4. Info-search: Msg ("repeat") if found & interactive-p.
;; 1999/03/17 dadams
;; 1. Updated to correspond with Emacs 34.1 version.
;; 2. Protect with fboundp.
;; 1996/07/11 dadams
;; Added redefinitions of Info-goto-emacs-(key-)command-node.
;; 1996/04/26 dadams
;; Put escaped newlines on long-line strings.
;; 1996/04/16 dadams
;; Added: info-file, info-quoted-name, info-string, Info-fontify-quotations-flag, info-fontify-strings-p.
;; Take into account in Info-fontify-node.
;; 1996/02/23 dadams
;; 1. Changed binding of Info-merge-subnodes back to `r', but now requires user confirmation when invoked.
;; 2. Info-subtree-separator: Incorporates "\n* ". variable-interactive prop.
;; 1996/02/22 dadams
;; display-Info-node-subtree:
;; 1. display-Info-node-subtree -> Info-merge-subnodes (renamed).
;; 2. Changed binding of Info-merge-subnodes from `r' to `C-d'.
;; 3. Don't pick up text between menu-item-line and "\n* ". Hardwire "\n* ".
;; 4. Untabify menu-item-line, so can count chars to underline.
;; 5. indent-rigidly, not indent-region.
;; 1996/02/22 dadams
;; 1. Bind describe-mode and display-Info-node-subtree.
;; 2. Added redefinition of Info-mode: Only the doc string was changed.
;; 3. Added Info-subtree-separator.
;; 3. display-Info-node-subtree: Info-subtree-separator. Doc. Garbage-collect.
;; 1996/02/22 dadams
;; Info-merge-subnodes: Rewrote, adding optional args. Renamed (defaliased) to display-Info-node-subtree.
;; 1996/02/22 dadams
;; Added redefinition of Info-merge-subnodes (cleanup, corrections).
;; 1996/02/20 dadams
;; 1. Make info-node, info-xref, info-menu-5 here. (Diff faces than before.)
;; 2. Added redefinition of Info-find-node. (Uses other window.)
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
;; Floor, Boston, MA 02110-1301, USA.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Code:
(require 'info)
(eval-when-compile (require 'cl)) ;; case
;; These are optional, for cosmetic purposes.
(require 'thingatpt nil t) ;; (no error if not found): symbol-at-point
(when (and (require 'thingatpt+ nil t) ;; (no error if not found): symbol-nearest-point
(fboundp 'tap-put-thing-at-point-props)) ; >= 2012-08-21
(tap-define-aliases-wo-prefix)
(tap-put-thing-at-point-props))
(require 'strings nil t) ;; (no error if not found): concat-w-faces
(require 'fit-frame nil t) ;; (no error if not found): fit-frame
;; Took this out because it leads to a circular `require' dependency.
;; (require 'icicles nil t) ;; (no error if not found): icicle-read-string-completing
;; Quiet the byte compiler a bit.
;;
(defvar browse-url-new-window-flag) ; In `browse-url.el'
(defvar desktop-save-buffer)
(defvar header-line-format)
(defvar Info-breadcrumbs-depth)
(defvar Info-breadcrumbs-depth-internal)
(defvar Info-breadcrumbs-in-header-flag)
(defvar Info-breadcrumbs-in-mode-line-mode)
(defvar Info-current-node-virtual)
(defvar isearch-filter-predicate)
(defvar Info-bookmarked-node-xref-faces) ; Here, Emacs 24.2+, with Bookmark+.
(defvar Info-fontify-bookmarked-xrefs-flag) ; Here, Emacs 24.2+, with Bookmark+.
(defvar Info-fontify-visited-nodes)
(defvar Info-hide-note-references)
(defvar Info-history-list)
(defvar Info-isearch-initial-node)
(defvar Info-isearch-search)
(defvar Info-last-search)
(defvar Info-link-keymap)
(defvar Info-menu-entry-name-re)
(defvar Info-next-link-keymap)
(defvar Info-mode-line-node-keymap)
(defvar Info-node-spec-re)
(defvar Info-persist-history-mode)
(defvar Info-point-loc)
(defvar Info-prev-link-keymap)
(defvar Info-read-node-completion-table)
(defvar Info-refill-paragraphs)
(defvar Info-saved-history-file)
(defvar Info-saved-nodes)
(defvar Info-search-case-fold)
(defvar Info-search-history)
(defvar Info-search-whitespace-regexp)
(defvar info-tool-bar-map)
(defvar Info-up-link-keymap)
(defvar Info-use-header-line)
(defvar isearch-lax-whitespace) ; In `isearch.el'.
(defvar isearch-regexp-lax-whitespace) ; In `isearch.el'.
(defvar infop-node-name) ; Here, in `Info-merge-subnodes'.
(defvar outline-heading-alist) ; In `outline.el'.
(defvar widen-automatically)
;;;;;;;;;;;;;;;;;;;;
(provide 'info+)
(require 'info+) ;; Ensure loaded before compiling.
;;;;;;;;;;;;;;;;;;;;
;;(@* "Macros")
;;; Macros -----------------------------------------------------------
(defmacro info-user-error (&rest args)
"`user-error' if defined, otherwise `error'."
`(if (fboundp 'user-error) (user-error ,@args) (error ,@args)))
(font-lock-add-keywords
'emacs-lisp-mode
'(("(\\(info-user-error\\)\\>" 1 font-lock-warning-face)))
;;; KEYS & MENUS ;;;;;;;;;;;;;;;;;;;;;;;;
(define-key Info-mode-map "?" 'describe-mode) ; Don't use `Info-summary'.
(define-key Info-mode-map "+" 'Info-merge-subnodes)
(define-key Info-mode-map "." 'Info-save-current-node)
(define-key Info-mode-map "a" 'info-apropos)
(define-key Info-mode-map "G" 'Info-goto-node-web)