diff options
| author | Juri Linkov | 2007-09-22 22:14:51 +0000 |
|---|---|---|
| committer | Juri Linkov | 2007-09-22 22:14:51 +0000 |
| commit | 6e0cfad3266b9996b73e2fa2d803792e7d55cb02 (patch) | |
| tree | 4046f8bc95c1126efb67e6e66d6c0f6628319ddb | |
| parent | 50fc86aad20ff49179917ad42ac2f9a247ca2705 (diff) | |
| download | emacs-6e0cfad3266b9996b73e2fa2d803792e7d55cb02.tar.gz emacs-6e0cfad3266b9996b73e2fa2d803792e7d55cb02.zip | |
(fancy-startup-text, fancy-about-text, fancy-startup-tail):
Add help-echo to external links and to links without description.
(fancy-splash-insert): Use help-echo from the 3rd element of the
link specification list, or "Follow this link" if it's nil. Doc fix.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/startup.el | 50 |
2 files changed, 41 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index eb8bbc94b5c..d294313da5f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,12 @@ | |||
| 1 | 2007-09-22 Juri Linkov <juri@jurta.org> | 1 | 2007-09-22 Juri Linkov <juri@jurta.org> |
| 2 | 2 | ||
| 3 | * startup.el (fancy-startup-text, fancy-about-text, fancy-startup-tail): | ||
| 4 | Add help-echo to external links and to links without description. | ||
| 5 | (fancy-splash-insert): Use help-echo from the 3rd element of the | ||
| 6 | link specification list, or "Follow this link" if it's nil. Doc fix. | ||
| 7 | |||
| 8 | 2007-09-22 Juri Linkov <juri@jurta.org> | ||
| 9 | |||
| 3 | * startup.el (command-line): Rename `inhibit-startup-message' to | 10 | * startup.el (command-line): Rename `inhibit-startup-message' to |
| 4 | `inhibit-startup-screen'. | 11 | `inhibit-startup-screen'. |
| 5 | (fancy-about-text): Use shorter label for "Ordering Manuals". | 12 | (fancy-about-text): Use shorter label for "Ordering Manuals". |
diff --git a/lisp/startup.el b/lisp/startup.el index e575a0aeb11..7bf5400345e 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -1157,13 +1157,18 @@ regardless of the value of this variable." | |||
| 1157 | (defvar fancy-startup-text | 1157 | (defvar fancy-startup-text |
| 1158 | '((:face (variable-pitch :foreground "red") | 1158 | '((:face (variable-pitch :foreground "red") |
| 1159 | "Welcome to " | 1159 | "Welcome to " |
| 1160 | :link ("GNU Emacs" (lambda (button) (browse-url "http://www.gnu.org/software/emacs/"))) | 1160 | :link ("GNU Emacs" |
| 1161 | (lambda (button) (browse-url "http://www.gnu.org/software/emacs/")) | ||
| 1162 | "Browse http://www.gnu.org/software/emacs/") | ||
| 1161 | ", one component of the " | 1163 | ", one component of the " |
| 1162 | :link | 1164 | :link |
| 1163 | (lambda () | 1165 | (lambda () |
| 1164 | (if (eq system-type 'gnu/linux) | 1166 | (if (eq system-type 'gnu/linux) |
| 1165 | '("GNU/Linux" (lambda (button) (browse-url "http://www.gnu.org/gnu/linux-and-gnu.html"))) | 1167 | '("GNU/Linux" |
| 1166 | '("GNU" (lambda (button) (describe-project))))) | 1168 | (lambda (button) (browse-url "http://www.gnu.org/gnu/linux-and-gnu.html")) |
| 1169 | "Browse http://www.gnu.org/gnu/linux-and-gnu.html") | ||
| 1170 | '("GNU" (lambda (button) (describe-project)) | ||
| 1171 | "Display info on the GNU project"))) | ||
| 1167 | " operating system.\n" | 1172 | " operating system.\n" |
| 1168 | :face variable-pitch "To quit a partially entered command, type " | 1173 | :face variable-pitch "To quit a partially entered command, type " |
| 1169 | :face default "Control-g" | 1174 | :face default "Control-g" |
| @@ -1189,7 +1194,8 @@ regardless of the value of this variable." | |||
| 1189 | "\n" | 1194 | "\n" |
| 1190 | :face variable-pitch | 1195 | :face variable-pitch |
| 1191 | :link ("Emacs Guided Tour" | 1196 | :link ("Emacs Guided Tour" |
| 1192 | (lambda (button) (browse-url "http://www.gnu.org/software/emacs/tour/"))) | 1197 | (lambda (button) (browse-url "http://www.gnu.org/software/emacs/tour/")) |
| 1198 | "Browse http://www.gnu.org/software/emacs/tour/") | ||
| 1193 | "\tOverview of Emacs features\n" | 1199 | "\tOverview of Emacs features\n" |
| 1194 | :link ("View Emacs Manual" (lambda (button) (info-emacs-manual))) | 1200 | :link ("View Emacs Manual" (lambda (button) (info-emacs-manual))) |
| 1195 | "\tView the Emacs manual using Info\n" | 1201 | "\tView the Emacs manual using Info\n" |
| @@ -1210,13 +1216,18 @@ Each element in the list should be a list of strings or pairs | |||
| 1210 | (defvar fancy-about-text | 1216 | (defvar fancy-about-text |
| 1211 | '((:face (variable-pitch :foreground "red") | 1217 | '((:face (variable-pitch :foreground "red") |
| 1212 | "This is " | 1218 | "This is " |
| 1213 | :link ("GNU Emacs" (lambda (button) (browse-url "http://www.gnu.org/software/emacs/"))) | 1219 | :link ("GNU Emacs" |
| 1220 | (lambda (button) (browse-url "http://www.gnu.org/software/emacs/")) | ||
| 1221 | "Browse http://www.gnu.org/software/emacs/") | ||
| 1214 | ", one component of the " | 1222 | ", one component of the " |
| 1215 | :link | 1223 | :link |
| 1216 | (lambda () | 1224 | (lambda () |
| 1217 | (if (eq system-type 'gnu/linux) | 1225 | (if (eq system-type 'gnu/linux) |
| 1218 | '("GNU/Linux" (lambda (button) (browse-url "http://www.gnu.org/gnu/linux-and-gnu.html"))) | 1226 | '("GNU/Linux" |
| 1219 | '("GNU" (lambda (button) (describe-project))))) | 1227 | (lambda (button) (browse-url "http://www.gnu.org/gnu/linux-and-gnu.html")) |
| 1228 | "Browse http://www.gnu.org/gnu/linux-and-gnu.html") | ||
| 1229 | '("GNU" (lambda (button) (describe-project)) | ||
| 1230 | "Display info on the GNU project."))) | ||
| 1220 | " operating system.\n" | 1231 | " operating system.\n" |
| 1221 | :face (lambda () | 1232 | :face (lambda () |
| 1222 | (list 'variable-pitch :foreground | 1233 | (list 'variable-pitch :foreground |
| @@ -1274,7 +1285,8 @@ Each element in the list should be a list of strings or pairs | |||
| 1274 | (concat " (" title ")")))) | 1285 | (concat " (" title ")")))) |
| 1275 | "\n" | 1286 | "\n" |
| 1276 | :link ("Emacs Guided Tour" | 1287 | :link ("Emacs Guided Tour" |
| 1277 | (lambda (button) (browse-url "http://www.gnu.org/software/emacs/tour/"))) | 1288 | (lambda (button) (browse-url "http://www.gnu.org/software/emacs/tour/")) |
| 1289 | "Browse http://www.gnu.org/software/emacs/tour/") | ||
| 1278 | "\tSee an overview of the many facilities of GNU Emacs" | 1290 | "\tSee an overview of the many facilities of GNU Emacs" |
| 1279 | )) | 1291 | )) |
| 1280 | "A list of texts to show in the middle part of the About screen. | 1292 | "A list of texts to show in the middle part of the About screen. |
| @@ -1314,10 +1326,10 @@ Arguments from ARGS should be either strings; functions called | |||
| 1314 | with no args that return a string; pairs `:face FACE', where FACE | 1326 | with no args that return a string; pairs `:face FACE', where FACE |
| 1315 | is a face specification usable with `put-text-property'; or pairs | 1327 | is a face specification usable with `put-text-property'; or pairs |
| 1316 | `:link LINK' where LINK is a list of arguments to pass to | 1328 | `:link LINK' where LINK is a list of arguments to pass to |
| 1317 | `insert-button', of the form (LABEL ACTION), which specifies the | 1329 | `insert-button', of the form (LABEL ACTION [HELP-ECHO]), which |
| 1318 | button's label and `action' property. FACE and LINK can also be | 1330 | specifies the button's label, `action' property and help-echo string. |
| 1319 | functions, which are evaluated to obtain a face or button | 1331 | FACE and LINK can also be functions, which are evaluated to obtain |
| 1320 | specification." | 1332 | a face or button specification." |
| 1321 | (let ((current-face nil)) | 1333 | (let ((current-face nil)) |
| 1322 | (while args | 1334 | (while args |
| 1323 | (cond ((eq (car args) :face) | 1335 | (cond ((eq (car args) :face) |
| @@ -1332,6 +1344,9 @@ specification." | |||
| 1332 | (insert-button (car spec) | 1344 | (insert-button (car spec) |
| 1333 | 'face (list 'link current-face) | 1345 | 'face (list 'link current-face) |
| 1334 | 'action (cadr spec) | 1346 | 'action (cadr spec) |
| 1347 | 'help-echo (concat "mouse-2, RET: " | ||
| 1348 | (or (nth 2 spec) | ||
| 1349 | "Follow this link")) | ||
| 1335 | 'follow-link t))) | 1350 | 'follow-link t))) |
| 1336 | (t (insert (propertize (let ((it (car args))) | 1351 | (t (insert (propertize (let ((it (car args))) |
| 1337 | (if (functionp it) | 1352 | (if (functionp it) |
| @@ -1371,7 +1386,7 @@ specification." | |||
| 1371 | ;; Insert the image with a help-echo and a link. | 1386 | ;; Insert the image with a help-echo and a link. |
| 1372 | (make-button (prog1 (point) (insert-image img)) (point) | 1387 | (make-button (prog1 (point) (insert-image img)) (point) |
| 1373 | 'face 'default | 1388 | 'face 'default |
| 1374 | 'help-echo "mouse-2: browse http://www.gnu.org/" | 1389 | 'help-echo "mouse-2, RET: Browse http://www.gnu.org/" |
| 1375 | 'action (lambda (button) (browse-url "http://www.gnu.org/")) | 1390 | 'action (lambda (button) (browse-url "http://www.gnu.org/")) |
| 1376 | 'follow-link t) | 1391 | 'follow-link t) |
| 1377 | (insert "\n\n"))))) | 1392 | (insert "\n\n"))))) |
| @@ -1385,13 +1400,16 @@ specification." | |||
| 1385 | :face 'variable-pitch | 1400 | :face 'variable-pitch |
| 1386 | "\nTo start... " | 1401 | "\nTo start... " |
| 1387 | :link '("Open a File" | 1402 | :link '("Open a File" |
| 1388 | (lambda (button) (call-interactively 'find-file))) | 1403 | (lambda (button) (call-interactively 'find-file)) |
| 1404 | "Specify a new file's name, to edit the file") | ||
| 1389 | " " | 1405 | " " |
| 1390 | :link '("Open Home Directory" | 1406 | :link '("Open Home Directory" |
| 1391 | (lambda (button) (dired "~"))) | 1407 | (lambda (button) (dired "~")) |
| 1408 | "Open your home directory, to operate on its files") | ||
| 1392 | " " | 1409 | " " |
| 1393 | :link '("Customize Startup" | 1410 | :link '("Customize Startup" |
| 1394 | (lambda (button) (customize-group 'initialization))) | 1411 | (lambda (button) (customize-group 'initialization)) |
| 1412 | "Change initialization settings including this screen") | ||
| 1395 | "\n")) | 1413 | "\n")) |
| 1396 | (fancy-splash-insert :face `(variable-pitch :foreground ,fg) | 1414 | (fancy-splash-insert :face `(variable-pitch :foreground ,fg) |
| 1397 | "\nThis is " | 1415 | "\nThis is " |